// Persistence of Vision Ray Tracer Scene Description File // File: crystalball_eggshell_glassmarble_soapbubble.pov // Vers: 3.1 or MegaPov 0.4 // Desc: Like the filename says: crystal ball, egg shell, glass marble, soap bubble // Date: 00.24 // Auth: Bob Hughes // Mail: inversez@aol.com?Subject=Pov-Scene // Note: This file can use MegaPov, the "unofficial" POV-Ray, available at nathan.kopp.com/patched.htm // Set this to no if using official POV-Ray 3.1 or to yes if using unofficial MegaPov #declare Mega=yes; // Which object to render? "C" Crystal Ball, "E" Egg Shell, "G" Glass Marble, "S" Soap Bubble // "A" will show all at once. Each object is a POV Unit in radius (egg shell smallest cross-section). #declare W="a" #if (Mega=yes) #version unofficial MegaPov 0.4; // uses MegaPov for variable reflections, fade color, isosurface #else #version 3.1; #end #declare Which=asc(strupr(W)); global_settings { max_trace_level 8 } #include "shapes.inc" // these are for making a version 3.1 helix shape (included with POV-Ray) #include "shapesq.inc" // so the glass marble can be done without MegaPov light_source { <-50,100,-50> color rgb 1 rotate -360*clock*y} // Sun light light_source { <0,500,0> color rgb <0.25,0.33,0.5> shadowless} // Sky light light_source { <150,10,-250> color rgb <0.5,0.33,0.25>} // Fill light camera { location <1,-0.25,-10> angle 33 // angle 67 ~ direction 1 look_at <0, 0, 0> } // Sky sphere {0,1 pigment {gradient y color_map { [0,.2 color rgb <0.7,0.85,0.95> color rgb <0.35,0.75,0.9>] [.2,.8 color rgb <0.35,0.75,0.9> color rgb <0.2,0.5,0.9>] }} finish {ambient 0.4 diffuse 0.5} scale 1000 } // Ground plane {y,-2 pigment {granite color_map { [.3,.6 color rgb <0.25,0.75,0.5> color rgb <0.5,0.75,0.25>] }} normal { granite 0.2 } finish {ambient 0.3 diffuse 0.7} } /* THE OBJECTS (360 degree rotations when animated) */ #switch (Which) #case(65) #declare CrystalBall= sphere {0,1 texture { pigment { rgbft <0.97,0.99,0.98,0.95,0.05> } // normal { wrinkles 0.015 scale 1.2 } finish { ambient 0 diffuse 0.15 specular 0.8 roughness 0.002 phong 0.01 phong_size 2 #if (Mega=no) reflection 0.15 #else reflection_type 0 reflection_min 0.1 reflection_max 0.4 reflection_falloff 2 conserve_energy #end reflection_exponent 0.3 irid { 0.05 thickness 0.1 turbulence 0.2 } } } interior { ior 1.5 caustics 4 fade_distance 1.5 fade_power 1 #if (Mega=yes) fade_color <0.5,0.65,0.55> #end } rotate 360*clock*y } object {CrystalBall translate <-1.33,-1,0>} #declare EggShell= union { sphere {0,1 clipped_by {plane {-x,0}} scale <1.05,1,1>} sphere {0,1 clipped_by {plane {x,0}} scale <1.5,1,1>} texture { pigment { rgb <1.225,1.175,1.15> } normal {granite 0.125 scale 0.125} finish { ambient 0.35 diffuse 0.35 specular 0.125 roughness 0.02 phong 0.01 phong_size 3 reflection <0.02,0.04,0.06>} } rotate 360*clock*y } object {EggShell translate <1.33,1,0>} #declare GlassMarble= union { difference { sphere {0,1} sphere {0,0.125 translate <-0.15,0.2,-0.1>} texture { pigment { rgbft <0.85,0.99,0.95,0.9,0.1> } finish { ambient 0 diffuse 0.15 specular 0.6 roughness 0.003 phong 0.01 phong_size 0.5 #if (Mega=no) reflection 0.15 #else reflection_type 1 reflection_min 0.1 reflection_max 0.6 reflection_falloff 1 conserve_energy #end reflection_exponent 0.2 irid { 0.05 thickness 0.5 turbulence 0.5 } } } interior { ior 1.45 caustics 0.75 fade_distance 1.25 fade_power 2 #if (Mega=yes) fade_color <0.25,0.5,0.33> #end } } #if (Mega=no) object {Helix rotate 45*z pigment {spiral1 3 frequency 1 color_map { [0,.3 color rgb <1.1,0.2,0.1> color rgb <1.0,0.9,0.1>] [.3,.6 color rgb <1.0,0.9,0.1> color rgb <0.3,0.1,1.1>] [.6,1 color rgb <0.3,0.1,1.1> color rgb <1,1,1>] } sine_wave rotate 90*x } finish { ambient 0.2 diffuse 0.8 } scale 0.4 } #else isosurface { function { "helix2",<3,2,1,1,1,0> } max_gradient 1.0 accuracy 0.01 all_intersections // max_trace 2 contained_by {sphere {0,2}} pigment {spiral1 3 frequency 1 color_map { [0,.3 color rgb <1.1,0.2,0.1> color rgb <1.0,0.9,0.1>] [.3,.6 color rgb <1.0,0.9,0.1> color rgb <0.3,0.1,1.1>] [.6,1 color rgb <0.3,0.1,1.1> color rgb <1,1,1>] } sine_wave rotate 90*x } finish { ambient 0.2 diffuse 0.8 } scale <0.6,0.9,0.6>*0.5 } #end rotate 360*clock*y // can break down in animation! MegaPov 0.4 crashes sometimes } object {GlassMarble translate <-1.33,1,0>} #declare SoapBubble= difference { sphere {0,1} sphere {0,0.995} texture { pigment { rgbft <0.96,0.96,0.96,0.9,0.1> } finish { ambient 0.05 diffuse 0.15 specular 0.4 roughness 0.001 phong 0.005 phong_size 1 #if (Mega=no) reflection 0.033 #else reflection_type 1 reflection_min 0.01 reflection_max 0.1 reflection_falloff 1 conserve_energy #end reflection_exponent 0.1 irid { 0.15 thickness 0.4 turbulence 0.4 } } } interior { ior 1.35 caustics 50 } rotate 360*clock*y } object {SoapBubble translate <1.33,-1,0>} #break // END ALL, BEGIN INDIVIDUALS #case(67) #declare CrystalBall= sphere {0,1 texture { pigment { rgbft <0.97,0.99,0.98,0.95,0.05> } // normal { wrinkles 0.015 scale 1.2 } finish { ambient 0 diffuse 0.15 specular 0.8 roughness 0.002 phong 0.01 phong_size 2 #if (Mega=no) reflection 0.15 #else reflection_type 0 reflection_min 0.1 reflection_max 0.4 reflection_falloff 2 conserve_energy #end reflection_exponent 0.4 irid { 0.05 thickness 0.1 turbulence 0.2 } } } interior { ior 1.5 caustics 4 fade_distance 1.5 fade_power 2 #if (Mega=yes) fade_color <0.5,0.65,0.55> #end } rotate 360*clock*y } CrystalBall #break #case(69) #declare EggShell= union { sphere {0,1 clipped_by {plane {-x,0}} scale <1.05,1,1>} sphere {0,1 clipped_by {plane {x,0}} scale <1.5,1,1>} texture { pigment { rgb <1.225,1.175,1.15> } normal {granite 0.125 scale 0.125} finish { ambient 0.35 diffuse 0.35 specular 0.125 roughness 0.02 phong 0.01 phong_size 3 reflection <0.02,0.04,0.06>} } rotate 360*clock*y } EggShell #break #case(71) #declare GlassMarble= union { difference { sphere {0,1} sphere {0,0.125 translate <-0.15,0.2,-0.1>} texture { pigment { rgbft <0.85,0.99,0.95,0.9,0.1> } finish { ambient 0 diffuse 0.15 specular 0.6 roughness 0.003 phong 0.01 phong_size 0.5 #if (Mega=no) reflection 0.15 #else reflection_type 1 reflection_min 0.1 reflection_max 0.6 reflection_falloff 2 conserve_energy #end reflection_exponent 0.25 irid { 0.05 thickness 0.5 turbulence 0.5 } } } interior { ior 1.45 caustics 0.75 fade_distance 1.25 fade_power 2 #if (Mega=yes) fade_color <0.25,0.5,0.33> #end } } #if (Mega=no) object {Helix rotate 45*z pigment {spiral1 3 frequency 1 color_map { [0,.3 color rgb <1.1,0.2,0.1> color rgb <1.0,0.9,0.1>] [.3,.6 color rgb <1.0,0.9,0.1> color rgb <0.3,0.1,1.1>] [.6,1 color rgb <0.3,0.1,1.1> color rgb <1,1,1>] } sine_wave rotate 90*x } finish { ambient 0.2 diffuse 0.8 } scale 0.4 } #else isosurface { function { "helix2",<3,2,1,1,1,0> } max_gradient 1.0 accuracy 0.01 all_intersections // max_trace 2 contained_by {sphere {0,2}} pigment {spiral1 3 frequency 1 color_map { [0,.3 color rgb <1.1,0.2,0.1> color rgb <1.0,0.9,0.1>] [.3,.6 color rgb <1.0,0.9,0.1> color rgb <0.3,0.1,1.1>] [.6,1 color rgb <0.3,0.1,1.1> color rgb <1,1,1>] } sine_wave rotate 90*x } finish { ambient 0.2 diffuse 0.8 } scale <0.6,0.9,0.6>*0.5 } #end rotate 360*clock*y // can break down in animation! MegaPov 0.4 crashes } GlassMarble #break #case(83) #declare SoapBubble= difference { sphere {0,1} sphere {0,0.995} texture { pigment { rgbft <0.96,0.96,0.96,0.9,0.1> } finish { ambient 0.05 diffuse 0.15 specular 0.4 roughness 0.001 phong 0.005 phong_size 1 #if (Mega=no) reflection 0.033 #else reflection_type 1 reflection_min 0.01 reflection_max 0.1 reflection_falloff 2 conserve_energy #end reflection_exponent 0.1 irid { 0.15 thickness 0.4 turbulence 0.4 } } } interior { ior 1.35 caustics 50 } rotate 360*clock*y } SoapBubble #break #end