// ==== Standard POV-Ray Includes ==== #include "colors.inc" // Standard Color definitions #include "textures.inc" // Standard Texture definitions camera { location <0.0 , 0.0 ,-6.0> look_at <0.0 , 0.0 , 0.0> } // create a regular point light source light_source { 0*x // light's position (translated below) color red 0.7 green 0.7 blue 0.7 // light's color translate <-20, 40, -20> } //plane { y,0 pigment { color White }} // Create an infinite sphere around scene and allow any texture on it sky_sphere { pigment { gradient x scale .3 color_map { [0.0 color White] [1.0 color Gray50] } } } // === Macro definitions === // #macro AddSeg ( AS_from, AS_lng, AS_dir, AS_color ) #local AS_lcl_frm = AS_from + ; // Protection. If the from vector is <0,0,0>, vaxis_rotate // returns -nan ( not a number ) // #if (AS_from.x = 0 & AS_from.y = 0 & AS_from.z = 0) #debug "Modifying y to y + .000001\n" #declare AS_from = AS_from + <0,.000001,0>; #end #local AS_lcl_to = vaxis_rotate (AS_lcl_frm , <0,AS_from.y,0>, AS_dir); #debug concat ( "AS_from : ",str(AS_from.x,2,2)," ",str(AS_from.y,2,2)," ",str(AS_from.z,2,2),"\n") #debug concat ( "AS_lcl_to : ",str(AS_lcl_to.x,2,2)," ",str(AS_lcl_to.y,2,2)," ",str(AS_lcl_to.z,2,2),"\n") cone { AS_from, .5, AS_lcl_to, .2 open pigment {color AS_color } hollow } #end // == end of macro definitons == // #declare cnt = 0; #while ( cnt < 360 ) AddSeg (< 0,0,0>, 2, cnt, Red ) #declare cnt = cnt + 360/3; #end