POV-Ray : Newsgroups : povray.general : Object rotation to surface normal Server Time
2 Nov 2024 07:23:04 EDT (-0400)
  Object rotation to surface normal (Message 1 to 4 of 4)  
From: Thomas de Groot
Subject: Object rotation to surface normal
Date: 11 May 2004 08:31:45
Message: <40a0c7b1$1@news.povray.org>
I know this is a stupid question, but I just cannot solve it.
I want to place objects on a surface (heightfield or isosurface) with the
trace() function, but also rotate them parallel to the normal of the found
point on the surface. How do I do that? I know it is possible, but I am
unable to find the answer in the help documents.

Thanks for decreasing my stupidity!  ;-))

Thomas


Post a reply to this message

From: Warp
Subject: Re: Object rotation to surface normal
Date: 11 May 2004 09:09:19
Message: <40a0d07f@news.povray.org>
Use Reorient_Trans() from transforms.inc.

-- 
#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: Kurts
Subject: Re: Object rotation to surface normal
Date: 11 May 2004 13:34:53
Message: <kurtzlepirate-77C48E.19345111052004@news.povray.org>
In article <40a0c7b1$1@news.povray.org>,
 "Thomas de Groot" <t.d### [at] internlnet> wrote:

> I know this is a stupid question, but I just cannot solve it.
> I want to place objects on a surface (heightfield or isosurface) with the
> trace() function, but also rotate them parallel to the normal of the found
> point on the surface. How do I do that? I know it is possible, but I am
> unable to find the answer in the help documents.
> 
> Thanks for decreasing my stupidity!  ;-))
> 
> Thomas
> 
> 

take a look at "trace2.pov" in the folder "language" from the POVRay 3.5 Scenes


Post a reply to this message

From: Thomas de Groot
Subject: Re: Object rotation to surface normal
Date: 12 May 2004 02:47:02
Message: <40a1c866@news.povray.org>
Thank you both, Warp and Kurts!!
Reorient_Trans() did the trick for me!

Thomas


Post a reply to this message

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