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

Straight Moving Camera without Rapport
If we simply move the camera points of location and look_at,
it may look like show in the first image at the right side.

// straight moving camera: ----------
#declare Move = 1.5 * clock;
camera{
  location < 4, 3, -6 +Move >
  right    x*image_width/image_height
  look_at  < 0, 0 , 0 +Move >
  angle    45
} //---------------------- end of camera
Straight Moving Camera with Rapport
For a good smooth run of a cyclic animation, we have to
respect the rapport distance of a scene.
(See adjacent image: orange marking!)
Here we use the distance (from middle to middle) of the
stripes on the street. The center lines where defined by:
union{ // center lines
 #local Nr = -500;   // start
 #local EndNr = 500; // end
 #while (Nr < EndNr)
 box{ <-0.1, 0, 0>,< 0.1,0.0015, 1.50>
      texture{ pigment{ color rgb<1,1,1>}
               finish { phong 0.5}
             } // end of texture
      translate<0,0,Nr*3.00>}
 #local Nr = Nr + 1;  // next Nr
 #end // --------------- end of loop
} //---------------------- end of union
So we need to chose as rapport distance of 3.00
or any integer multiple of this:
// straight moving camera: ----------
#declare Move = 3.00 * clock;
camera{
  location < 4, 3, -6 +Move >
  right    x*image_width/image_height
  look_at  < 0, 0 , 0 +Move >
  angle    45
} //---------------------- end of camera
Moving camera no rapport
Moving camera without rapport.
Annoying jerking!
Moving camera rapport
Rapport distance for a cyclic animation.
Moving camera with rapport
Moving camera with rapport.
Scene description and ini file
for POV-Ray 3.6 / 3.7:

"Moving_camera_1_.ini" and
"Moving_camera_1_.pov"


A variation - a little bit extended:
Moving camera with rapport
Moving camera and trucks.
Scene description and ini file
for POV-Ray 3.6 / 3.7:

"Moving_camera_n_truck_.ini"
"Moving_camera_n_truck_.pov"
This scene needs the include file
Truck_12.inc from Trucks.

Camera with Rapport to Railtracks
Here with railtracks from my include file set
Rail Track System for POV-Ray "RT_System.zip"

With the railtrack there are defined the ties per meter:
object{ RT_Track_Straight_00(
         100*2/3, // track length
         1.5 , // ties per meter
         ) //-----------------------//
         translate<-5.00,0.00, 0.00>
       } //-------------------------//
So we can use a length of 1/(ties per meter) = 2/3 (m)
or any integer multiple as a valid rapport distance for a
cyclic animation:

#declare Move = 1/1.5 * clock;
camera{
  location < 4, 3, -6 +Move >
  right    x*image_width/image_height
  look_at  < 0, 0 , 0 +Move >
  angle    45
} //-------------------- end of camera
Moving camera over railtacks
Moving camera over railtacks.


Scene description and ini file
for POV-Ray 3.6 / 3.7:

"Moving_camera_2_.ini" and
"Moving_camera_2_.pov".
This scene needs the railtracks
from my include file set
Rail Track System for POV-Ray


top

© Friedrich A. Lohmüller, 2013
www.f-lohmueller.de