//Includes --------------------------------------------------- #include "colors.inc" #include "stones1.inc" #include "textures.inc" global_settings { max_trace_level 10 } // Locations ---------------------------------------------- #declare CAM_POS = <5,8,10>; #declare CAM_AIM = <0,0,0>; #declare LIG_CAM= CAM_POS; #declare LIGHT_1= <0,0,0>; #declare LIGHT_2= <22,18,17>; // View? Yes =1 NO = 0 ------------------------------------------------------ #declare CAM_LIGHT_ON = 0; #declare LIGHT_OBJ_ON = 0; #declare AXES_ON = 0; #declare ISO_ON = 1; #declare SPHERE_ON = 0; // Camera & Lights ----------------------------------------------------------- // The Camera (and its Extra light if in use) camera {location CAM_POS look_at CAM_AIM } #if (CAM_LIGHT_ON =1) light_source {CAM_POS color rgb 2} # end // LIGHT 1 light_source { LIGHT_1 color rgb <2,0,0>} #if (LIGHT_OBJ_ON = 1) sphere { LIGHT_1,.3 pigment {rgb <1,1,1>} no_shadow} #end // LIGHT 2 light_source { LIGHT_2 color rgb 1} #if (LIGHT_OBJ_ON = 1) sphere { LIGHT_2,.3 pigment {rgb <1,1,1>} no_shadow} #end #if (AXES_ON = 1) cone {<-6,0,0>,.3, <6,0,0>,0 pigment {rgb <1,0,0>} no_shadow} cone {<0,-6,0>,.3, <0,6,0>,0 pigment {rgb <0,1,0>} no_shadow} cone {<0,0,-6>,.3, <0,0,6>,0 pigment {rgb <0,0,1>} no_shadow} #end // The Sphere ---------------------------------------------------------- #if (SPHERE_ON = 1) sphere {<0,0,0>,2 texture {T_Grnt5 scale 4} } #end // ISO Stuff --------------------------------------------------------------- // declared part functiones // #declare fn_A= function{ (x*x)+(z*z)-y/1.3 } ; #declare fn_B= function{ (x*x)+(z*z)-y } ; #declare fn_C= function { sqrt(pow(x,2) + pow(y,2) + pow(z,2)) - 1.7 }; #declare fn_D= function { sqrt(pow(x,2) + pow(y,2) + pow(z,2)) - 2 }; #declare Blob_threshold=0.1; #declare fn_E= function { (1+Blob_threshold) -pow(Blob_threshold, fn_B(x,y,z)) -pow(Blob_threshold, fn_D(x,y,z)) } #declare fn_F= function { (1+Blob_threshold) -pow(Blob_threshold, fn_A(x,y,z)) -pow(Blob_threshold, fn_C(x,y,z)) } // The ISO // #if (ISO_ON = 1) isosurface{ function { max(fn_E(x, y, z), -fn_F(x, y, z)) } contained_by{box{-2,<2,2.5,2>}} max_gradient 30.4 texture {T_Grnt5 scale 4} //pigment{rgb <.9,0,.8> } } #end