#version 3.5; global_settings { assumed_gamma 1.0 photons { count 80000 //20000 // spacing 0.005 autostop 0 jitter .4 media 100 } adc_bailout 0 max_trace_level 5 } // ---------------------------------------- #declare vsf = 0.125 * 0.75; camera { orthographic location <0.0, 0.0, -100> //direction 1.5*z // right x*(image_width)/(image_heigh) //angle 7 right <200,0,0>*vsf up <0,200,0>*vsf look_at <0.0, 0.0, 0.0> } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <0,0,-100> media_interaction off photons { reflection off refraction off } } background {color rgb 0.5} plane { z, 5 //100 pigment { color rgb 0.5 } hollow on } // ---------------------------------------- #macro a_box(top_m, bottom_m, left_m, right_m, front_m) #local bd = 0.5; union { // Top polygon { 5, <-bd,bd,-bd>, , <-bd,bd,bd> <-bd,bd,-bd> material {top_m} photons{ target reflection on refraction off } } // Bottom polygon { 5, <-bd,-bd,-bd>, , <-bd,-bd,bd> <-bd,-bd,-bd> material {bottom_m} photons{ target reflection on refraction off } } // Left polygon { 5, <-bd,-bd,-bd>, <-bd,bd,-bd>, <-bd,bd,bd>, <-bd,-bd,bd>, <-bd,-bd,-bd> material {left_m} photons{ target reflection on refraction off } } // Right polygon { 5, , , , , material {right_m} photons{ target reflection on refraction off } } // Front polygon { 5, <-bd,-bd,-bd>, , <-bd,bd,-bd>, <-bd,-bd,-bd> material {front_m} } split_union off } #end // ---------------------------------------- #declare face_m = material { texture { pigment { color rgb 0 } finish { diffuse 0 ambient 0 } } } #declare reflectos_m = material { texture { pigment { color rgb 0 } finish { diffuse 0 ambient 0 reflection 1 } } } // ---------------------------------------- // Grid of boxes #declare r = 5; #declare xx = -r; #while (xx <= r) #declare yy = -r; #while (yy <= r) #if (!((xx=0) & (yy=0))) object { a_box(reflectos_m,reflectos_m,reflectos_m,reflectos_m,face_m) translate } #end #declare yy = yy + 1; #end #declare xx=xx+1; #end // ---------------------------------------- // Atmosphere media { scattering { 1, rgb 0.005 } } // ---------------------------------------- // Light beam #declare laser = union { difference { box { -1, 1 pigment {color rgb 0} hollow } sphere { <0,1,0>, 0.1 pigment {color rgbt <1,1,1,1>} hollow } } light_source { <0,0,0> color rgb 100 //300 cylinder point_at <0,1,0> photons { refraction off reflection on } } } object { laser rotate <0,0,30> }