POV-Ray : Newsgroups : povray.general : an extraordinary rotation question : Re: an extraordinary rotation question Server Time
30 Jul 2024 14:24:19 EDT (-0400)
  Re: an extraordinary rotation question  
From: Jellby
Date: 20 Jun 2009 07:39:58
Message: <o7uug6-pp.ln1@badulaque.unex.es>
Among other things, mysdn saw fit to write:

> I believe this is the point I'm missing in comprehending pov rotations.
> coordinate axes ? To rotate something why should I care about its
> coordinates. Shouldn't povray automatically take into account THE
> coordinates?
> 
> Plus first scaling then rotating has direct implications on the new
> location, as opposed to only rotating, w/o scaling.

Every rotation has to be done *around* something (some point or axis). The
Earth's rotation takes place around its center (more or less), the Earth's
translation is just rotation around the Sun (more or less), the Moon's
movement around the Earth could be simply described as a rotation around
the Earth.

In POV-Ray, rotations are always around the <0,0,0> point. If an object is
positioned at <0,0,0>, rotating it will just rotate the object, but if the
object is 10 units away, its position will change, because it's like there
was a string between the object and a stick atb <0,0,0>: only the <0,0,0>
point stays fixed.

When you want to rotate an object, think which point(s) of the object should
stay completeley fixed in space (the hinges of a door); well, this point
must be placed at <0,0,0> before rotation or else a translation must be
applied to compensate it.

Similarly with scalings, they are done with respect to <0,0,0>. That means a
1-size sphere centered at <0,0,0> scaled by 2, becomes a 2-size sphere
centered at <0,0,0>; but a 1-size sphere centered 10 units away becomes a
2-size sphere centered 20 units away.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.