POV-Ray Raytracer descriptions by Friedrich A. Lohmueller
    deutsche Version

back to tutorials overview grids overview grid coordinate plane


Grid Box

The construction of a grid by 3 layered textures.

Objects:    "box".
Methods: "color_map, layered textures, macro"

Construction in details:

Two lattice grilles, each of them realized by a color_map (thin dark opac + wide clear transparent),
are one of them rotated by 90 degrees, are layered together with a white background.


 
//----------------------------<<<< grid macro
#macro Raster(RScale, RLine) 
pigment{gradient x scale RScale
        color_map{[0.000   color rgbt<0,0,0,0>]
                  [0+RLine color rgbt<0,0,0,0>]
                  [0+RLine color rgbt<1,1,1,1>]
                  [1-RLine color rgbt<1,1,1,1>]
                  [1-RLine color rgbt<0,0,0,0>]
                  [1.000   color rgbt<0,0,0,0>]
                 }}
finish {ambient 0.1 diffuse 0.9}
#end// of "Raster(RScale, RLine)"-macro    
//-----------------------------------------------
box {<0,0,0>,< 2,0.1,2>                
      texture{pigment{color rgb<1,1,1>*1.3} 
              finish {ambient 0.45 diffuse 0.55}}
      texture{Raster( 1.0, 0.045) scale 0.25}
      texture{Raster( 1.0, 0.045) scale 0.25 
                             rotate<0,90,0>}
     rotate<0,0,0>
     scale 2
     rotate<5,0,0> translate<-1.0,1.5,-1.5>}
//-------------------------------------- end ----
Demonstration of how to do:
Sample layered grids 600x450

 
The resulting image:
Sample grid 600x450
Click here for the complete scene description of the demo scene
for POV-Ray: ".txt" file or ".pov" file
Click here for the complete scene description of the scene "rastered box"
for POV-Ray: ".txt" file or ".pov" file


back to tutorials overview grids overview grid coordinate plane

© Friedrich A. Lohmüller, 2003     email email: (legacy email redacted)