POV-Ray : Newsgroups : povray.general : rotation question Server Time
1 Nov 2024 02:21:35 EDT (-0400)
  rotation question (Message 1 to 5 of 5)  
From: sacrofts
Subject: rotation question
Date: 21 Sep 2000 16:35:48
Message: <39ca7124@news.povray.org>
Can anyone help?
If I have a sphere, and touching at any one point on that sphere I have 
another object, is there any way I could control the rotation of that 
object relative to the axis of the sphere's normal at that point?
For the image I'm working on, I have the radius of the sphere, the angle 
of the object from the 'north-pole' of the sphere, and the angle around 
the sphere measured from the positive x-axis.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: rotation question
Date: 21 Sep 2000 16:51:03
Message: <39ca74b7$1@news.povray.org>
In article <39ca7124@news.povray.org> , "sacrofts" 
<sac### [at] tinyonlinecouk> wrote:

> Can anyone help? If I have a sphere, and touching at any one point on that
> sphere I have another >object, is there any way I could control the rotation
> of that object relative >to the axis of the sphere's normal at that point? For
> the image I'm working on, I have the radius of the sphere, the angle of the
> object from the 'north-pole' of the sphere, and the angle around the sphere
> measured from the positive x-axis.

What you are looking for is the vaxis_rotate function.  You find it
explained in the documentation under:  Scene Description Language > Language
Basics > Vector Expressions > Vector Functions

The parameters in your case would be as follows (I think):

    vaxis_rotate(point, normal, degrees)


     Thorsten


Post a reply to this message

From: sacrofts
Subject: Re: rotation question
Date: 23 Sep 2000 03:45:55
Message: <39cc5fb3@news.povray.org>
Many thanks, found it.  worked a treat
Stephen

"Thorsten Froehlich" <tho### [at] trfde> wrote in message 
news:39ca74b7$1@news.povray.org...
> In article <39ca7124@news.povray.org> , "sacrofts" 
> <sac### [at] tinyonlinecouk> wrote:
> 
> > Can anyone help? If I have a sphere, and touching at any one point 
on that
> > sphere I have another >object, is there any way I could control the 
rotation
> > of that object relative >to the axis of the sphere's normal at that 
point? For
> > the image I'm working on, I have the radius of the sphere, the angle 
of the
> > object from the 'north-pole' of the sphere, and the angle around the 
sphere
> > measured from the positive x-axis.
> 
> What you are looking for is the vaxis_rotate function.  You find it
> explained in the documentation under:  Scene Description Language > 
Language
> Basics > Vector Expressions > Vector Functions
> 
> The parameters in your case would be as follows (I think):
> 
>     vaxis_rotate(point, normal, degrees)
> 
> 
>      Thorsten


Post a reply to this message

From: Matt Giwer
Subject: Re: rotation question
Date: 27 Sep 2000 21:22:30
Message: <39D29D62.7F31C366@ij.net>
sacrofts wrote:
> 
> Can anyone help?
> If I have a sphere, and touching at any one point on that sphere I have another
object, is there any way I could control the rotation of that object relative to the
axis of the sphere's normal at that point?
> For the image I'm working on, I have the radius of the sphere, the angle of the
object from the 'north-pole' of the sphere, and the angle around the sphere measured
from the positive x-axis.

	In line with KISS, presuming your main sphere is a 0,0,0 then put your
attached object there also and do its rotation there. Then rotate to the
desired orientation, then translate it to the attachment point. If the
main sphere is rotating, translate to the rotated position. (One of
those steps is likely out of order, it always is on my first cut.)


Post a reply to this message

From: sacrofts
Subject: Re: rotation question
Date: 28 Sep 2000 18:24:42
Message: <39d3c52a@news.povray.org>
Many thanks!
That did just the trick,  I didn't realize how important it is to get 
the rotations in the right order!!
the vaxis_rotate that was also suggested to me came in useful elsewhere.

Steve

> 
> In line with KISS, presuming your main sphere is a 0,0,0 then put your
> attached object there also and do its rotation there. Then rotate to 
the
> desired orientation, then translate it to the attachment point. If the
> main sphere is rotating, translate to the rotated position. (One of
> those steps is likely out of order, it always is on my first cut.)


Post a reply to this message

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