I had the unexpected "opportunity" to review some old code I've had on the
backburner as a refresher and to look for any errors, and I spotted some errors
in some of the matrix transforms I was using to create some vectors.
Since we use a lefthanded coordinate system, and rotation matrices can be a bit
confusing  especially at first  I made a sketch, and then decided it ought to
be added to the collection of documentation diagrams I'm making.
There may be some additional graphics on this specific topics if I find the time
amidst all the other stuff.
As far as I can tell there was no explicit mention of using the formulas of the
transformed basis vectors in isosurface variable substitution on either Mike
Williams' site or Friedrich Lohmueller's. Though they do appear in POVRay's
online documentation.
http://www.povray.org/documentation/view/3.7.1/73/
Rotate
Note: these rotation substitutions work like normal POVrotations: they already
compensate for the inverse working
rotate around X
: replace "y" with "z*sin(radians(Angle)) + y*cos(radians(Angle))"
: replace "z" with "z*cos(radians(Angle))  y*sin(radians(Angle))"
rotate around Y
: replace "x" with "x*cos(radians(Angle))  z*sin(radians(Angle))"
: replace "z" with "x*sin(radians(Angle)) + z*cos(radians(Angle))"
rotate around Z
: replace "x" with "x*cos(radians(Angle)) + y*sin(radians(Angle))"
: replace "y" with "x*sin(radians(Angle)) + y*cos(radians(Angle)) "
rotate z*75 gives:
P(x*cos(radians(75)) + y*sin(radians(75)),
x*sin(radians(75)) + y*cos(radians(75)), z)
Anyway,
Here is a supplementary illustration  it could probably use some polishing.
Post a reply to this message
Attachments:
Download 'rotationmatrices.png' (296 KB)
Preview of image 'rotationmatrices.png'
