// ------------------------------------ // SCALES! // ------------------------------------ #version 3.6; // ------------------------------------ #declare s_camerapos = 0; #declare s_lights = on; // ------------------------------------ // global settings // ------------------------------------ #default{finish{ambient 0}} global_settings{assumed_gamma 1.0 max_trace_level 5} // ------------------------------------ // -------------------------------------------------------- // ---------------------------------------------------------------------------- // textures // ---------------------------------------------------------------------------- // -------------------------------------------------------- // ------------------------------------ #declare t_white = texture{ pigment{color rgb 1.00} finish{diffuse 0.5 brilliance 1} } // ------------------------------------ // -------------------------------------------------------- // ---------------------------------------------------------------------------- // components // ---------------------------------------------------------------------------- // -------------------------------------------------------- // ------------------------------------ #declare R1 = 10; // torus major radius #declare R2 = 0.25; // torus minor radius (scale compared to major radius) #declare Offset = 0.70; // torus offset (scale compared to major radius) // ------------------------------------ // water torus #declare f_torus = function{internal(70)} #declare f_water2 = function{ pigment{ marble scale 0.02 cubic_wave rotate<0, 0, 45> warp{toroidal orientation z dist_exp 0} warp{turbulence 0.25 octaves 3 omega 0.2} color_map{ [0.00 color rgb 0] [0.95 color rgb 1] [1.00 color rgb 0] } } } #declare f_water3 = function{ pigment{ marble scale 0.02 cubic_wave rotate<0, 0, -45> warp{toroidal orientation z dist_exp 0} warp{turbulence 0.25 octaves 3 omega 0.2} color_map{ [0.00 color rgb 0] [0.95 color rgb 1] [1.00 color rgb 0] } } } #declare Watertorus = isosurface{ function{f_torus(x,y,z,R1,R1*R2)+max(f_water2(x,y,z).red*R1*R2*0.15, f_water3(x,y,z).red*R1*R2*0.15)} contained_by{sphere{0, R1*(R2+1)}} threshold 0 accuracy 0.001 max_gradient 50 max_trace 1 hollow texture{t_white} } // ------------------------------------ // -------------------------------------------------------- // ---------------------------------------------------------------------------- // scene // ---------------------------------------------------------------------------- // -------------------------------------------------------- // ------------------------------------ object{Watertorus translate rotate<45, 0, 90>} // top one object{Watertorus translate rotate<45, 0, 210>} // left one object{Watertorus translate rotate<45, 0, 330>} // right one object{Watertorus rotate<90, 0, 0>} // ------------------------------------ // -------------------------------------------------------- // ---------------------------------------------------------------------------- // lights // ---------------------------------------------------------------------------- // -------------------------------------------------------- // ------------------------------------ #if(s_lights=on) light_source{<-1,1,-1>*1000 color rgb 2} light_source{< 2,-1,-1>*1000 color rgb 0.75 shadowless} #end // ------------------------------------ // -------------------------------------------------------- // ---------------------------------------------------------------------------- // camera // ---------------------------------------------------------------------------- // -------------------------------------------------------- // ------------------------------------ #switch(s_camerapos) #case(0) // zazzle aspect ratio camera{ ultra_wide_angle location<0, 0, -60> up y*(image_height/image_width) right x sky y look_at<0, R1*R2*0.5, 0> angle 55 } #break #end // ------------------------ end of file