...
#declare Number_of_spokes = 12;
#declare W = 360/Number_of_spokes;
//------------------------------------ wheel --
union{
torus{0.9,0.20 rotate<90,0,0>
texture{Rim_tex}} // rim
torus{1.0,0.25 rotate<90,0,0>
texture{Tiretex}} // tire
cylinder{<0,0,-0.10>,<0,0, 0.10>,0.20
texture{Hub_tex}} // hub
cylinder{<0,0,-0.12>,<0,0, 0.12>,0.15
texture{Hub_tex}} // hub
//------------- without #while loop: -------<<1
union{
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 0*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 1*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 2*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 3*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 4*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 5*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 6*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 7*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 8*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0, 9*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0,10*W>}
cylinder{<0,0,0>,<1,0,0>,0.05 rotate<0,0,11*W>}
texture{Spoke_tex}
}
//----------------------------------------- <<2
translate<0,1.25,0>
rotate<0,0,0>} // end of union
//----------------------------------------- end |