|
![](/i/fill.gif) |
Regarding transformations...
All transformations act around the origin. It is a good practice to build
your objects based on the origin, rotate them and then translate them to
their final position. For example:
cylinder
{
<0, 0, 0>, <0, 0, 10>, 1
rotate<45, 0, 0> //orient
translate<20, 30, 50> //move to final position
}
The rotate transformation acts as you suggest... It first applies a rotation
around the x-axis, then the y-axis then the z-axis. This can be very useful
if you want to create a ring of objects... Which is what I think you are
asking for...
#local n=0;
#while(n<360)
cylinder
{
<10, 0, 0>, <10, 0, 10>, 1 //Note that the cylinder isn't at the
origin!
rotate<0, 0, n> //rotate around the origin....
}
#local n=n+30;
#end
The only way to rotate an object about an arbitrary axis is to start playing
with the matrix transformations... Which I am not qualified to explain!
Rarius
"ShiJie" <jca### [at] yahoo com> wrote in message
news:web.41a35b12a2f105e5174727610@news.povray.org...
> Dear NG,
>
> I wanted to learn more about transformations like rotation and etc. There
> must be a reference point for each. For things like translate, I guess it
> does not matter.. but for rotate? is the reference the x,y and z axis? I
> first thought that reference point were calculated using the centroid of
> the object being translated.
>
>
>
> And another question is regarding rotation. I think there is a certain
> function called v_rotation (or something similar) in which I can define
> the
> rotation axis, but.. this seems to only rotate a point. Is there a certain
> function that could define the rotation axis of any object?
>
> I want something similar to Lathe (but Lathe 1. rotates splines and curves
> 2. rotates them with almost infinite copies) but in which objects are
> rotated but with small number of copies (say 5 copies in a 360 degree
> angle
> rotation). Any advise would be appreciated.
>
> Sincerely,
> Jose Capco
>
>
Post a reply to this message
|
![](/i/fill.gif) |