Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
logo
    3D Animations with POV-Ray
        Some basics and samples 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 Sample
     2. From Images to Video
     3. Basic Terms
     4. Animation Commands
  I. Cyclic Animations
     1. Rotating Objects
     1.2. Planets in Orbit
     1.3. Clock Animation
     2. Rotating 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
     6. Spiral Pendulum
     7. Connecting Rods
     8. Psychedelic
        + Op-Art
     9. Counters
        + Countdowns
    10. Folding of a Cube
  II. Animation Paths
      with Spline Curves
     1. Spline Curves
     2. Animation Paths
                                           

Connecting Rods

Cyclic animation with sine and cosine function.
           


Connecting Rods:
By this motion the given values are the angle of rotation of the wheel "Wheel_angle", the radius of the point, where the connection rod is fixed at the wheel "C_radius" and the length of the connection rod "C_Rod_Len".
With this values we can calculate (see also the image below) the x and y values of the point where the connection rod is fixed at the wheel and the rotation angle of the connection rod
(Note: Sine and cosine in POV-Ray need the angle in radians: if the "Wheel_angle" is given in degrees we have to use "radians(Wheel_angle)"!).

pleuel
pleuel

scene description
for POV-Ray:
"con_rod1.ini" and
"con_rod1.pov"
#declare C_x =  C_radius * cos(radians(Wheel_angle));
#declare C_y =  C_radius * sin(radians(Wheel_angle));
#declare C_Rod_y = C_y;
#declare C_Rod_x = sqrt(C_Rod_Len*C_Rod_Len-C_Rod_y*C_Rod_y);
#declare C_Rod_Angle = degrees(atan2(C_Rod_y,C_Rod_x));

Attention : For guarantee of the mechanically correct flow of this motion, it is necessary that the piston rod is in the same line as the axis of the wheel. So it's a good idea, to construct the complete combination with the wheel centred at <0,0,0> and then to move altogether upwards by the radius of the wheel.
 
Some examples for animations of this kind
you can find here: 3D-Animations - Railroad (steam engines)
and here: 3D-Animations - Engineering (4- u. 6-cylinder engines).

top

© Friedrich A. Lohmüller, 2010
email email: Friedrich.Lohmueller_at_t-online.de
homepage:http://www.f-lohmueller.de