POV-Ray : Newsgroups : povray.newusers : Rotate Help : Re: Rotate Help Server Time
1 Jul 2024 02:54:06 EDT (-0400)
  Re: Rotate Help  
From: Warp
Date: 25 Sep 2011 15:54:03
Message: <4e7f86db@news.povray.org>
Carl <car### [at] gmailcom> wrote:
> Ok... I think I figured it out.  I need Axis_Rotate_Trans() not just rotate.

If 'A' is a vector, then:

    rotate A

is simply a shortcut for:

    rotate <A.x, 0, 0>
    rotate <0, A.y, 0>
    rotate <0, 0, A.z>

which means "rotate A.x radians around the X axis, A.y radians around the
Y axis and A.z radians around the Z axis".

A vector in the form "<Value, 0, 0>" can also be written as "x * Value",
which literally means "<1, 0, 0> * Value", which is interpreted as
"<1 * Value, 0 * Value, 0 * Value>" (which naturally is "<Value, 0, 0>".
Thus it's common to write

    rotate Something * x

instead of

    rotate <Something, 0, 0>

because it's shorter. However, this shouldn't be confused as being some
kind of special syntax meaning "rotate by this many radians around this
axis", even though in this particular case the end result is that. If you
try any other "axis" it naturally won't work. For example:

    rotate Something * <1, 1, 0>

does not mean "rotate by Something radians around <1, 1, 0>". Instead as
said, it's just a shortcut for:

    rotate <Something, 0, 0>
    rotate <0, Something, 0>

or, in other words:

    rotate Something * x
    rotate Something * y

-- 
                                                          - Warp


Post a reply to this message

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