POV-Ray : Newsgroups : povray.animations : rotation and orbit ? Server Time
24 Nov 2024 14:01:12 EST (-0500)
  rotation and orbit ? (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: dcc
Subject: rotation and orbit ?
Date: 22 Jan 2000 10:54:24
Message: <3889d2b0@news.povray.org>
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


Post a reply to this message

From: Ken
Subject: Re: rotation and orbit ?
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

From: Ken
Subject: Re: rotation and orbit ?
Date: 22 Jan 2000 12:33:48
Message: <3889E946.125F929C@pacbell.net>
Bob Hughes wrote:
> 
> Here's my example, and only an example.  It's simplistic really,

You call that simplistic ?

Bob, you have become a declare freak and might want to seek professional
help soon.

<G>

-- 
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

From: dcc
Subject: Re: rotation and orbit ?
Date: 22 Jan 2000 13:36:52
Message: <3889f8c4@news.povray.org>
Thanks ken,

this is what i endeded up with that seems to work. I imagine the axis are
different then your example because of the left/right handeness thing
between pov-ray and moray. Or maybe not. I am clearly a novice.

sphere { // Jupiter_Sphere
  <0,0,0>,1
  material {
    Jupiter_Tex
  }
  scale 40.0
  rotate -360.0*z*clock
}
sphere { // Callisto__sphere
  <0,0,0>,1
  material {
    Moon_Tex
    }
  scale 4.8
   rotate -360.0*y*clock
  translate  50.0*x
   rotate z*-360*clock
}


Ken wrote in 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

From: Bob Hughes
Subject: Re: rotation and orbit ?
Date: 22 Jan 2000 15:02:45
Message: <388a0ce5@news.povray.org>
The method is simplistic, yes.  Putting a working (ha, yeah sure) example in was
probably a mistake, it was flawed the second time too.  Here's the corrected (?)
one:

light_source { <0,0,-500> color rgb <1.5,1.5,1.5>
}
camera
{
  location  <-5,5,-15>
  angle 25
  look_at   <0,-.5,0>
}

// approximations of Earth/Moon system (only a guess)
#declare NS1=<0,0,24>; // axial tilts [z here]
#declare NS2=<0,0,13>; // orbital inclination [11 degrees diff.?]
#declare OrbitPos1=<-.1,0,0>; // orbital distances (not real)
#declare OrbitPos2=<3,0,0>; // orbital distance [x here]
#declare Diam1=1; // sizes (not real)
#declare Diam2=.25;
#declare Rotate1=<0,28,0>; // days (not real) multiply this by Revolve#
#declare Rotate2=<0,1,0>; // orbit-coupled with Revolve#
#declare Revolve1=<0,1,0>; // orbits; same as Rotate2 (orbit-coupled)
#declare Revolve2=<0,1,0>; // [y is up coordinates]

/*
#declare PlanetTex1=texture {pigment {marble turbulence 1
        color_map {[.33,.5 color rgb <0,1,0> color rgb <0,0,1>]}
         } rotate 90*z}
#declare MoonTex1=texture {pigment {spotted turbulence 1
        color_map {[.2,.25 color rgb <.5,.5,.5> color rgb <1,1,1>]}
         } scale .5}
*/
#declare PlanetTex1=
 texture {pigment {radial frequency 12 // longitudinal lines
        color_map {[.1,.2 color rgbt <0,1,1,0> color rgbt <0,0,1,1>]}
         } scale 1} // 1 unit so already scaled ok
 texture {pigment {gradient y frequency 6 // latitudinal lines
        color_map {[.1,.2 color rgbt <0,1,1,0> color rgbt <0,0,1,1>]}
         } scale 1} // 1 unit so already scaled ok

#declare MoonTex1=
 texture {pigment {radial frequency 4 // longitudinal lines
        color_map {[.1,.2 color rgbt <1,1,1,0> color rgbt <0,0,0,1>]}
         } scale .25} // scale to fit
 texture {pigment {gradient y frequency 2 // latitudinal lines
        color_map {[.1,.2 color rgbt <1,1,1,0> color rgbt <0,0,0,1>]}
         } scale .25} // scale to fit

#declare RotatingRevolvingSphere1=
 sphere {0,Diam1
        texture {PlanetTex1} // texture placed before movement
         rotate -360*Rotate1*clock rotate NS1 // axial tilt
          rotate 360*Revolve1*clock // counter-turn of orbit
         translate OrbitPos1 // needs to be opposite of other
           rotate -360*Revolve1*clock
          rotate NS2 // yes, NS2 here too, orbital tilt (E&M)
            } // orbit

#declare RotatingRevolvingSphere2=
 sphere {0,Diam2
        texture {MoonTex1} // texture placed before movement
         rotate -360*Rotate2*clock rotate 0 // axial tilt
          rotate 360*Revolve2*clock // counter-turn of orbit
         translate OrbitPos2 // needs to be opposite of other
           rotate -360*Revolve2*clock
          rotate NS2 // orbital tilt (E&M)
           } // orbit

object {RotatingRevolvingSphere1}
object {RotatingRevolvingSphere2}


Maybe I can get the second reply cancelled as well, it isn't good, and I'm not
saying this will be right either.  Best to render 100 frames at 320x240 res. to
check it out.

Bob

"Ken" <tyl### [at] pacbellnet> wrote in message
news:3889E946.125F929C@pacbell.net...
|
|
| Bob Hughes wrote:
| >
| > Here's my example, and only an example.  It's simplistic really,
|
| You call that simplistic ?
|
| Bob, you have become a declare freak and might want to seek professional
| help soon.
|
| <G>
|
| --
| 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

From: dcc
Subject: Re: rotation and orbit ?
Date: 22 Jan 2000 15:15:41
Message: <388a0fed@news.povray.org>
thanks.

I have kinda gone in this direction. It is easier for me understand what is
happening. But i'll keep yours as a reference for when I'm more versed in in
pov-ray.

sphere { // Jupiter_Sphere
  <0,0,0>,1
  material {
    Jupiter_Tex
  }
  scale 40.0
  rotate 360*z*clock
}

sphere { // Io_sphere
  <0,0,0>,1
  material {
    Io
  }
  scale 3.36
  rotate 1080*z*clock
  translate  422.0*y
  rotate 1440*z*clock
}

sphere { // Europa_sphere
  <0,0,0>,1
  material {
    Europa_Tex
  }
  scale 3.138
  rotate 720*z*clock
  translate  528.0*x
  rotate 1080*z*clock
}


sphere { // Ganymede_sphere
  <0,0,0>,1
  material {
    Ganymede_Tex
  }
  scale 5.256
  rotate 720*z*clock
  translate  928.0*x
  rotate 720*z*clock
}


sphere { // Callisto__sphere
  <0,0,0>,1
  material {
    Callisto_Tex
  }
  scale 4.8
  rotate 360*z*clock
  translate  1741.0*x
  rotate 720*z*clock
}

Bob Hughes wrote in message <388a0ce5@news.povray.org>...
>The method is simplistic, yes.  Putting a working (ha, yeah sure) example
in was
>probably a mistake, it was flawed the second time too.  Here's the
corrected (?)
>one:
>
>light_source { <0,0,-500> color rgb <1.5,1.5,1.5>
>}
>camera
>{
>  location  <-5,5,-15>
>  angle 25
>  look_at   <0,-.5,0>
>}
>
>// approximations of Earth/Moon system (only a guess)
>#declare NS1=<0,0,24>; // axial tilts [z here]
>#declare NS2=<0,0,13>; // orbital inclination [11 degrees diff.?]
>#declare OrbitPos1=<-.1,0,0>; // orbital distances (not real)
>#declare OrbitPos2=<3,0,0>; // orbital distance [x here]
>#declare Diam1=1; // sizes (not real)
>#declare Diam2=.25;
>#declare Rotate1=<0,28,0>; // days (not real) multiply this by Revolve#
>#declare Rotate2=<0,1,0>; // orbit-coupled with Revolve#
>#declare Revolve1=<0,1,0>; // orbits; same as Rotate2 (orbit-coupled)
>#declare Revolve2=<0,1,0>; // [y is up coordinates]
>
>/*
>#declare PlanetTex1=texture {pigment {marble turbulence 1
>        color_map {[.33,.5 color rgb <0,1,0> color rgb <0,0,1>]}
>         } rotate 90*z}
>#declare MoonTex1=texture {pigment {spotted turbulence 1
>        color_map {[.2,.25 color rgb <.5,.5,.5> color rgb <1,1,1>]}
>         } scale .5}
>*/
>#declare PlanetTex1=
> texture {pigment {radial frequency 12 // longitudinal lines
>        color_map {[.1,.2 color rgbt <0,1,1,0> color rgbt <0,0,1,1>]}
>         } scale 1} // 1 unit so already scaled ok
> texture {pigment {gradient y frequency 6 // latitudinal lines
>        color_map {[.1,.2 color rgbt <0,1,1,0> color rgbt <0,0,1,1>]}
>         } scale 1} // 1 unit so already scaled ok
>
>#declare MoonTex1=
> texture {pigment {radial frequency 4 // longitudinal lines
>        color_map {[.1,.2 color rgbt <1,1,1,0> color rgbt <0,0,0,1>]}
>         } scale .25} // scale to fit
> texture {pigment {gradient y frequency 2 // latitudinal lines
>        color_map {[.1,.2 color rgbt <1,1,1,0> color rgbt <0,0,0,1>]}
>         } scale .25} // scale to fit
>
>#declare RotatingRevolvingSphere1=
> sphere {0,Diam1
>        texture {PlanetTex1} // texture placed before movement
>         rotate -360*Rotate1*clock rotate NS1 // axial tilt
>          rotate 360*Revolve1*clock // counter-turn of orbit
>         translate OrbitPos1 // needs to be opposite of other
>           rotate -360*Revolve1*clock
>          rotate NS2 // yes, NS2 here too, orbital tilt (E&M)
>            } // orbit
>
>#declare RotatingRevolvingSphere2=
> sphere {0,Diam2
>        texture {MoonTex1} // texture placed before movement
>         rotate -360*Rotate2*clock rotate 0 // axial tilt
>          rotate 360*Revolve2*clock // counter-turn of orbit
>         translate OrbitPos2 // needs to be opposite of other
>           rotate -360*Revolve2*clock
>          rotate NS2 // orbital tilt (E&M)
>           } // orbit
>
>object {RotatingRevolvingSphere1}
>object {RotatingRevolvingSphere2}
>
>
>Maybe I can get the second reply cancelled as well, it isn't good, and I'm
not
>saying this will be right either.  Best to render 100 frames at 320x240
res. to
>check it out.
>
>Bob
>
>"Ken" <tyl### [at] pacbellnet> wrote in message
>news:3889E946.125F929C@pacbell.net...
>|
>|
>| Bob Hughes wrote:
>| >
>| > Here's my example, and only an example.  It's simplistic really,
>|
>| You call that simplistic ?
>|
>| Bob, you have become a declare freak and might want to seek professional
>| help soon.
>|
>| <G>
>|
>| --
>| 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

From: Lutz Kretzschmar
Subject: Re: rotation and orbit ?
Date: 23 Jan 2000 13:21:38
Message: <3890466c.5820028@194.174.214.110>
Hi dcc, you recently wrote in povray.animations:

> Generally I export the scene out of Moray and animate in POV-ray, if that
> makes a difference.
You may want to take a look at the animation plugin that works with
the latest version of Moray. Then you won't have to work in both GUI
and non-GUI environments.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: dcc
Subject: Re: rotation and orbit ?
Date: 23 Jan 2000 22:27:24
Message: <388bc69c@news.povray.org>
Thanks Lutz

I did take a look at the animation plugin for the new moray beta but I
couldn't easily figure out how to automate the rotation aspects.


Lutz Kretzschmar wrote in message <389### [at] 194174214110>...
>Hi dcc, you recently wrote in povray.animations:
>
>> Generally I export the scene out of Moray and animate in POV-ray, if that
>> makes a difference.
>You may want to take a look at the animation plugin that works with
>the latest version of Moray. Then you won't have to work in both GUI
>and non-GUI environments.
>
>- Lutz
>  email : lut### [at] stmuccom
>  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Andrea Ryan
Subject: Re: rotation and orbit ?
Date: 23 Jan 2000 23:32:14
Message: <388BD2E8.58786EEB@global2000.net>
What if the orbit is tilted?  The orbit of the Moon is tilted about 5.145
degrees.  Would that be incorporated if the Moon is rotated on its axis, tilted
over a little, translated, rotated 5.145 degrees and revolved around the
Earth?  What if a elliptical orbit is desired?
Brendan Ryan

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


Post a reply to this message

From: dcc
Subject: Re: rotation and orbit ?
Date: 23 Jan 2000 23:54:10
Message: <388bdaf2@news.povray.org>
All good questions. I haven't attempted any tilts or an ellipse orbit. The
tilt seems simple, but the orbit may involve a spline path or something. I
don't know if that can be done in moray.

this is as far as I have gotten.

http://www.cornillot.com/graphics.htm

dcc
Andrea Ryan <ary### [at] global2000net> wrote in message
<388BD2E8.58786EEB@global2000.net>...
> What if the orbit is tilted?  The orbit of the Moon is tilted about 5.145
> degrees.  Would that be incorporated if the Moon is rotated on its axis,
tilted
> over a little, translated, rotated 5.145 degrees and revolved around the
> Earth?  What if a elliptical orbit is desired?
> Brendan Ryan


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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