// +w640 +h360 // +w800 +h450 #declare sphere_on = 1; #declare quick_test = 0; #if (quick_test = 1) #declare n_diffuse = 6; #declare n_reflect = 3; #else #declare n_diffuse = 12; #declare n_reflect = 6; #end #default { texture { pigment { color rgb 1 } finish { diffuse 1 ambient 0 montecarlo { mc_diffuse { 1 n_diffuse 1 } mc_use_cosine_distrib } } } } global_settings { max_trace_level 5 montecarlo { mc_rand_seed mc_pixel_refresh_ratio 0.5 mc_max_diffuse_bounce 3 mc_russian_roulette_prob 0.5 mc_russian_roulette_threshold 0.2 mc_colour_clip 1.0 mc_dof { mc_focal_distance 80.0 mc_lens_radius 0.33 } } } camera { sky <0, 0, 1> up <0, -1, 0> look_at <0, 0, 5> location <-140,0,40> right y*image_width/image_height } sphere { 0,1 texture { pigment { color rgb 1 } finish { diffuse 0 ambient 0.5 } } hollow on no_shadow scale 10000 } #macro text_plane(dir1,dir2) texture{ pigment{ gradient dir1 color_map{ [0.0 rgb 0.5] [0.05 rgb 0.5] [0.05 rgb 1] [1.0 rgb 1] } scale 1+(12.5-1)*dir1 } } texture{ pigment{ gradient dir2 color_map{ [0.0 rgb 0.5] [0.05 rgb 0.5] [0.05 rgbt 1] [1.0 rgbt 1] } scale 1+(12.5-1)*dir2 } } #end plane { z, 0 text_plane(x,y) } box { <115,-1000,-1>,<115+1,1000,125> text_plane(y,z) } #declare power=10; #declare s=0.05; #macro sphere_texture(col) texture { pigment { rgb col } finish { // reflection 1 diffuse 0 reflection 0.25 diffuse 0.75 montecarlo { mc_reflect { 1 n_reflect 1 1000 } } // reflection 0.05 diffuse 0.95 montecarlo { mc_reflect { 1 n_reflect 1 1000 } } } } #end #macro m_torus(col) union { cylinder { -(1+3*s)*z*z, (1+3*s)*z, s*3 sphere_texture(col) } torus { 1+2*s, s texture { finish { ambient power diffuse 0 } } } } #end #macro m_the_sphere(rad,rot,trans,col,ref) merge { sphere { 0 1 sphere_texture(col) } object { m_torus(col) rotate 90*x } object { m_torus(col) rotate 90*y } object { m_torus(col) rotate 90*z } scale rad rotate rot translate (rad+s*3)*z+trans } #end #declare nb_sphere = 10; #declare rand_rot = seed(4567); #declare rand_trans = seed(1234); #declare sphere_col = <1,0.5,0.5>; #declare d_rot = 90; #declare d_trans_x = 100; #declare d_trans_y = 100; #if (sphere_on) #declare i = 0; #while (i < nb_sphere) m_the_sphere(10, <0,rand(rand_rot)*d_rot,rand(rand_rot)*d_rot*2>, <(rand(rand_trans)*2-1)*d_trans_x,i/nb_sphere*d_trans_y*2-d_trans_y,0>, sphere_col, 1) #declare i = i + 1; #end m_the_sphere(10,<0,90,0>,<-60-25,40,0>,sphere_col,1) m_the_sphere(10,<15,0,-45>,<0,100,0>,sphere_col,1) #end box { -0.5,0.5 scale 20 translate 10*z translate (-33-25)*x+33*y texture { pigment { color rgb 1 } finish { reflection 0.75 ambient 0 diffuse 0.25 montecarlo { mc_reflect { 1 n_reflect 1 5000 } } } } } box { -0.5,0.5 scale 20*x+20*y+75*z translate 37*z translate +33*x-37.5*y texture { pigment { color rgb <0.8,0.8,1> } } } cone { 0, 1, z, 0 scale 10*x+10*y+50*z translate -17*x-90*y-0.5*z texture { pigment { color rgb 1 } finish { reflection 0.5 ambient 0 diffuse 0.5 montecarlo { mc_reflect { 1 n_reflect 1 250 } } } } }