// Coordinate axes for MP logo // Last edited on 2010-03-29 11:14:55 by stolfi #macro arrow(p, q, rad, cor) #local udir = vnormalize(q - p); #local tlen = 8*rad; #local q0 = q - tlen*udir; #local p1 = q - 0.99*tlen*udir; union{ cylinder{ p, p1, rad } cone{ q0, 3*rad, q, 0.2*rad } texture{ pigment{ color rgb cor } finish{ ambient 0.75 diffuse 0.25 } } } #end #macro arrow_ball(p, rad, cor) sphere{ p, 1.01*rad texture{ pigment{ color rgb cor } finish{ ambient 0.75 diffuse 0.25 } } } #end #macro axes(len) #local o = <0,0,0>; #local rad = 0.02*len; union{ object{ arrow(o, len*x, rad, <1.000, 0.000, 0.000>) } object{ arrow(o, len*y, rad, <0.000, 0.500, 0.000>) } object{ arrow(o, len*z, rad, <0.000, 0.333, 1.000>) } object{ arrow_ball(o, rad, <0.000, 0.000, 0.000>) } } #end