D. Edward Mitchell 16:00, 14 April 2020 (UTC) Hello World!    groupKOS Developer Share —usually UNDER CONSTRUCTION

POV-Ray macro axes

From groupKOS Developer Share
Jump to navigation Jump to search

Template:PovrayMacros


Simple orthogonal axes sharing a length and a color parameter

#macro axes1(diameter, length)
  /*x*/ cylinder{x*+length, x*-length, diameter texture { pigment { color rgb <1,0,0>/1 }}}
  /*y*/ cylinder{y*+length, y*-length, diameter texture { pigment { color rgb <0,1,0>/1 }}}
  /*z*/ cylinder{z*+length, z*-length, diameter texture { pigment { color rgb <0,0,1>/1 }}}
#end	

Simple orthogonal axes with individual length and color parameters

#macro axes2(xlen,ylen,zlen, colorX,colorY,colorZ, diameter)
    /*x*/ cylinder{ <+xlen, 0, 0>, <-xlen, 0, 0>, diameter texture{pigment {color colorX*2} } }
    /*y*/ cylinder{ <0, +ylen, 0>, <0, -ylen, 0>, diameter texture{pigment {color colorY*2} } }
    /*z*/ cylinder{ <0, 0, +zlen>, <0, 0, -zlen>, diameter texture{pigment {color colorZ*2} } }
#end