#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(...)" ------------------------
// --------------------- declaring the textures
#declare Tex_Dark =
texture{ pigment{color rgb<1,0.3,0>}
finish {ambient 0.45 diffuse 0.55 phong 1}
} // end of texture
#declare Tex_White =
texture{ pigment{color rgb<1,1,1>}
finish {ambient 0.45 diffuse 0.55 phong 1}
} // end of texture
// ---------drawing the axes ---- Achsen zeichnen -
object{AxisXYZ(3.5,3,0.0001,Tex_Dark,Tex_White)}
// ----end of axes of the system of coordinates ---- |
The 2-dimensional version:
The 3-dimensional version:
|