Converting Euler angles into VRML Rotation form?

Bernie Roehl (broehl@coulomb.uwaterloo.ca)
Fri, 17 Nov 1995 13:29:06 -0500


Alan Walford writes:
> Anyway, does anyone know how to convert between Euler angles and
> the axis/angle form and visa-versa?

Personally, I'd go through matrix form as an intermediate step. You
alesady know how to go from Euler angles to a matrix, and the equations
for going from axis/angle to matrix are available. I haven't looked
at the latter set of equations for a long time (several weeks now... :-)
but I suspect you can extract the axis and angle from the matrix. Of course,
if you're *generating* VRML then it's easy; just produce a MatrixTransform
node.

By the way, your message mentioned doing X eotation first, followed by Y,
followed by Z. Most people do Y first, then X, then Z (and of course,
order matters).

-- 
   Bernie Roehl
   University of Waterloo Dept of Electrical and Computer Engineering
   Mail: broehl@sunee.uwaterloo.ca    Voice:  (519) 888-4567 x 2607 [work]
   URL: http://sunee.uwaterloo.ca/~broehl

  • Next message: Greg Scallan: gTarget window/frame for WWWAnchor"
  • Previous message: Kirk Membry: gsurface mapping an object"