POV-Ray : Newsgroups : povray.general : rotation of an object using orientation vectors ? : Re: rotation of an object using orientation vectors ? Server Time
1 Aug 2024 00:20:49 EDT (-0400)
  Re: rotation of an object using orientation vectors ?  
From: darenw
Date: 19 Jun 2006 21:35:00
Message: <web.44974fb1c155ffd78c5ce0670@news.povray.org>
If you are given three orthogonal unit vectors, or two from which the third
would be their cross product, describing the orientation of the rotated
object, those vectors *are* the columns (or rows?) of the rotation matrix
you want.  If i understand the question correctly, this is what you're
looking for.

Suppose you start with <1,0,0>,  <0,1,0>, and <0,0,1> vectors glued onto
your object, and your object rotates so that now you have vectors U,V,W.
then the matrix to perform that rotation would be
  matrix< U[0], U[1], U[2],
          V[0], V[1], V[2],
          W[0], W[1], W[2],
          0, 0, 0>

(or maybe the transpose; i just had a Mike's Hard Lemonade, got tipsy. i'm
never sure of anything anyway...)

Note that you need at least two unit vectors stuck to your object. Only one
would lead to ambiguity, allowing an axis of rotation about which the
object isn't nailed down.

Does this answer the question?

DSW


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.