POV-Ray : Newsgroups : povray.newusers : Calculating rotation from normal : Re: Calculating rotation from normal Server Time
28 Jul 2024 16:31:10 EDT (-0400)
  Re: Calculating rotation from normal  
From: Tim Attwood
Date: 19 Jul 2008 23:57:37
Message: <4882b7b1$1@news.povray.org>
> Sorry to post twice in a row. I hope I'm not being annoying... :-) I'm 
> just
> really stuck, and I'm sure there's an easy answer, but I can't figure it 
> out.
>
> I have 1) a point in a mesh and 2) a user-defined object created at the 
> origin.
> I want to be able to orient the object perpendicular to the mesh surface 
> at the
> known point. I know the normal, but I cannot figure out to calculate the
> rotation for the object. Can I use the normal to orient the object, or am 
> I
> just way off in figuring out how to do this?

NP, post away =)

There are some macros for this sort of stuff in "transforms.inc",
like...
object { foo
   Point_At_Trans(myNormal)
}


Post a reply to this message

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