|
|
Wasn't it Kaveh who wrote:
>I am trying to rotate an object around an axis, using, for example, this
>code:
>
>---------------
>#declare myvector <1,0,1>;
>
>object{myobject rotate 45*vnormalize(myvector)}
>---------------
>
>But the rotation is not around the vector specified. It works fine for
>x,y, etc, but around other vectors it doesn't give the expected result.
>
>I tried a loop with a range of rotations, to see the trajectory, and it
>is not a circle, but some kind of cusp shape.
>
>Is there something basic I am doing wrong?
What's happening is that the expression that follows the "rotate"
keyword isn't the axis vector times the rotation amount. It's a sequence
of three separate rotations around the x, y and z axes, and that doesn't
happen to be the same thing in most cases.
What you want to do is
#include "transforms.inc"
object {myobject transform {Axis_Roatate_Trans (myvector, 45)}}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|