//Description: // Newton's clicker toy to used demonstrate conservation of energy // 2nd version, now with radiosity and area lights //Author: Ben Scheele //Date: 3-6-02 -> 3-8-03 #include "colors.inc" #include "textures.inc" #include "woods.inc" #include "metals.inc" #include "skies.inc" #include "glass_old.inc" #version 3.5; #declare rad = 1; global_settings{ #if(rad = true) radiosity{ pretrace_start 0.08 pretrace_end .01 count 150 nearest_count 7 error_bound 1.2 recursion_limit 1 low_error_factor 0.5 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.0 adc_bailout 0.01/2 } #end photons{ spacing .1 } } camera { location <-100,70,-100> look_at 0 angle 45 } // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! light_source{ 0*x // light's position (translated below) color rgb 1.0 // light's color area_light 10*x 10*z // lights spread out across this distance (x * z) 8, 8 // total number of lights in grid (4x*4z = 16 lights) adaptive 3 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <100, 500, -100> // position of light } //light_source{<100,500,-100,> White} object{ O_Cloud1 finish{ ambient 0 } hollow } box{ <-100,-12.01,-100>, <100,-12.01,100> rotate 45*y texture{ T_Wood13 rotate -45*y finish{ reflection .2 }} } //------------------------------- #declare Ball= merge{ sphere{ 0, 3 } difference{ cylinder{ -1*x, 1*x, .35 } cylinder{ -1.2*x, 1.2*x, .175 } translate 3.15*y rotate y*90 } texture{ T_Silver_3D } photons{ reflection on } } #declare Balls = union{ #declare X = -12; #while( X <= 12) object{ Ball translate X*x } #declare X = X + 6; #end } //--------------------------------- #declare Box = box{ 0, <60,10,60> } #declare Base = difference{ box{ 0, <53,6,46> } union{ object{ Box rotate 45*z translate <0, 4.75,0> } object{ Box rotate -45*z translate <53,4.75,0> } object{ Box rotate -45*x translate <0, 4.75,0> } object{ Box rotate 45*x translate <0, 4.75,46> } } texture{ T_Wood24 rotate y*90 finish{ reflection .1 } } translate <-26.5,-12,-23> } //----------- #declare Arch = union{ cylinder{ 0, <0,47> 1 } cylinder{ <41,0>, <41,47> 1 } cylinder{ <0,47>, <41,47> 1 } sphere{ <0,47>, 1} sphere{ <41,47>, 1} texture{ T_Silver_3D } photons{ reflection on } } #declare Base2 = union{ object{ Base } object{ Arch translate <-20.5,-7,-17> } object{ Arch translate <-20.5,-7,17> } } //--------------------------------- #declare String_pair = union{ torus{ 1.14,.2 rotate 90*z translate <-12,40,-17> } torus{ 1.14,.2 rotate 90*z translate <-12,40,17> } cylinder{ <-12,3.190,-1>, <-12,39,-17> .2 } cylinder{ <-12,3.190,1>, <-12,39,17> .2 } cylinder{ <-12,3.190,1>, <-12,3.190,-1> .2 } sphere{ <-12,3.190,1>, .2 } sphere{ <-12,3.190,-1>, .2 } texture{ T_Glass2 } interior{ I_Glass } } #declare String_set = union{ #declare X = 0; #while( X <= 24 ) object{ String_pair translate X*x } #declare X = X + 6; #end photons{ target .5 refraction on reflection on } } //--------------------------------- #declare Clicker = union{ object{ Base2 } object{ Balls } object{ String_set } } object{ Clicker finish{ ambient 0 }}