POV-Ray : Newsgroups : povray.text.tutorials : Rotate around central axis : Re: Rotate around central axis Server Time
16 Apr 2024 14:17:29 EDT (-0400)
  Re: Rotate around central axis  
From: Philippe-H Cadet
Date: 21 Dec 2000 01:44:14
Message: <3a41a6be$1@news.povray.org>
>   A translate <0,0,0> does nothing. Absolutely nothing.
>   The 'translate' command does NOT mean "translate to".
>   It means "translate by". Or "add this vector to the current location".
>   That's why you should decide what is the center of the object and then
> do something like this (supposing that you decide that the center of the
> object is located at <1,2,3>):
>
> #declare ObjectCenter= <1,2,3>;
>
> object
> { MyObject
>   translate -ObjectCenter
>   rotate whatever
>   translate ObjectCenter
> }

Ok. I think got it now. For this I assume that when creating the
object, I have to be careful while writing the dimentions. I mean
that in order to perform a rotation on the y axis of the object,
ObjectCenter
has to reflect this intention by it's x or z coordinate.

Because if I have to move object it to the position <0,0,0> (with the
ObjectCenter
vector) and have a perfect rotation on it self,  after a lot of sucessive
translate - rotate - translate.... there can be some errors due to
the fact that the object is not properly centered with the normal
of the rotation I want it to rotate.

Philippe


Post a reply to this message

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