

> > >
> > > Given a rotation matrix in 3D Euclidean space:
> > >
> > >  00 01 02 
> > >  10 11 12 
> > >  20 21 22 
> > >
> > > What is the correct way of transforming this matrix so that it will rotate a
> > > POVRay object in the same way?
> >
> > Hi
> >
> > You may want to have a look at the code below.
> >...
I thank you for your time and effort.
After a lot of trial and error, I believe that I have found a solution.
A 313 set of Euler angles (or any other variation) gives rise to a rotation
matrix according the formulas found here (and other places):
https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix
As with any rotation matrix, the columns of the matrix correspond to the vectors
that result from rotating each Euclidean basis vector. (Since rotations are
rigid each column vector is also a unit vector.)
Using the POV Ray transform Shear_Trans(A, B, C), where the vectors A, B, and C
are the column vectors of the Euclidean rotation matrix, I can orient the object
in POV Ray space in the same way as in Euclidean space.
Of course, the column vectors have to be adjusted for the Euclidean [x, y,z] to
POV Ray <x,y,z> coordinate transformation. This is done as follows.
The Euclidean rotation matrix:
 11 12 13 
 21 22 23 
 31 32 33 
is used to create the POV Ray vectors in this manner:
A = <22, 32, 12>
B = <23, 33, 13>
C = <21, 31, 11>
Using these vectors in Shear_Trans(A, B, C) produces a rotation that is
equivalnt to using the 313 Euler angles in Euclidean space.
My plan is to perform all calculation with an external program and to feed the
data into POV Ray using variables.
Post a reply to this message

