POV-Ray : Newsgroups : povray.animations : rotation and orbit ? : Re: rotation and orbit ? Server Time
28 Jul 2024 14:28:54 EDT (-0400)
  Re: rotation and orbit ?  
From: Ken
Date: 22 Jan 2000 11:40:43
Message: <3889DCD6.6CA75E8B@pacbell.net>
dcc wrote:
> 
> I've managed to make animation of a rotating sphere. What I really want to
> do is rotate a sphere on it's axis while it orbits another rotating sphere.
> Generally I export the scene out of Moray and animate in POV-ray, if that
> makes a difference.
> 
> I am hopeful someone can post an example of what the code would look like
> for such a scene.
> 
> Thanks
> 
> dan

 This is really very simple. The sphere that you want spinning and orbiting
needs to have it's spin applied before it is translated out to it's orbiting
position. The first sphere is the one that spins only on it's axis. The
second will spin on it's axis and orbit the first sphere.

sphere { 0, 1
  rotate y*360*clock
   pigment { checker color x*1 color z*1 scale .5 }
}

sphere { 0, 1
 rotate y*360*clock
  translate x*4
   rotate y*360*clock
    pigment { checker color x*1 color rgb 1 scale .5 }
}

  This very simple example shows how to make it spin one time on it's
axis and also rotate one time around the center sphere for one full
clock cycle. You just need to adjust the degrees rotation and the
direction you want it to orbit for the scene you are designing.


-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

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