|
![](/i/fill.gif) |
Mike Hough wrote:
>
> vaxis_rotate is not much different, and I think you get it. It just means take
> the first point and rotate it about the second point by the float amount.
>
> vaxis_rotate (<1, 1, 1>, <2, 2, 2>, 3)
>
> <1, 1, 1> is rotated about the point <2, 2, 2> by <3, 3, 3> degrees.
>
> I was hoping to see it expanded to take a vector for the amount in 3.1, since
> the amount as a float is equal in all directions, but I was sad to find it
> 'aint so. Oh well.
I'm afraid that description is not quite accurate. As confirmed by both
experiment and source reading, vaxis_rotate(<1,1,1>, <2,2,2>, 3)
actually takes the point <1,1,1> and returns the coordinates you get by
rotating that point - about an axis that runs from <0,0,0> to <2,2,2> -
by 3 degrees. It is just like rotating about, say the x axis by 3
degrees or the z axis by 3 degrees. The direction of rotation follows
the left hand rule with the thumb pointed along the <0,0,0> to <2,2,2>
axis. This is why the *angle* is not a vector. For example, what sense
would it make to say "rotate <45,30,17> about the x axis"? The behavior
you describe is not equivalent. To see what is happening, make a little
scene comparing the final location of:
sphere { <1,1,1>, .2 rotate <3,3,3> translate <2,2,2> }
which is equivalent to your description and :
sphere { vaxis_rotate(<1,1,1>, <2,2,2>, 3), .2 }
(with textures, of course! :))
Jerry Anning
cle### [at] dhol com
Post a reply to this message
|
![](/i/fill.gif) |