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

# Swinging Spiral Pendulum

##### About oscillations of spirals in sine rythm.

Swinging Spiral Pendulum:
For the construction of a spiral pendulum we need to calculate its actual length.
First we define the minimal length and the amplitude of the spiral. With this values we calculate the medium length:

#declare Amplitude = 0.60;
#declare Minimal_Length   = 0.80;
#declare Middle_Length    = Amplitude + Minimal_Length;
The spiral oscillates around their medium length by a sine oscillation.
It's actual length (at the time "clock"!) is calculated in this way:
actual length = medium length + amplitude*sin(clock*2*pi)
 //---------------------------------------------- time ---------------------- #declare Time_test = 0.25; // 0.25/0.75 shows maximum/minimal extension!!! #declare Spiral_Length = Middle_Length+Amplitude*sin((clock+Time_test)*2*pi); //------------------------------------------------------ -------------------
Special Trick:
For testing I added here the value "Time_test" to the time value "clock". This allows to check if the minimal and maximal extension of the spiral is inside of the render window!

##### scene description for POV-Ray: "spiral0.ini" and "spiral0.pov"

The Spiral made with a While Loop:
 #declare Spiral = //--------------------------------- the spiral union{ #local N_per_Rev = 500; // Number of Elements per revolution #local N_of_Rev = 8.00; // Total number of revolutions #local H_per_Ref = Sp_Length / N_of_Rev;// Height per revolution #local Nr = 0; // start loop #while (Nr< N_per_Rev*N_of_Rev) sphere{ <0,0,0>,0.025 translate<0.25, -Nr*H_per_Ref/N_per_Rev, 0> rotate<0, Nr * 360/N_per_Rev,0/gt; texture{ Chrome_Metal finish {diffuse 0.9 phong 1}} } #local Nr = Nr + 1; // next Nr #end // --------------------------------- end of loop sphere {<0,0,0>, 0.4 translate<0,-Nr*H_per_Ref/N_per_Rev-0.2,0> texture{ pigment{color rgb<1,0.65,0>} finish {diffuse 0.9 phong 1}} } } // end of union -------------------------------- end of spiral object { Spiral translate< 0.0,2.42,0>} //------------------------------------------------
Some examples for animations of this kind
you can find here: 3D-Animations - Oscillations .

top