/*vturbulence(Lambda, Omega, Octaves, V)
Returns the turbulence vector for the point V based on the given turbulence values.
The amplitude Ampl of turbulence can be controlled by multiplying the turbulence vector by a multiple.
The frequency Freq at which the turbulence vector changes can be controlled by multiplying V with a multiple.
We can get a turbulated version of the vector V by :
#declare V_Turb = V + Ampl*vturbulence(2, 0.5, 6, V*Freq);
*/
//---------------------------------------------------------
//---------------------------------------------------------
union{ //--------------------------------------------------
#local NrX = 0; // start x
#local EndNrX = 5; // end x
#while (NrX< EndNrX)
// inner loop
#local NrZ = 0; // start z
#local EndNrZ = 5; // end z
#while (NrZ <= EndNrZ)
#local A = ;
#local B1 = ;
// vturbulence(Lambda,Omega,Octaves, Vector)
#local B2 = vturbulence(5,5.5,1,B1*1.2)*0.3;
#local Bt = B1+B2; // a tubulated version of B1
cylinder{ A, Bt,0.025
texture{ pigment{ color rgb<1,0.5,0>}
finish { phong 1 }
}
} //------
sphere{ <0,0,0>,0.1 scale <1,1,1>
texture{ pigment{ color rgb<0.9,0.0,0>}
normal { bumps 0.8 scale 0.015 }
finish { phong 1}
}
translate Bt
} //-------
#local NrZ = NrZ + 0.25; // next Nr z
#end // --------------- end of loop z
// end inner loop
#declare NrX = NrX + 0.25; // next Nr x
#end // --------------- end of loop x
// end of outer loop
rotate<0,0,0>
translate<0,0,0>
} // end of union -----------------------------------------
//---------------------------------------------------------
//---------------------------------------------------------