|
![](/i/fill.gif) |
Let's say I have an object "A" at the origin, and a known surface normal
<x,y,z>. I want to find the rotation vector <Rx,Ry,Rz> of the surface
normal <x,y,z>, such that when I rotate "A":
object{ A rotate<Rx,Ry,Rz> }
it lies along the surface normal.
I tried doing this as follows:
object{ A rotate<atan2d(Norm.y,Norm.z), atan2d(Norm.x,Norm.z),
atan2d(Norm.x,Norm.y)>
but I seem to be getting strange results.
Anyone have code they used for doing this? Or know how in general?
Thanks for the help.
--
Doug Eichenberg
www.getinfo.net/douge
dou### [at] nls net
Post a reply to this message
|
![](/i/fill.gif) |