POV-Ray : Newsgroups : povray.general : an extraordinary rotation question : Re: an extraordinary rotation question Server Time
30 Jul 2024 08:25:40 EDT (-0400)
  Re: an extraordinary rotation question  
From: clipka
Date: 19 Jun 2009 14:30:00
Message: <web.4a3bd891cfb6d607080f32a0@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote:
>  I'm new at this forum and very interested in ray tracing. Currently, I'm using
> Povray for ray tracing. But I have a huge problem understanding its rotation
> logic.

That's perfectly normal, I guess everyone had that :)

The key to understanding POV-Ray's rotations is that POV-Ray always (well,
*virtually* always) operates in absolute coordinate space; similarly, rotations
are always about the absolute coordinate origin.

In order to rotate an object around an arbitrary point, you need to first
translate the object so that the particular point ends up at the absolute
coordinate origin, then perform the rotation, and then translate the object
back; e.g.:

    translate -<3,2,1>
    rotate y*30
    translate <3,2,1>

will perform a 30-degree rotation about the vertical through the point <3,2,1>.


Post a reply to this message

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