POV-Ray : Newsgroups : povray.advanced-users : rotating parallel to surface normal Server Time
29 Jul 2024 02:25:00 EDT (-0400)
  rotating parallel to surface normal (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Doug Eichenberg
Subject: Re: rotating parallel to surface normal
Date: 2 Aug 2003 10:38:10
Message: <3f2bccd2$1@news.povray.org>
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 Eichenberg
www.getinfo.net/douge
dou### [at] nlsnet


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: rotating parallel to surface normal
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

From: Doug Eichenberg
Subject: Re: rotating parallel to surface normal
Date: 5 Aug 2003 21:42:49
Message: <3f305d19$1@news.povray.org>
Funny how a seemingly difficult problem turns out so easily solved with one
little line :P

--
Douglas C. Eichenberg
dou### [at] nlsnet
http://www.getinfo.net/douge


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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