|
Italiano
Deutsch |
In addition to the possibility of design the y-modulation symmetric to an axis of rotation you can use factors which are depending from the x or uz direction as well by sin(A) and cos(a).
#declare Ball =
sphere{<0,0,0>,0.25
texture{ pigment{color rgb<1,0.65,0>}
finish {ambient 0.1 diffuse 0.9 phong 1}
}// end of texture
}// end of sphere
#declare E = 5;
#declare Z = -E; // start value Z
#declare EndZ = E; // end value Z
#declare Step = 0.2;// step value
#while ( Z < EndZ + Step)//-------------- loop start Z
#declare X = -E; // start value X
#declare EndX = E; // end value X
#while ( X < EndX + Step)//----------- loop start X
object{Ball translate<X,0.1*X*sin(Z)+0.1*Z*cos(X),Z>}
#declare X = X + Step; // next X value
#end // -------------------------------- loop end X
#declare Z = Z + Step; // next Z value
#end // ----------------------------------- loop end Z
![]() |
With a little variation you will get the classic flying carpet:
object{Ball translate<X,0.05*(X*sin(X-Z)+Z*cos(X*Z)),Z>}
![]() |
A variation with more parallel waves you will get by this modulation:
object{Ball translate<X,0.05*X*sin(X-2*Z)+ 0.1*Z*cos(3*X-Z),Z>}
![]() |
A great chaotic heap of snakes brings the following variation:
object{Ball translate<X,0.1*X*sin(X-Z)- 0.2*((Z/X)+1)*cos(X*Z),Z>}
![]() |
| © Friedrich A. Lohmüller, 2004 homepage: |