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