###### Descriptions and Examples for the POV-Ray Raytracerby Friedrich A. Lohmüller Loops, Sine, Cosine and POV-Ray
Italiano
Français
Deutsch

Home
- POV-Ray Tutorial
Loops,
Sine, Cosine
and POV-Ray
1. Linear Waves
2. Concentric waves
>3. Flying Carpets

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 z 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.0>} finish {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 //------- loop start Z: #while ( Z < EndZ + Step) #declare X = -E; // start value X #declare EndX = E; // end value X //------ loop start X: #while ( X < EndX + Step) object{ Ball translate} #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}```

A variation with more parallel waves you will get by this modulation:

 ``` object{Ball translate}```

A great chaotic heap of snakes brings the following variation:

 ```object{Ball translate}```

 concentric waves Overview
top

 © Friedrich A. Lohmüller, 2011 www.f-lohmueller.de