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

Home
- POV-Ray Tutorial
- Download-Seite

  Systems of Coordinates
  & 2D Functions
  - Squared Paper
  - Systems of Coordinates
      with Axes
  - 2D Functions
      Samples
  - Available Functions
      in POV-Ray
                                       

Systems of coordinates

The construction of a system of coordinates
with a grid plane by 3 layered textures and axes.

Objects:    "plane, cylinder, cone".
Methods: "color_map, layered textures, macro"

Construction in details:

For details about the plane of coordinates see at "grid plane".
The axes are made by cylinders with a texture of stripes and a cone at the end.
They are defined in a macro to make colors and length variable.
#macro Axis_( AxisLen,
              RedTexture,
              WhiteTexture)
union{
 cylinder{<0,-AxisLen,0>,<0,AxisLen,0>,0.05
          texture{checker
                  texture{RedTexture  }
                  texture{WhiteTexture}
                  translate<0.1,0,0.1>}}
 cone{<0,AxisLen,0>,0.2,<0,AxisLen+0.7,0>,0
           texture{RedTexture}}
} // end of union "Axis"
#end // of macro Axis (AxisLen)
//-----------------------------------------
#macro AxisXYZ(AxisLX,AxisLY,AxisLZ,
               TexRed,TexWhite)
//-- drawing 3 axes -- 3 Achsen zeichnen --
union{
object{Axis_(AxisLX,TexRed,TexWhite)
       rotate< 0,0,-90>}// x-Axis
object{Axis_(AxisLY,TexRed,TexWhite)
       rotate< 0,0,  0>}// y-Axis
object{Axis_(AxisLZ,TexRed,TexWhite)
       rotate<90,0,  0>}// z-Axis
} // end of union
#end// of macro "AxisXYZ(...)"  -----------
//-- drawing the axis -- Achsen zeichnen --
#declare Tex_Dark =
texture{pigment{color rgb<1,0.3,0>}
        finish{ phong 1}}
#declare Tex_White =
texture{pigment{color rgb<1,1,1>}
        finish{ phong 1}}
//-----------------------------------------
object{AxisXYZ(3.5,3,0.0001,
               Tex_Dark,Tex_White)}
//end axes of the system of coordinates ---
The 2-dimensional version:
Sample grid with axes - 2 dimensional 600x450

 
The 3-dimensional version:
Sample coordinates 3 dimensional 600x450

Description of the 2-dimensional version scene 1 in POV-Ray
Description of the 3-dimensional version scene 2 in POV-Ray


top

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