POV-Ray : Newsgroups : povray.general : From a normal to an angle? : Re: From a normal to an angle? Server Time
31 Jul 2024 22:14:51 EDT (-0400)
  Re: From a normal to an angle?  
From: Kenneth
Date: 9 Sep 2006 03:40:01
Message: <web.45026de32c8bed1cee7c01140@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Tim McMurdo <jod### [at] wohrrcom> wrote:
> > I am trying to determine the location and rotation of the object after it is
> > place on the ship's deck.
>
>   It might be easier to use the functions in transforms.inc. They do all
> the hard work for you.
>
> --
>                                                           - Warp

As Warp says, there are REALLY useful rotators and such in transforms,inc.
......although the descriptions of what they do can be a bit difficult to
understand at first. The one I like to use, for what you're trying to
achieve, is Point_At_Trans. It can take an object made at the origin in the
normal way (y-axis pointing up), and whirl the object's y-axis around to
meet a traced normal. I.e., Point_At_Trans (norm). Great for sticking
spiky things onto heightfields! Place it in your code where you would
put a typical rotate command.

Ken W.


Post a reply to this message

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