////////////////////////////////////////////////////// added for demo #include "screen.inc" #macro Desaturate ( Color, Factor ) #local Compliment = <1,1,1>-Color; #local Compliment = Compliment*Factor; #local NewColor = Color+Compliment; #local Numerator = Color.red + Color.green + Color.blue; #local Denominator = NewColor.red + NewColor.green + NewColor.blue; #local NewColor = NewColor*Numerator/Denominator; NewColor #end global_settings { assumed_gamma 1.0 max_trace_level 10 } //////////////////////////////////////////////////////// added for demo //camera #if ( on ) #declare CamPos = vrotate ( <0,0,-12 >, < 0, 0, 0> )+<0,0,0>; #declare LookAt = vrotate ( <0,0,4.5 >, < 3, 130, 0> ); #declare LensAngle = 65; #else #declare CamPos = vrotate ( <0,0,-12 >, < 3, 20, 0> )+<0,0,0>; #declare LookAt = <0,0,0>; #declare LensAngle = 12; #end Set_Camera( CamPos, LookAt, LensAngle ) ////used to boost contrast sphere{CamPos,.0001 pigment{rgbt <.5.5.5,2>}} #local Size=100; //#local BaseColor=<.5,.5,.9>; #if ( on ) //key (camera) #local UseAreaLight=on; #local UseSpotLight=on; light_source { 0*x //<1,.5,0>*1.6, .8 //color rgb Desaturate ( <1,.30,0>*1.65, .35 ) //light yellow ////////////////added for demo color rgb 3 #if ( UseSpotLight ) spotlight #end translate CamPos+<-2,0,0> #if ( UseSpotLight ) point_at vrotate ( <0,0,4.5>,< 0,130,0> ) //point on shark rotated same as shark radius 1 tightness 1 falloff 60 //20 //36 #end #if ( UseAreaLight ) area_light <30*.17, 0, 0> <0, 0, 30*.17> 33, 33 adaptive 1 //jitter circular orient #end media_interaction on fade_distance 8 //25 fade_power 8 //7 } #end #if ( on ) //fill (overhead) #local UseAreaLight=on; #local UseSpotLight=on; light_source { 0*x color rgb 1 //<.54,.56,1>*1.0 //2.5 #if ( UseSpotLight ) spotlight #end translate vrotate ( <0,0,-Size*.95 >, < 90, 0, 0> ) #if ( UseSpotLight ) point_at < 0,0, 0> radius 15 //5 tightness 50 falloff 25 //6 #end #if ( UseAreaLight ) area_light <0, 0, Size/5> 33, 33 adaptive 1 //jitter circular orient #end media_interaction on fade_distance 50 //light is about 100 units away fade_power 4 //2.5 } #end #if ( on ) //box { -Size*2.1, Size*2.1 sphere { 0, Size*2.1 hollow pigment { rgbt <0,0,0,1> } finish { ambient 0 diffuse 0 specular 0 reflection 0 } interior { #local S_low = 60; #local S_high = 100; #if ( on ) media { absorption <.09, .020, .01 >*.6 } #end #if ( on ) media { scattering { 1, .45 extinction 1.0 } density { granite turbulence 1 scale .1 //SMALL color_map { [0.0 rgb <.000025,.0013,.0025>*.1 ] [0.60 rgb <.000025,.0013,.0025>*.3 ] [1.00 rgb <.000025,.0013,.0025>*.3 ] } } samples S_low, S_high } media { scattering { 1, .55 extinction 1.0 } density { granite turbulence 1.5 scale .5 color_map { [0.0 rgb <.000025,.0025,.0025>*.1 ] [0.60 rgb <.000025,.0025,.0025>*.3 ] [1.00 rgb <.000025,.0025,.0025>*.3 ] } } samples S_low, S_high } #end #if ( on ) media { //large pieces scattering { 1, 1 extinction 1.0 } density { granite turbulence .1 scale 5.5 color_map { [0.000 rgb <.025,.025,.022>*3] [0.030 rgb <.025,.025,.022>*3] [0.035 rgb 0] [1.000 rgb 0] } } samples S_low, S_high } #end #if ( on ) media { //pea scattering { 1, 1 extinction 1.0 } density { granite turbulence 0 scale .03125 color_map { [0.00 rgb 0] [0.85 rgb 0] [0.90 rgb <.004,.006,.002>*1.4] [1.00 rgb <.004,.006,.002>*1.4] } } samples S_low, S_high } #end ior 1.5 } } #end