lamp_mac/ATOMS/
r2x.pro
top R2X
result = R2X(v)
******* *** ** User callable ** rotate a unit vector v (a,b,c) on to (1,0,0) ** choose rotations such that ** Rz.Rx.v=(1,0,0) ** First rotation onto x-y plane ** Rx.(a,b,c)=(a',b',0), rotation angle ALPHA ... (1) ** Rx=[1 ,0 ,0 ] ** [0 ,cos(alpha) ,sin(alpha)] ** [0 ,-sin(alpha),cos(alpha)] ** Second rotation about z ** Rz.(a',b',0)=(1,0,0), rotation angle BETA ... (2) ** Rz=[cos(beta) ,sin(beta), 0] ** [-sin(beta),cos(beta), 0] ** [0 ,0 , 1] ** ** Eqns to be implemented ** (1) gives ** aa=a ** bb=b.cos(alpha)+c.sin(alpha) ** tan(alpha)=c/b -> alpha ** ** (2) gives ** tan(beta)=bb/a ** ** M.R.J. Apr 2011 (ILL)
Parameters
- v
File attributes
Modification date: | Tue Oct 1 14:45:53 2013 |
Lines: | 54 |