Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Français français
Deutsch Deutsch

pattern brick textures patterns

Surface Design by "texture"

"color_map { ... }" - a pattern of color stripes


A basic sample:



sphere{<0,0,0>,1
       texture{pigment{gradient <0,1,0> //
                       color_map{[0.0 color Blue ]
                                 [0.2 color Navy ]
                                 [0.5 color White]
                                 [0.8 color Navy ]
                                 [1.0 color Blue ]
                                }// end of color_map
                       scale 2 translate<0,-1,0>
                       }//  end of pigment
                finish {ambient 0.1 diffuse 0.9 phong 1.0 }
               }// end of texture
       scale <1.3,0.75,1.3> translate<0,1.2,-0.3>
      }// end of sphere

The pattern of color stripes is repeated in the height of 1 unit. If we want the pattern to be repeated in the height of i.e. 7 units so we have to add to the "pigment" statement "scale 7" .
For a blue sky sphere with a diameter of 10000 units and a color floating from white at the horizon to blue in zenit we need a sphere with the above color_map all together with "scale 10 000" -- Here we should put a "finish { ambient 1 diffuse 0} " because the sky is never shaded by anything (I hope so!:-)


The change from one color to the other
- floating soft or sharp and hard:

If we want the colors change sharp we need to repeat the colors at their borderlines:

color_map {[0.0 color White] // hard
           [0.5 color White]    // hard
           [0.5 color Blue  ]
           [1.0 color Blue  ] }

Mixing hard and soft is also possible:

color_map {[0.0 color White]
           [0.5 color White]   // hard
           [0.5 color Blue ]
           [1.0 color White] } // soft 


color_map {[0.0 color White]
           [0.5 color Blue ]   // soft
           [1.0 color White] } // soft to White  at the beginning


pattern brick textures patterns

© Friedrich A. Lohmüller, 2005
email email: (legacy email redacted)
homepage:www.f-lohmueller.de