Home
- 3D Animations Gallery
- POV-Ray Tutorial
3D Animation Tutorial
Index of Content
0. Basic Knowledge
1. Basic Example
2. Example 2
3. Images to Animated Gif
4. From Images to Video
5. Basic Terms
6. Animation Commands
I. Cyclic Animations
1. Rotating Objects
> 1.2. Planets in Orbit
1.3. Clock Animation
2. Rotating Camera
2.1. Straight Moving Camera
3. Western Wheel
Problem
3.1. Rolling Wheels
4. Gears
4.1. Roller Chain
4.2. Bike Chain
5. Swinging Pendulum
5.1. Newton's Cradle
5.2: Rock the Rocker
6. Spiral Pendulum
7. Coupling Rods
7.1. Connecting Rods
8. Psychedelic + Op-Art
9. Counters + Countdowns
10. Folding of a Cube
II. Non-linear Movements
1.0 Speed Up/Slow Down 1
1.1 Speed Up/Slow Down 2
2. Fall + Bounce
3. Acceleration by
physical Formulas
4. Speed Controll by
Spline Functions
III. Animation Paths with Spline Curves
1. Spline Curves
2. Closed Splines
3. Animation Paths
|
|
Planets in Orbit
About objects, which rotate around other objects.
Cyclic animation with sun, earth and moon. |
|
|
The Dimensions of the Planets:
#declare Moon_Orbit_Radius = 4;
#declare Earth_Orbit_Radius = 16;
//--------------------------------
#declare Moon_Radius = 0.7;
#declare Earth_Radius = 2.0;
#declare Sun_Radius = 3;
//-------------------------------- |
Earth, Moon and Sun:
#declare Moon =
sphere{ <0,0,0>,Moon_Radius
texture{ ... }}
#declare Earth =
sphere{ <0,0,0>,Earth_Radius
texture{ ... }}
#declare Sun =
light_source{ <0,0,0>
color rgb<0,0,0>
looks_like{
sphere{ <0,0,0>,Sun_Radius
texture{ pigment{ ... }
finish{ ambient 1,
diffuse 0}
} // end of texture
} // end of sphere
} // end of looks_like
} // end of light_source
//-------------------------------- |
|
Earth, Moon and Sun
The moon casts shadows:
eclipse of the sun.
|
The angles of rotation
depend of the time:
#declare Time = clock + 0.00;
// Time = 0 to 1 in one year !!!
#declare Earth_around_Sun_Rotation
= 360*Time; // 1 turn per year
#declare Moon_around_Earth_Rotation
= 360*Time*12; //12 months!!!
#declare Earth_Rotation
= 360*Time*360; // ~ 365 days !!!
//-------------------------------- |
|
The earth casts shadows:
eclipse of the moon.
|
The motion of the moon around the earth,
and of Earth+Moon around the sun:
//-----------------------------------------------------------
union{ // Earth + Moon
object{ Earth
rotate <0,Earth_Rotation,0>
} // end Earth
object{ Moon
translate <Moon_Orbit_Radius,0,0>
rotate <0,Moon_around_Earth_Rotation,0>
} // end Moon
// then both (as a union) moveded
// by Earth_Orbit_Radius away (in +x)
translate <Earth_Orbit_Radius,0,0>
// and let them rotate around the sun
rotate <0,Earth_around_Sun_Rotation,0>
} // end of union of "Earth + Moon"
object { Sun }
//----------------------------------------------------------- |
|
|
|
|
|
|
|
|