#include "glass.inc" #include "rad_def.inc" #declare useRadiosity = yes; global_settings { max_trace_level 8 #if( useRadiosity ) radiosity { pretrace_start .08 pretrace_end .001 count 1600 nearest_count 10 error_bound .65 recursion_limit 2 low_error_factor .6 gray_threshold 0 minimum_reuse .015 brightness 1 adc_bailout .01 / 2 } #end } background { color rgb 1 } camera { location <300, 600, 250> look_at <0, 70, 0> } light_source { 0 * x color rgb .25 area_light <500, 0, 0> <0, 0, 500> 10, 10 adaptive 2 translate 150 * y photons { reflection on refraction on } } #declare Filter = 0; #declare Transmit = 0; #declare atomFinish = finish { ambient .1 brilliance 0 diffuse .75 phong 1 phong_size 175 specular 0 roughness .001 reflection { .2, 1 falloff 2 exponent 1 } conserve_energy } #declare C = material { texture { pigment { color rgb 0 } finish { atomFinish } } } #declare H = material { texture { pigment { color rgb .9 } finish { atomFinish } } } #declare N = material { texture { pigment { color rgb <.2, .2, .8> } finish { atomFinish } } } #declare O = material { texture { pigment { color rgb <.8, .2, .2> } finish { atomFinish } } } #declare Carbon = sphere { <0, 0, 0>, 1 material { C } scale 77 } #declare Hydrogen = sphere { <0, 0, 0>, 1 material { H } scale 37 } #declare Nitrogen = sphere { <0, 0, 0>, 1 material { N } scale 70 } #declare Oxygen = sphere { <0, 0, 0>, 1 material { O } scale 66 } #declare Benzene = object { merge { #local i = 0; #while( i < 6 ) object { Carbon translate 77 * x rotate i * 60 * y } #local i = i + 1; #end } } #declare Toluene = object { merge { object { Benzene } object { Carbon translate 154 * x } #local i = 0; #while( i < 3 ) object { Hydrogen translate 77 * x rotate 60 * z rotate i * 120 * x translate 154 * x } #local i = i + 1; #end } } #declare Nitro = object { merge { object { Nitrogen } #local i = 0; #while( i < 2 ) object { Oxygen translate -77 * x rotate -60 * z rotate i * 120 * z } #local i = i + 1; #end } } #declare Trinitrotoluene = object { merge { object { Toluene } #local i = 0; #while( i < 3 ) object { Nitro translate -154 * x rotate i * 120 * y } #local i = i + 1; #end #local i = 0; #while( i < 2 ) object { Hydrogen translate -154 * x rotate -60 * y rotate i * 120 * y } #local i = i + 1; #end } } object { Trinitrotoluene photons { target reflection on refraction on } translate -min_extent( Trinitrotoluene ).y * y } plane { y, 0 pigment { color rgb 1 } finish { ambient 0 diffuse .8 } }