Simulation of a Rotating Propeller
Simulated Motion Blur
|
part II
|
Step 1: How to make a propeller
with a variable number of blades.
To keep this construction as flexible as possible the angle of the propeller rotation
is declared at the top of the following.
For animations it can be changed like this: "#declare Rotation_Angle = 360*clock;"
With "Number_of_Blades" and the length of the blades "Blade_Radius", the dimensions of
the propeller are easy to adapt to anything you want.
 The propeller blades |
#declare Rotation_Angle = 20;
// ------------------------------------ dimensions of the blades
#declare Number_of_Blades = 5;
#declare Blade_Radius = 3.00; // length of the propeller blades
// --------------------------------------- texture of the blades
#declare Blades_Texture =
texture { Chrome_Metal finish{ambient 0.1 diffuse 0.8 phong 1}}
// -------------------------------------------------------------
union{ // propeller -------------------------------------------
cylinder { <0,0,-0.01>,<0,0,1.00>,0.10 } // propeller axis
difference{ // propeller nose
sphere{<0,0,0>, 1}
box {<-1,-1,-0.1>,<1,1,1>}
scale <1,1,2.5>*0.3
translate<0,0,0.2>
}
union{ // blades
#declare Nr = 0;
#declare End = Number_of_Blades;
#while ( Nr < End)
sphere { < 0, 0, 0>,0.5
translate <0.5,0,0>
scale <1,0.15,0.04> rotate <10,0,0>
scale Blade_Radius
texture {Blades_Texture}
rotate< 0,0, 360/End * Nr >
}
#declare Nr = Nr + 1;
#end
} // end of union of the blades
texture{Blades_Texture}
translate <0,0,-0.5>
rotate <0,0,Rotation_Angle>
} // end of union propeller ------------------------------------
|