Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    POV-Ray Examples - How To Make Objects for POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - POV-Ray Examples
   Index of Content
  - Geometry
    - Pawn
    - Wireframe Cube
    - Octagon
    - Egg Shape
    - Star
    - Optical Lens
    - Chessboard
    - Regular Tetrahedron
    - Penrose Triangle
    - Yin & Yang
    - Fishblob
    - Threefold
    - Trefoil
  - Architecture

  - Engineering
                                       
 
chessboard

Chessboard

The construction of a chessboard.
An example for the using of the "checker" pattern.
Objects:   "box".
Methods: "#declare", "union", "checker" pattern.


We built the chessbord in a size of +/-1 POV-Ray units. You can scale it with "scale 0.5" to 1 units width or whatever you need.

We start with a thin box and a checker patter in black and white:

box {<-1.00,0.01,-1.00>,<1.00,0.05,1.00>
       texture{ pigment{ checker
                         color rgb<1,1,1>
                         color rgb<0,0,0>}
              } // end of texture
    } // end of box ----------------------
 
checker pattern
Then we scale the pattern down to get 8x8 fields:

box {<-1.00,0.01,-1.00>,<1.00,0.05,1.00>
       texture{ pigment{ checker
                         color rgb<1,1,1>
                         color rgb<0,0,0>}
                scale 0.25*4
              } // end of texture
    } // end of box ----------------------
 
checker pattern
Then we take a brown flat box a little bit more width and a little bit more flat for a base:

box {<-1.01,0.00,-1.01>,<1.01,0.049,1.01>
       texture{
          pigment{
            color rgb<0.75,0.5,0.3>*0.5}
          scale 0.25*4
       } // end of texture
    } // end of box ----------------------
 
checker pattern
At least we have to put both together by a "union" and define a new object by "#declare ":

#declare Chessboard =
union{
 box {<-1.01,0.00,-1.01>,<1.01,0.049,1.01>
      texture{
        pigment{
          color rgb<0.75,0.5,0.30>*0.5}
             } // end of texture
    } // end of box ----------------------
 box {<-1.00,0.00,-1.00>,<1.00,0.050,1.00>
      texture{
        pigment{ checker
                 color rgb<1,1,1>
                 color rgb<0,0,0>
               } // end pigment
               scale 0.25
             } // end of texture
    } // end of box ----------------------
} // ---------------- end union Chessbord

// using:
//------------------------------
object{ Chessboard
        translate<1,0,1>
        scale 1
        rotate<0,0,0>
      } // ------------------
//-------------------------------
checker pattern
Download the scene description file for POV-Ray:
"checker_0.txt" or "checker_0.pov"
Chessbord
top
© Friedrich A. Lohmüller, 2011
www.f-lohmueller.de