POV-Ray : Newsgroups : povray.newusers : translation question Server Time
4 Nov 2024 23:19:37 EST (-0500)
  translation question (Message 1 to 3 of 3)  
From: Maurice
Subject: translation question
Date: 11 Sep 2004 13:29:31
Message: <414335fb$1@news.povray.org>
I want to translate an object along the y-axis.

I use
	translate y*size-delta

this gives an unexpected effect. (There seems to be a translation along 
the z axis aswell.

When I do
	translate y*size
	translate y*-delta
I get the expected result.

What am I missing?

-- 
Maurice


Post a reply to this message

From: Slime
Subject: Re: translation question
Date: 11 Sep 2004 13:52:22
Message: <41433b56$1@news.povray.org>
> translate y*size-delta

Multiplication is performed before addition or subtraction, so that's
equivalent to

translate <0,1,0>*<size,size,size> - <delta,delta,delta>
or
translate <0,size,0> - <delta,delta,delta>
or
translate <-delta,size-delta,-delta>

What you want is

translate y*(size-delta)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Maurice
Subject: Re: translation question
Date: 11 Sep 2004 15:08:09
Message: <41434d19$1@news.povray.org>
Slime wrote:
>>translate y*size-delta
> 
> 
> Multiplication is performed before addition or subtraction, so that's
> equivalent to
> 
> translate <0,1,0>*<size,size,size> - <delta,delta,delta>
> or
> translate <0,size,0> - <delta,delta,delta>
> or
> translate <-delta,size-delta,-delta>
> 
> What you want is
> 
> translate y*(size-delta)
> 
>  - Slime
>  [ http://www.slimeland.com/ ]
> 
> 
Thanks

That explains.


Post a reply to this message

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