POV-Ray : Newsgroups : povray.general : Koordinates Baking part2 Server Time
3 Nov 2024 01:09:02 EDT (-0400)
  Koordinates Baking part2 (Message 1 to 3 of 3)  
From: H  Karsten
Subject: Koordinates Baking part2
Date: 5 Mar 2008 10:20:01
Message: <web.47ceb88f1bde76ade410cd5a0@news.povray.org>
Hi people!
Here:
http://news.povray.org/povray.general/thread/%3Cweb.47b9887c93fc6a8bf8a489ba0%40news.povray.org%3E/

I was asking about coordinates baking.

Now I have the problem, that an object will be translated and rotated and this
couple of times:

1.: I rotate an object around <0,0,0>
2.: Then I translate it to <1,0,0>
3.: Now I'm rotating it again (again around <0,0,0>)

If I use vrotate, I need to give at step 3 the new position of my vector:
#declare MyVector_Rotation=vrotate(MyVector_Position,<10,20,30>) for example

but where is my first rotation, assigned at step 1?

How to give the vrotate my Position AND my (older) orientation?

Maybe, I have some confusing how to use the rotation vector, after using
vrotate?

After calkulating the vectors, I would give the objects the following
coordinates like this:

rotate MyVector_Rotation
translate MyVector_Position

Is that right?


Post a reply to this message

From: Tim Attwood
Subject: Re: Koordinates Baking part2
Date: 5 Mar 2008 16:01:33
Message: <47cf0a2d$1@news.povray.org>
> Now I have the problem, that an object will be translated and rotated and 
> this
> couple of times:
>
> 1.: I rotate an object around <0,0,0>
> 2.: Then I translate it to <1,0,0>
> 3.: Now I'm rotating it again (again around <0,0,0>)
>
> If I use vrotate, I need to give at step 3 the new position of my vector:
> #declare MyVector_Rotation=vrotate(MyVector_Position,<10,20,30>) for 
> example
>
> but where is my first rotation, assigned at step 1?
>
> How to give the vrotate my Position AND my (older) orientation?
>
> Maybe, I have some confusing how to use the rotation vector, after using
> vrotate?
>
> After calkulating the vectors, I would give the objects the following
> coordinates like this:
>
> rotate MyVector_Rotation
> translate MyVector_Position
>
> Is that right?

To rotate around some arbitrary center point instead of <0,0,0>
just translate your point by the assumed center, rotate, then
move it back.

#local Point = <0.5,0.5,0>; // some point
#local CenterPoint = <1,2,3>; // center to rotate around
#local Rotation = <10,20,30>; // rotation angles
#local ResultPoint =  vrotate(Point-CenterPoint,Rotation)+CenterPoint;


Post a reply to this message

From: H  Karsten
Subject: Re: Koordinates Baking part2
Date: 6 Mar 2008 05:10:01
Message: <web.47cfc28f8969e9b3cdff2f210@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:

> #local Point = <0.5,0.5,0>; // some point
> #local CenterPoint = <1,2,3>; // center to rotate around
> #local Rotation = <10,20,30>; // rotation angles
> #local ResultPoint =  vrotate(Point-CenterPoint,Rotation)+CenterPoint;

This helps!!
Thanx man!!


Post a reply to this message

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