POV-Ray : Newsgroups : povray.windows : Local Transformations : Re: Local Transformations Server Time
28 Jul 2024 12:34:52 EDT (-0400)
  Re: Local Transformations  
From: Tony Vigil
Date: 7 Jan 1999 18:24:14
Message: <369543CF.A44A2BFF@emc-inc.com>
Thorsten Froehlich wrote:

> No, you aren't missing something, you just did not read the docs! See section
> 4.3.1.3.

I sure did read them.  You have misread them.  Rotations are relative to the object
axis
& translations/scaling are relative to the origin.

>
> >If you have an object that is positioned at <0,0,0> and is rotated 45 degrees
> >on the Y axis, then translate it 1 unit on the X axis, won't it be located at
> ><1,0,0>???
>
> So your code would look like:
> rotate <0,45,0>
> translate <1,0,0>
>

Your code places the object at <1,0,0>.  If POV did have a local coordinate system for
each object, those same transformations would put it at < 0.71, 0,  -0.71>.


>
> >What I was wanting to do is translate that same object (with it's rotated
> >axis), 1 unit on it's own X axis.
> >
> >The approximate coordinates would become < 0.71, 0,  0.71> instead of <1,0,0>
>
> Did you consider (after reading the docs) to write:
> translate <1,0,0>
> rotate <0,45,0>
>

I sure did.  Now suppose you want to perform another set of transfomations to the same
object:

-45 degrees on the object's Y axis (no translations occuring), then translate 1 unit
along the object's Z axis.  Now what???  The object should be at in it's original
rotational state of <0,0,0> located at <0.71 , 0 , 0.29> - but it's not.


> It will do what you want - and reading the docs will surely show you some other
> features you don't even know about! :-)
>
>     Thorsten

Thanks for the reading tip though.  Perhaps you should do likewise. :-)

Tony


Post a reply to this message

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