POV-Ray : Newsgroups : povray.binaries.images : vrotate example from p.general : Re: vrotate example from p.general Server Time
29 Jul 2024 22:26:11 EDT (-0400)
  Re: vrotate example from p.general  
From: Anthony D  Baye
Date: 16 Aug 2013 19:50:01
Message: <web.520eb892286ea796328783aa0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Er, that did nothing but confuse me.  Especially the sphere.
> The perspective camera didn't help.
>
>
>

yeah... sorry about that.  The documentation makes it clear that vrotate(A,B)
rotates a POINT (A) around the origin by a vector (B)

all well and good, but what it doesn't make clear -- expecting, I suppose that
it should be obvious -- is that when you do the same thing with an object, you
actually rotate the object's reference frame.

so what vrotate(A,B) does is apply a pre-translation rotation to the object, so
that when it is translated to A and then rotated by B, it is still in the same
orientation it had at the origin.

I hope this is clear.

e.g.
imagine you have an object at the origin, and you translate it to <3,0,0> then
rotate it about the origin by <0,0,90>

the object will now be at <0, 3, 0> but it will be lying on it's side.

in order to do what vrotate does, you need to first rotate the object by
<0, 0, -90>, then translate it by A and rotate it by B.

Regards,
A.D.B.


Post a reply to this message

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