POV-Ray : Newsgroups : povray.general : Rotation to Normal Vector help Server Time
15 Nov 2024 07:12:41 EST (-0500)
  Rotation to Normal Vector help (Message 1 to 4 of 4)  
From: Leo
Subject: Rotation to Normal Vector help
Date: 5 Nov 2004 14:05:00
Message: <web.418bce1ed18cb197b78c017a0@news.povray.org>
Hello-

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.

I have tried many approaches, but none are giving the result I want.  Can
anyone help?

Thanks,
Leo


Leo Bleicher
http://porterbleicher.g2gm.net/computed-paintings.htm


Post a reply to this message

From: Tim Nikias
Subject: Re: Rotation to Normal Vector help
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

From: Warp
Subject: Re: Rotation to Normal Vector help
Date: 5 Nov 2004 15:58:25
Message: <418be971@news.povray.org>
Leo <kapleo_at_pacbell.net> wrote:
> I have tried many approaches, but none are giving the result I want.  Can
> anyone help?

  Look at the documentation about transforms.inc in the POV-Ray
documentation.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Leo
Subject: Re: Rotation to Normal Vector help
Date: 5 Nov 2004 17:00:00
Message: <web.418bf7b6c5347800b78c017a0@news.povray.org>
Thank you.  That has solved my problem nicely.

 Leo


 Leo Bleicher
 http://porterbleicher.g2gm.net/computed-paintings


Post a reply to this message

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