// -------------------------------------------------------------------------- // http://louisbel.free.fr - e-mail : louisbel @ free.fr // decembre 2004 - copyright louis bellotto // // photons test // -------------------------------------------------------------------------- #version unofficial MegaPov 1.1; // -------------------------------------------------------------------------- // --- INCLUDES ------------------------------------------------------------- // -------------------------------------------------------------------------- #include "colors.inc" #include "myMacros.inc" #declare displayAxis = true; #declare usePhotons = false; #declare photonFileName="photonsMap"; // -------------------------------------------------------------------------- // --- SCENE ---------------------------------------------------------------- // -------------------------------------------------------------------------- global_settings { assumed_gamma 1.80 max_trace_level 10 #if(usePhotons ) photons { count 20000000 autostop 0 jitter 0.40 radius ,2 #if(file_exists(photonFileName)) #debug "\n\nLoading photons map...\n" load_file photonFileName #else #debug "\n\nBuiling photons map...\n" save_file photonFileName #end } #end } camera { angle 36 location p2r(60, 18, 20,false) look_at <0, 0, 0> } light_source { <0, 0, 0> color White*1.50 #if(usePhotons ) photons { reflection on refraction on } #end } background { color White*0 } #if (displayAxis) drawAxis (10, 0.04) #end // -------------------------------------------------------------------------- // --- OBJETS --------------------------------------------------------------- // -------------------------------------------------------------------------- #declare side = 5.00; #declare p1 = <+side*0.50, 0.00, +side*0.50>; #declare p2 = <-side*0.50, 0.00, +side*0.50>; #declare p3 = <-side*0.50, 0.00, -side*0.50>; #declare p4 = <+side*0.50, 0.00, -side*0.50>; #declare p5 = <0.00, +side*sqrt(2)*0.50, 0.00>; #declare p6 = <0.00, -side*sqrt(2)*0.50, 0.00>; #declare octahedron = union { // --- upper part triangle { p1, p2, p5 } triangle { p2, p3, p5 } triangle { p3, p4, p5 } triangle { p4, p1, p5 } // --- lower part triangle { p1, p2, p6 } triangle { p2, p3, p6 } triangle { p3, p4, p6 } triangle { p4, p1, p6 } } union { object { octahedron } object { octahedron rotate 90*z } object { octahedron rotate 90*x } pigment { color White*0.75+Red*0.35 transmit 0.85 } finish { ambient 0.0 diffuse 0.80 specular 0.80 roughness 0.005 reflection 0 } interior { ior 1.2 } #if(usePhotons ) photons { target 1.0 reflection on refraction on collect on } #end } plane { y, -side*sqrt(2)*0.50 pigment { color White*0.25 } finish { diffuse 0.5 ambient 0.5 specular 0.4 roughness 0.005 } }