POV-Ray : Newsgroups : povray.general : Rotating an object : Re: Rotating an object Server Time
31 Jul 2024 06:13:48 EDT (-0400)
  Re: Rotating an object  
From: Bill Pragnell
Date: 5 Oct 2007 05:55:00
Message: <web.470609ce81b15673731f01d10@news.povray.org>
Ger <No.### [at] ThankYou> wrote:
> The wall is created at the origin, then rotated and then translated.
> Everything works okay except for the rotation angle.

I see two problems. Firstly, I think you should be using arc-tan, not
arc-sin (tan(a) = opposite/adjacent). Secondly, as you look along an axis,
negative rotation is clockwise, so I would use rotate -Angle*y.

If your wall is aligned on the z-axis, you will get a division by zero
error, which will need to be trapped. You will also need to modify this
technique if position2 is in the 2nd, 3rd or 4th quadrants relative to


Hope that helps
B


Post a reply to this message

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