[pstricks] 3d plot - rotation of a point (x, y, z) via RotX, RotY, RotZ

Wim Neimeijer w.neimeijer at hccnet.nl
Sat Jul 30 15:59:06 CEST 2005


Hi,

I hope someone can help me with this, but I am a bit stuck

I am using two coordinate systems, 

1) The first is the normal OXYZ cartesian system which I setup as 

\pstThreeDCoor[nameX=$x_{0}$,nameY=$y_{0}$,nameZ=$z_{0}$,xMin=0,yMin=0,z
Min=0,xMax=4,yMax=5,zMax=6] 

I name this system : ORIGINAL

2) The second is the rotated system OX'Y'Z' with the same origin but
setup as 

\pstThreeDCoor[RotX=30,RotY=-15,RotZ=50,nameX=$x$,nameY=$y$,nameZ=$z$,xM
in=0,yMin=0,zMin=0,xMax=25,yMax=4,zMax=6]

I name this system : ROT

In system ORIGINAL I draw a line from the origin to the point (0,0,z)
with e.g z = 3

In system ROT I also draw a line from the origin to the point (0,0,z' )
with z' = 3 (via \psset{RotX=30,RotY=-15,RotZ=50}  and \pstThreeDLine )

Question :

I want to find the coordinates (x,y,z) in system ORIGINAL for a point
(x',y',z') in system ROT 

Example

in system ROT I have the point (x',y',z' ) = (0,0,3), but what are its
coordinates (x,y,z) in system ORIGINAL

Test I did

I tried to use the standard 3D rotation matrices I know, and try to map
this to the pst-3dplot where the rotation matrix M is used.
What I cannot figure out is the order in which the rotation operations
are done. What I mean is, is that in
the call to \pstThreeDCoor[RotX=30,RotY=-15,RotZ=50, ...... I cannot
determine what the rotation sequence is 

RotX, RotY , RotZ  		or
RotZ, RotY, RotX		or
RotY, RotZ, RotX		etc

I also used consequent calls to 

\pstRotPointIIID[RotX=30](0,0,3){\xvalb}{\yvalb}{\zvalb}
\pstRotPointIIID[RotY=-15](\xvalb,\yvalb,\zvalb){\xvalb}{\yvalb}{\zvalb}
\pstRotPointIIID[RotZ=50](\xvalb,\yvalb,\zvalb){\xvalb}{\yvalb}{\zvalb}

to find the coordinates in this way, but no success so far

The rotation matrices I use are (sort of in mathematica notation)

Rotation Z-axes = 
	
	(  Cos[alpha]  Sin[alpha]   0

	 Sin[alpha]  Cos[alpha]  0

	 0	     0               1 )

with alpha = RotZ

Rotation X  axes = 

	(  1            0                0 

             0          Cos[gamma] -Sin[gamma]

            0          Sin[gamma]    Cos[gamma] )

with gamma = RotX

Rotation Y axes = 
	(  Sin[beta]   0        Cos[beta]

	    0            1             0
	
	Cos[beta]  0,          Sin[beta] )

with beta = RotY

Thanks in advance for all the help
Kind regards
Wim Neimeijer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20050730/1d99c702/attachment.html 


More information about the PSTricks mailing list