POV-Ray : Newsgroups : povray.newusers : order of operations Server Time
14 Nov 2024 12:23:49 EST (-0500)
  order of operations (Message 1 to 4 of 4)  
From: Drew
Subject: order of operations
Date: 6 Nov 1998 00:06:09
Message: <364283F1.6B75FF61@pilot.msu.edu>
In my endeavors to render scenes I find myself needing to scale
translate and rotate objects. Only different things happen if I do them
in different orders. ie. I had a cylinder I scaled down by .25 in ann
three axes and I had to translate it -50*z to get it where I wanted it.
How do theses operations affect each other? Should I always translate
first, scale and then rotate?
Drew


Post a reply to this message

From: Ken
Subject: Re: order of operations
Date: 6 Nov 1998 00:17:12
Message: <36428617.E4063F8E@pacbell.net>
Drew wrote:

> In my endeavors to render scenes I find myself needing to scale
> translate and rotate objects. Only different things happen if I do them
> in different orders. ie. I had a cylinder I scaled down by .25 in ann
> three axes and I had to translate it -50*z to get it where I wanted it.
> How do theses operations affect each other? Should I always translate
> first, scale and then rotate?
> Drew

    In one of the pov versions this was covered quite well
in the docs. Perhaps it's gone now.
   Anyway your safest route is scale, rotate, then translate.
Unexpected things will  happen if you stray from this order.

Ken Tyler


Post a reply to this message

From: Margus Ramst
Subject: Re: order of operations
Date: 6 Nov 1998 03:53:43
Message: <3642B912.DF169C6E@peak.edu.ee>
Ken wrote:
>     In one of the pov versions this was covered quite well
> in the docs. Perhaps it's gone now.
>    Anyway your safest route is scale, rotate, then translate.
> Unexpected things will  happen if you stray from this order.
> 
> Ken Tyler

Another useful trick is to scale, translate and then rotate - the object orbits
at a distance from the origin specified by translate. Scaling should almost
always be first, though.

Margus


Post a reply to this message

From: Drew
Subject: Thanks guys. (n/t)
Date: 6 Nov 1998 12:24:35
Message: <3643312C.38206749@pilot.msu.edu>


Post a reply to this message

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