POV-Ray : Newsgroups : povray.advanced-users : math quiz : math quiz Server Time
30 Jul 2024 08:29:01 EDT (-0400)
  math quiz  
From: Sigmund Kyrre Ås
Date: 7 Dec 1999 15:29:34
Message: <384D6DDA.51142915@stud.ntnu.no>
Any idea how I can rotate a torus for instance so it's aligned with a
vector? This doesn't quite do the trick, but illustrates what I'm after
(and how stupid I am):

rotate
   x*degrees(atan2(n.z,n.y))+
   y*degrees(atan2(n.x,n.z))+
   z*degrees(atan2(n.x,n.y))

Where n would be the new "normalvector" for the torus.

sig


Post a reply to this message

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