POV-Ray : Newsgroups : povray.general : Rotation to Normal Vector help : Re: Rotation to Normal Vector help Server Time
2 Aug 2024 10:20:29 EDT (-0400)
  Re: Rotation to Normal Vector help  
From: Tim Nikias
Date: 5 Nov 2004 15:35:19
Message: <418be407@news.povray.org>
> I am trying to cover a surface with discs (flattened spheres), such that
> each disc lies flat on the surface.  I have the normals at each point
> (thanks to Tim Nikias' Mesh-Maker-Macros), and need to know how to rotate
> my spheres (discs) so that they will be perpendicular to the normal at
each
> point.

Well, the normal should be the "up" vector of the disc, right?

What you could use <shameless plug> is my Look_At-Macro </shameless plug>
which returns the rotation vector needed to rotate the -z direction towards
the given position/vector. So
rotate Look_At(Insert_Normal)
should work when the top of the sphere/disc is facing -z.

There's also a macro called "Orient" or something within the
POV-Shipped-Includes, but I'm the self-made guy, so I can't help you much
with that...

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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