POV-Ray : Newsgroups : povray.advanced-users : rotating parallel to surface normal : Re: rotating parallel to surface normal Server Time
29 Jul 2024 04:21:23 EDT (-0400)
  Re: rotating parallel to surface normal  
From: Tor Olav Kristensen
Date: 2 Aug 2003 19:44:03
Message: <pan.2003.08.02.23.48.21.886655@THISSHOULDBEREMOVEDhotmail.com>
On Sat, 02 Aug 2003 10:42:38 -0700, Doug Eichenberg wrote:
>For those who are curious, here's how I ended up doing this.  The object to
>be rotated is centered on the origin, and lies along the positive y-axis in
>an "up" direction.  The surface normal to be aligned to is stored as a
>vector called Norm.
>
>Reorient_Trans(<0,1,0>, <Norm.x, Norm.y, Norm.z>)
>
>Thats it, nice and simple :P  All the hard work was done by the author of
>the macro.

Doug, you could even write it like this:

Reorient_Trans(y, Norm)


Tor Olav


Post a reply to this message

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