/[MITgcm]/MITgcm_contrib/high_res_cube/matlab-grid-generator/rotate_about_xaxis.m
ViewVC logotype

Annotation of /MITgcm_contrib/high_res_cube/matlab-grid-generator/rotate_about_xaxis.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Nov 11 18:08:08 2003 UTC (21 years, 8 months ago) by cnh
Branch point for: MAIN, initial
Initial revision

1 cnh 1.1 function [X,Y,Z]=rotate_about_xaxis(lX,lY,lZ,angle);
2     % [X,Y,Z]=rotate_about_xaxis(lX,lY,lZ,angle);
3     % Rotate about X axis by "angle".
4    
5    
6     s=sin(angle);
7     c=cos(angle);
8     if c<1e-9
9     c=0;
10     s=sign(s);
11     end
12    
13     X=lX;
14     Y=c*lY-s*lZ;
15     Z=s*lY+c*lZ;

  ViewVC Help
Powered by ViewVC 1.1.22