|
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!
|
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 .
|