POV-Ray : Newsgroups : povray.advanced-users : How to convert normal-vector into rotation-vector Server Time
28 Jul 2024 16:17:40 EDT (-0400)
  How to convert normal-vector into rotation-vector (Message 1 to 3 of 3)  
From: Joerg Schrammel
Subject: How to convert normal-vector into rotation-vector
Date: 27 Jun 2004 06:29:06
Message: <40dea172$1@news.povray.org>
Hi,

I'm using trace() to calculate positions of objects in a landscape 
(heightfield ).
Now i'd like to use the normal of the object (returned into the fourth 
parameter of the trace function) to rotate the object before placing it 
onto the landscape.

How can i convert a normal-vector into a rotation-vector?
Sounds easy but i havn't any clue how to do it.
Maybe someone can help ?

Bye


Post a reply to this message

From: Christoph Hormann
Subject: Re: How to convert normal-vector into rotation-vector
Date: 27 Jun 2004 07:45:02
Message: <cbmbr1$3tt$1@chho.imagico.de>
Joerg Schrammel wrote:
> Hi,
> 
> I'm using trace() to calculate positions of objects in a landscape 
> (heightfield ).
> Now i'd like to use the normal of the object (returned into the fourth 
> parameter of the trace function) to rotate the object before placing it 
> onto the landscape.
> 
> How can i convert a normal-vector into a rotation-vector?
> Sounds easy but i havn't any clue how to do it.
> Maybe someone can help ?

Have a look at Reorient_Trans() in transforms.inc.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 01 May. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Joerg Schrammel
Subject: Re: How to convert normal-vector into rotation-vector
Date: 27 Jun 2004 09:55:48
Message: <40ded1e4$1@news.povray.org>
thanks for the hint, it works great :-)



Christoph Hormann wrote:
> Joerg Schrammel wrote:
> 
>> Hi,
>>
>> I'm using trace() to calculate positions of objects in a landscape 
>> (heightfield ).
>> Now i'd like to use the normal of the object (returned into the fourth 
>> parameter of the trace function) to rotate the object before placing 
>> it onto the landscape.
>>
>> How can i convert a normal-vector into a rotation-vector?
>> Sounds easy but i havn't any clue how to do it.
>> Maybe someone can help ?
> 
> 
> Have a look at Reorient_Trans() in transforms.inc.
> 
> Christoph
>


Post a reply to this message

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