POV-Ray : Newsgroups : povray.advanced-users : rotating, translating POINTS Server Time
1 Nov 2024 07:29:06 EDT (-0400)
  rotating, translating POINTS (Message 1 to 6 of 6)  
From: HermanS
Subject: rotating, translating POINTS
Date: 19 Mar 2003 12:24:15
Message: <MPG.18e2c62b452085b4989683@news.povray.org>
It's easy to translate and rotate objects, but I'm looking for a method 
to transform POINTS.
Ex. I declare a cube using the coordinates of its vertices, then I 
transform all the vertices and I get a new object. I'm interested in the 
coordinates of the new vertices. Is this possible in POVRay using a 
matrix method?


Post a reply to this message

From: ABX
Subject: Re: rotating, translating POINTS
Date: 19 Mar 2003 12:33:17
Message: <mcah7v01tg813cn3b8ok3taj1qgegi9g5f@4ax.com>
On Wed, 19 Mar 2003 18:24:17 +0100, HermanS <her### [at] pandorabeinvalid>
wrote:
> It's easy to translate and rotate objects, but I'm looking for a method 
> to transform POINTS.
> Ex. I declare a cube using the coordinates of its vertices, then I 
> transform all the vertices and I get a new object. I'm interested in the 
> coordinates of the new vertices. Is this possible in POVRay using a 
> matrix method?

vtransform from transforms.inc
http://www.povray.org/documentation/view/281/

ABX


Post a reply to this message

From: HermanS
Subject: Re: rotating, translating POINTS
Date: 20 Mar 2003 03:53:40
Message: <MPG.18e3a005c79f1aba989684@news.povray.org>
ABX wrote:..
> On Wed, 19 Mar 2003 18:24:17 +0100, HermanS <her### [at] pandorabeinvalid>
> wrote:
> > It's easy to translate and rotate objects, but I'm looking for a method 
> > to transform POINTS.
> > Ex. I declare a cube using the coordinates of its vertices, then I 
> > transform all the vertices and I get a new object. I'm interested in the 
> > coordinates of the new vertices. Is this possible in POVRay using a 
> > matrix method?
> 
> vtransform from transforms.inc
> http://www.povray.org/documentation/view/281/
> 
> ABX
> 
Thank you, but clearly I don't use "vtransform" the right way.
I have declared a point q10 and then I use
#declare q1 = vtransform(q10, rotate<0,90,0>);
I get an error message "expected 2 parameters but only 1 found".
Herman


Post a reply to this message

From: ABX
Subject: Re: rotating, translating POINTS
Date: 20 Mar 2003 04:12:35
Message: <g71j7v8mn4ncrsc6uqrdq80tqqg32l6jop@4ax.com>
On Thu, 20 Mar 2003 09:53:43 +0100, HermanS <her### [at] pandorabeinvalid>
wrote:
> Thank you, but clearly I don't use "vtransform" the right way.
> I have declared a point q10 and then I use
> #declare q1 = vtransform(q10, rotate<0,90,0>);
> I get an error message "expected 2 parameters but only 1 found".
> Herman

rotate<0,90,0> is not transformation. You can't write:

#declare My_Rotation=rotate<0,90,0>;

You have to write 

#declare My_Rotation=transform{rotate<0,90,0>};

So you have to write

#declare q1 = vtransform(q10, transform{rotate<0,90,0>});

ABX


Post a reply to this message

From: ABX
Subject: Re: rotating, translating POINTS
Date: 20 Mar 2003 04:15:58
Message: <dj1j7v8e4kr78nnvp38ivooigc2mavnf9t@4ax.com>
On Thu, 20 Mar 2003 10:11:43 +0100, ABX <abx### [at] abxartpl> wrote:
> rotate<0,90,0> is not transformation. You can't write:

or rather it is but not in the meanining of left side of assignment to
transformation identifier

ABX


Post a reply to this message

From: HermanS
Subject: Re: rotating, translating POINTS
Date: 20 Mar 2003 06:20:22
Message: <MPG.18e3c2681030bb7989685@news.povray.org>
ABX wrote:..
> On Thu, 20 Mar 2003 09:53:43 +0100, HermanS <her### [at] pandorabeinvalid>
> wrote:
> > Thank you, but clearly I don't use "vtransform" the right way.
> > I have declared a point q10 and then I use
> > #declare q1 = vtransform(q10, rotate<0,90,0>);
> > I get an error message "expected 2 parameters but only 1 found".
> > Herman
> 
> rotate<0,90,0> is not transformation. You can't write:
> 
> #declare My_Rotation=rotate<0,90,0>;
> 
> You have to write 
> 
> #declare My_Rotation=transform{rotate<0,90,0>};
> 
> So you have to write
> 
> #declare q1 = vtransform(q10, transform{rotate<0,90,0>});
> 
> ABX
> 
Thank you for the help: it works.
Herman


Post a reply to this message

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