Hi!
>.THE QUESTION :
>
>How do i rotate an arbitrary object around an arbitrary axis ?
>I've tried various combinations of rotate but they don't work.
>I imagine i need to use a matrix, but linear algebra was a long time ago
>and i'm at loss. Can someone please help me ?
In general:
Translate the object until the rotation axis runs through the origin. Rotate
two times now, each time around one of the main axis (different ones) until
the rotation axis falls into one of the three main-axis. Then do the
rotation for the desired angle around this axis. And repeat everything
backwards...
I have appended C++ source-code which shows you how to rotate a point around
an arbitrary axis. With a little work you should be able to convert it into
POV code. When using POV 3.1, you could even make a macro out of it:
Macro for rotation of an object around an arbitrary axis! Now, wouldn't
that be something POV-users would like?
Maybe somebody else would like to do it?
Greetings,
Johannes.
Post a reply to this message
Attachments:
Download 'rotation.txt' (13 KB)
|