Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    3D Animations with POV-Ray
        Some basics and examples on animations.
Italiano Italiano
Français français
Deutsch Deutsch
- 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
     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

Animations with Spline Curves

Spline curves used as animation pfaths
and the Spline_Trans Makro made by Rune S. Johansen.

Spline Curves as Animation Pfaths: To let an object fly along a spline curve defined by a spline i.e. called "Spline_1(..)" is not the problem:
We just use the simple statement "translate Spline_1(clock)"
sphere{ <0,0,0>, 0.25
                 pigment{ color Red}
                 finish { diffuse 0.9
                          phong 1}
               } // end of texture
   translate Spline_1(clock) //<--!!
}  // end of sphere -------------

131 kB - spline_flyc.gif

complete scene description for POV-Ray:
"spline_fly1.ini" and

The Spline_Trans Makro
made by Rune S. Johansen
The Orientation of objects along a spline curve

A special problem causes the adaption of the orientation of an object to a spline curve used as animation pfath. The question: How can we bring an airplane on a spline curve in a manner that its turning correctly in the right direction?

The perfect solution of this problem brings the Spline_Trans Makro made by Rune S. Johansen.
This is a feature of POV-Ray!
For using this macro we need to include the include file by:

#include ""
(Note: this includes also "")

Now we need our flying object being definded in flight direction +z.

spline fly
complete scene description for POV-Ray:
"spline_fly1.ini" file and "spline_fly1.pov" file

Syntax of this macro: (See also in the text of ""!)
Spline_Trans(SplineName, TimeValue, Upwards, ForeSight, Banking)
Die Parameter im einzelnen:
SplineName = The name of the used spline function.
TimeValue = The time value to feed to the spline, i.e. "clock"
Upwards = The vector that is upwards in your scene, usually "y " or "<0,1,0>.
ForeSight = A positive value that controls how much in advance the object will turn and bank. Values close to 0 will give precise results, while higher values give smoother results. It will not affect parsing speed, so just find the value that looks best.
Banking = How much the object tilts when turning. The amount of tilting is equally much controlled by the ForeSight value.
object {My_Object Spline_Trans( My_Spline, clock, y, 0.05, 0.70)}

Fly Animation:
A Fly with sharp s-curves, screwing and looping!

128 kB - animation with spline curve

Air Race!

For another interesting examples on the animation with spline curves take a look at the POV-Ray subdirectory "scenes\animation\splinefollow"


© Friedrich A. Lohmüller, 20168