|
![](/i/fill.gif) |
Yes, two or three rotates can be turned into a single rotate. But I'm not
certain that an arbitrary rotation can be expressed as a single POV rotate<>
argument.
To reduce the source filesize, why not use some macros?
Then again... (reading in a textbook) ... an arbitrary rotation can be
decomposed into five axis rotations. Because one rotate<> command does
three such rotates (one on each axis), I can collapse that down to fewer
statements when consecutive rotates are performed in the proper order. That
gives me three individual rotate commands.
So, an arbitrary rotation (any amount on any axis) can be expressed as three
rotate<> primitives in POV, or as one matrix primitive.
rotate <0, 0, -theta>
rotate <0, -phi, A>
rotate <0,phi,theta>
where phi and theta are computed based on the desired axis of rotation, and
A is the amount to rotate along that axis.
--John
Spider wrote in message <36DBAB72.5E598A1C@bahnhof.se>...
>I actually hope to save space with this, since there are three rotations in
a
>row, repeated some 3000 times in a .inc file. I know that POV doesn't take
long
>to compute it, but I'd still think it was a good idea to reduce them, for
the
>sake of filesize. the difference would not be as big with a matrix, since
it
>requires a few more numbers than a rotate, so perhaps a way to apply two
rotates
>in a single one. I still haven't worked on it, since I don't think I have
the
>skills required.
>
>
>--
>//Spider
>( spi### [at] bahnhof se ) [ http://www.bahnhof.se/~spider/ ]
>#declare life = rand(seed(42))*sqrt(-1);
Post a reply to this message
|
![](/i/fill.gif) |