POV-Ray : Newsgroups : povray.general : Rotating an object : Re: Rotating an object Server Time
31 Jul 2024 06:22:09 EDT (-0400)
  Re: Rotating an object  
From: Tim Attwood
Date: 5 Oct 2007 01:02:51
Message: <4705c57b@news.povray.org>
> The walls are created just fine and placed at the correct place 
> (Position1)
> but the rotation (rotate Angle) is wrong.

rotate moves an object around the origin,

from your code
OutSideWall(< 200,0,1200>, true,< 200,0,800>, true)
I deduce that you have a wall starting at <200,0,1200>
(Position1) and going to <200,0,800> (Position2)

So if you wish to rotate the wall around Position1 you'd
first translate the wall to the origin, then rotate it, then
put it back at Position1.

object {
     ThisWall
     translate -Position1
     rotate y * Angle
     translate Position1
}


Post a reply to this message

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