POV-Ray : Newsgroups : povray.newusers : animations Server Time
15 Oct 2024 02:35:56 EDT (-0400)
  animations (Message 1 to 5 of 5)  
From: Julia
Subject: animations
Date: 29 Nov 2020 08:35:01
Message: <web.5fc3a28294e603705dacea1d0@news.povray.org>
Hi,
Im making an animation of the earth and the moon rotating.
I cant make the moon spin around the earth and i dont know where is the problem

#include "colors.inc"

camera {
        location <5,10,-25>
        look_at <0,0,0>
        angle 15
        }
light_source {
        <0,0,0> , Yellow

      }

// słońce

sphere {
        <0,0,0>, 3
   pigment {
        bozo
                turbulence 5
         color_map {
         [0.0 color <1,0,0>]
         [0.25 color <1,1,0>]
         [1.0 color <1,0.65,0>]
         }
      scale 3
     }
   finish {ambient 1.0}

   scale 1/6


 }


 // księżyc

#declare k =
sphere {
        <18,0,0>, 1
   pigment {
        granite
                turbulence 1.4
         color_map {
         [0.0 color <1,1,1>]
         [0.10 color <.5,.5,.5>]
         [1.0 color <.8,.8,.8>]
         }
      scale 2
     }
   finish {ambient 1.0}

   scale 1/6


 }


 //ziemia

#declare kk =
 sphere {
        <14,0,0>, 1.5
   pigment {
        agate
                turbulence 1.5
         color_map {
         [0.0 color <1,1,1>]
         [0.10 color <0,0.5,0>]
         [1.0 color <0,0,1>]
         }
      scale 2
     }
   finish {ambient 1.0}

   scale 1/6


 }


 union {
 object   { kk

        }

 object { k

        }
      }

 that is all i got so far, i hope somebody got an idea what i can do :))


Post a reply to this message

From: Bald Eagle
Subject: Re: animations
Date: 29 Nov 2020 16:20:06
Message: <web.5fc41065bec250e1f9dae300@news.povray.org>
"Julia" <nomail@nomail> wrote:
> Hi,
> Im making an animation of the earth and the moon rotating.
> I cant make the moon spin around the earth and i dont know where is the problem

All of your rotate command will be rotating your objects around the origin.
So if your object is AT the origin, then all you do is spin it in place.

In its simplest form:

If you want to take a sphere and spin it, it has to be spun around its axis AT
the origin, then translated to it's orbital distance, and then rotated around
the origin again to move it around its orbital path.


Post a reply to this message

From: Alain Martel
Subject: Re: animations
Date: 29 Nov 2020 18:17:19
Message: <5fc42bff$1@news.povray.org>
Le 2020-11-29 à 08:32, Julia a écrit :
> Hi,
> Im making an animation of the earth and the moon rotating.
> I cant make the moon spin around the earth and i dont know where is the problem
> 

As bald Eagle mentioned, all rotations are always relative to the 
origin. The same also apply to any scaling.

First, model your Earth at the origin.
Next, make it rotate on itself for the days animation, THEN apply the 
axial tilt.
Next, model your Moon at the desired distance. You then make it orbit 
the Earth with a single rotation. Here again, apply a rotation to 
emulate the lunar orbital tilt.
Finally, use a light source with the parallel attribute to simulate the 
Sun at some distance. I recommend placing it at around twice the 
distance to the Moon. The parallel attribute simulate a light source 
located at an infinite distance.
Rotate that light to simulate the relative motion of the Earth around 
the Sun.


Post a reply to this message

From: Julia
Subject: Re: animations
Date: 30 Nov 2020 11:40:01
Message: <web.5fc51f6ebec250e5dacea1d0@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
> Le 2020-11-29 à 08:32, Julia a écrit :
> > Hi,
> > Im making an animation of the earth and the moon rotating.
> > I cant make the moon spin around the earth and i dont know where is the problem
> >
>
> As bald Eagle mentioned, all rotations are always relative to the
> origin. The same also apply to any scaling.
>
> First, model your Earth at the origin.
> Next, make it rotate on itself for the days animation, THEN apply the
> axial tilt.


It works now. Thanks


Post a reply to this message

From: Kenneth
Subject: Re: animations
Date: 7 Dec 2020 14:05:01
Message: <web.5fce7c16bec250ed98418910@news.povray.org>
"Julia" <nomail@nomail> wrote:
>
> It works now. Thanks

Good to hear!

Try not to get frustrated when you don't understand why something is not working
as you expected; we have ALL been through that situation, time and again. Many
of us here have been working with POV-ray for YEARS-- and there are still lots
of things that we either don't know or have to discover by experimenting, or by
reading what others have done. The program is like a giant 'toolbox', with code
tools to do almost anything ;-)


Post a reply to this message

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