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
                                                       
Rotating Camera 
Cyclic animation of the camera.
           

How to make an animated camera
We can animate the camera location as well as the look_at point and the angle of view!  

Example: Rotating Camera
// the rotating camera: ----------
camera {
  angle    35
  location <3.0 , 1.0 ,-20.0>
  right    x*image_width/image_height
  look_at  <-1.0 , 3.5, 5.0>
  rotate   <0,-360*(clock+0.10),0>
//---------------------- end of camera   
rotate 1

Scene description for POV-Ray 3.6 / 3.7:
"cam_rot1.ini" and
"cam_rot1.pov"

With some ups and downs:
#declare Jump_Start  = 0.5;
#declare Jump_Height = 7;
#if (clock < Jump_Start )
 #declare Camera_Y = 1.00;
#else
 #declare Camera_Y = 1.00
   + Jump_Height*
     0.5*(1-cos(4*pi*(clock-Jump_Start)));
#end

camera {
 angle 38
 location <3,Camera_Y,-20>
 right x*image_width/image_height
 look_at <-3,3,5>
 rotate<0,-360*(clock+0.1),0>
} //------------------- end of camera

Attention: Don't look vertically with the camera!
    Don't put 'location' right over or below 'look_at'!
    In such positions the direction of the camera view
    is flipping uncontrollable!
rotate 1


For another interesting examples on the animation of camera take a look at the POV-Ray subdirectory "scenes\animationamera2".
top

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