#include "colors.inc" #include "textures.inc" #include "finish.inc" #include "metals.inc" #declare Photons=on; #declare Radiosity=on; #declare Media=on; global_settings { assumed_gamma 1.0 max_trace_level 5 #if (Photons) // global photon block photons { spacing 0.02 // specify the density of photons jitter 1.0 // jitter phor photon rays autostop 0 // photon autostop option media 100 } #end #if (Radiosity) radiosity { // Mark James Lewin settings pretrace_start 0.01 pretrace_end 0.005 recursion_limit 5 count 300 error_bound 0.25 nearest_count 7 minimum_reuse 0.01 always_sample off /* // Default settings pretrace_start 0.08 // start pretrace at this size pretrace_end 0.04 // end pretrace at this size count 35 // higher -> higher quality (1..1600) [35] nearest_count 5 // higher -> higher quality (1..10) [5] error_bound 1.8 // higher -> smoother, less accurate [1.8] recursion_limit 3 // how much interreflections are calculated (1..5+) [3] low_error_factor .5 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.015 // reuse of old radiosity samples [0.015] brightness 1 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 normal on // take surface normals into account [off] */ media on // take media into account [off] //save_file "file_name" // save radiosity data //load_file "file_name" // load saved radiosity data //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } #end } #if (Media) media { scattering { 5, rgb 0.2 eccentricity 0.01 extinction 0.40} intervals 4 samples 15,20 variance 1/512 //confidence 1.8 method 3 } #end // Light source not interacting with the atmosphere. /* light_source { <0, 15, 0> color rgb 0.7 media_interaction off shadowless } */ camera { right x*image_width/image_height location <2, 3, -7.5> //location <0, 1, -7.5> look_at <0, 0, 0> } // create a regular point light source light_source { 0*x // light's position (translated below) color rgb <1,1,1> *8 // light's color media_attenuation on photons { // photon block for a light source refraction on reflection on } translate <0, 2, -5> } #declare M_Glass= // Glass material material { texture { pigment {rgbt 1} finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.005 reflection { 0.1, 1.0 fresnel on } conserve_energy irid { 0.05 thickness 0.2 turbulence 0.1 } } } interior { ior 1.5 dispersion 1.1 dispersion_samples 100 fade_power 1001 fade_distance 0.9 //fade_color <0.5,0.8,0.6> } } // Floor plane { <0, 1, 0>, -1 texture { pigment { color Wheat } finish { Dull } } } // Back wall box { <-25, -2, -0.5>, <15, 6, 0.5> texture { pigment { color White } finish { Dull } } translate 10*z //rotate 45*y } // The lightbox difference { cylinder { <-0.50, 0, 0>, <0.50, 0, 0>, 0.10 } cylinder { <-0.49, 0, 0>, <0.49, 0, 0>, 0.09 } // slit in the light box box { <-0.48, -0.035, -0.001>, <0.51, 0.035, 0.001> } // round hole in the light box //cylinder { <-0.48, 0, 0>, <0.51, 0, 0>, 0.005 } texture { pigment { color Wheat } finish { Dull } } /* photons { // photon block for an object target 1.0 refraction on reflection on } */ rotate <0, -90, 0> translate <0, 2, -5> } // The prism intersection { box { <-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5> } plane { <1, 0, 0>, 0 rotate 45*y } material { M_Glass } photons { // photon block for an object target 1.0 refraction on reflection on collect off } translate <0, 2, 0> }