Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    deutsche Version

4 Arches overview Star

Octagon

The Construction of an Octagon (nut or octagonal column).

Objects:    "box".
Methods: "intersection"
View from top (view against y-direction)

Construction in details:

The common parts (= intersection) of a shape with quadratic shape and the same shape rotated by 45 degrees forms a shape with an octagonal outline.


 
//====================== 8-Eck ===================
intersection{
  box {<-1, 0.0,-1>,< 1,1.0,1> rotate<0, 0,0> }
  box {<-1,-0.1,-1>,< 1,1.1,1> rotate<0,45,0> }
  scale <1,0.5,1> 
  texture{Polished_Brass 
          normal{bumps 0.3 scale 0.02}
          finish{ambient 0.15 diffuse 0.85 phong 1}
         }
  translate<1.1,0.00,0>}
//====================== 8-Eck hohl ==============
intersection{
  box {<-1, 0.0,-1>,< 1,1.0,1> rotate<0, 0,0> }
  box {<-1,-0.1,-1>,< 1,1.1,1> rotate<0,45,0> }
  cylinder{<0,-0.1,0>,<0,1.1,0>,0.5 inverse
  scale <1,0.5,1> 
  texture{Polished_Chrome 
          normal{bumps 0.3 scale 0.2}
          finish{ambient 0.15 diffuse 0.85 phong 1}
         }
  translate<-1.1,0.50,0.5>}
//--------------------------------------- end ----
The resulting image:
Sample1 Octagon 600x450

 
Sample2 Octagon 600x450
Click here for the complete description of scene 1 for POV-Ray:
".txt" file or ".pov" file
Click here for the complete description of scene 2 for POV-Ray:
".txt" file or ".pov" file


4 Arches overview Star

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