POV-Ray : Newsgroups : povray.general : vrotate implementation? : Re: vrotate implementation? Server Time
14 Aug 2024 01:16:28 EDT (-0400)
  Re: vrotate implementation?  
From: Twyst
Date: 28 Apr 1998 13:04:16
Message: <6i4utq$78h$1@oz.aussie.org>
Well, I understand vectors somewhat. I plan on doing a tutorial someday on
this... But for now, he's what I got:

Vrotate and vaxis_rotate

These both do much the same thing. they both rotate a given point.
 vrotate rotates the point around the origin, and is useful for doing
orbits, etc.
Example:

sphere { <0,0,0> 2 texture { Chrome_Metal } }
#declare Count = 0
#while (Count < 9 )
   #declare NewPoint=vrotate(<3,0,0>,<45*Count,0,0>)
   sphere { NewPoint,1 texture { Chrome_Metal pigment { Red } } }
   #declare Count = Count + 1
#end

This will make a sphere with 8 others around it in the x axis.

vaxis_rotate, on the other hand, lets you define an arbitrary axis , and
rotate the point around that.

vaxis_rotate is a little bit harder to understand.. (heh, I'm not sure if I
understand it!)
Attempt at an example:

sphere { <0,3,0> 2 texture { Chrome_Metal } }
#declare Count = 0
#while (Count < 9 )
   #declare NewPoint=vaxis_rotate(<5,0,0>,<1,1,0>,45*Count)
   sphere { NewPoint,1 texture { Chrome_Metal pigment { Red } } }
   #declare Count = Count + 1
#end


Twyst================================
EFnet and NewNet #povray Channel Operator
Website: http://www.geocities.com/~twystedmynd
E-Mail: twy### [at] v-wavecom
=====================================
Jason Foster aka Guido wrote in message <35456C9C.D946E883@wavetech.net>...
>Does anyone know of a simple or could give me a simple example of
>rotating lets say a sphere around a point using vrotate?  Thanx in
>advance...
>--
>        __________________________________________
>       /                                         /
>      /          Jason Foster, (Guido)          /
>     /                                         /
>    /   ICQ#:  7641872                        /
>   /   email:  anc### [at] wavetechnet         /
>  /  webpage:  www.wavetech.net/~ancient1   /
> /   phone #:  (612)623-4971               /
>/_________________________________________/


Post a reply to this message

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