// Alex Kluchikov, 2005 // mailto: klkspa[at]ukr.net, aklk[at]mail.ru // Feel free to modify/use in any form global_settings { noise_generator 3 } sphere{0,1000 texture{ pigment{ gradient y color_map{ [0,color rgb <0.8,0.83,1>] [1,color rgb <0.4,0.7,1>] }scale 2 translate -y}finish{ambient .4 diffuse .8}scale 1000} texture{ pigment{average pigment_map{ #declare gr=.75; #declare ge=3/(1+gr+gr); #declare t1=.1; #declare t2=.9; #declare tr1=-.2; #declare tr2=.2; [1,bozo translate 1*y color_map{ [t1,color rgbt < 1,gr,gr,tr1>*ge] [t2,color rgbt < 0, 0, 0,tr2>*ge] }] [1,bozo translate 1*z color_map{ [t1,color rgbt < gr, 1,gr,tr1>*ge/.85] [t2,color rgbt < 0, 0, 0,tr2>*ge] }] [1,bozo translate 1*x color_map{ [t1,color rgbt < gr,gr, 1,tr1>*ge/.7] [t2,color rgbt < 0, 0, 0,tr2>*ge] }] }}scale 0.25 finish{ambient .4 diffuse .8}scale 2500} no_shadow no_image hollow double_illuminate scale 100} #declare st=texture{pigment{color rgb<0.83,0.82,0.84>*1.2} finish{diffuse 0.85 ambient 0 specular 0.8 roughness 0.03 phong 1.0 brilliance 7.3 phong_size 80 metallic .5 reflection{0.6,1.0 metallic}} } #declare pla=texture{ pigment{color rgb 1} finish{diffuse 1. phong 1. phong_size 80 reflection{.1,.3} } } #declare area=0; #declare areacount=6; #declare areadacount=3; #declare areasize=30; #declare mul=.8; #declare le=100; light_source{ -le*z, color rgb <1.0,0.8,0.6>*0.75*mul #if(area) area_light x*areasize,y*areasize,areacount,areacount jitter adaptive areadacount circular orient #else parallel #end rotate x*15 rotate -y*25 } light_source{ -le*z, color rgb 1*0.75*mul #if(area) area_light x*areasize,y*areasize,areacount,areacount jitter adaptive areadacount circular orient #else parallel #end rotate x*45 rotate y*145 } light_source{ -le*z, color rgb 0.25*mul #if(area) area_light x*areasize,y*areasize,areacount,areacount jitter adaptive areadacount circular orient #else parallel #end rotate x*15 rotate y*105 } camera{ orthographic location -5*z look_at 0 rotate x*35 rotate -y*45 } #declare pacbody=texture{pigment{color rgb <1,.8,.6>} finish{ambient .1 diffuse 1 phong 1} normal{bozo .15 scale .01} } #declare R=.1; #declare pacinterior=texture{pacbody pigment{spherical color_map{[-.01,color rgb <1,.9,.7>][R/15,color rgb <1,.3,.4>]}}} #declare paceye=texture{st pigment{cylindrical color_map{[.5,color rgb <.9,.9,1>][.55,color rgb <.4,.5,.9>][.75,color rgb <.4,.5,.9>][.78,color rgb 0]}rotate z*90}} #declare dummy1=texture{st pigment{color rgb <1,.5,.7>} finish{ambient .1 diffuse 1 phong 1} normal{bozo .15 scale .01} } #declare ph= union{ torus{1-R/2,R/2 texture{pacinterior}} difference{ sphere{0,1 texture{pacbody}} sphere{0,1-R texture{pacinterior}} box{<-1.01,0,-1.01>,<1.01,1.01,1.01> texture{pacinterior}} } } #declare eye=union{ sphere{0,1 texture{st pigment{color rgb.5 transmit 1}} interior{ior 1.1}} sphere{0,1 texture{paceye} scale .15*x} #declare ble=union{ difference{ sphere{0,1.15 texture{pacbody}} sphere{0,1.0001 texture{pacbody}} box{-<1.2,1.2,1.2>,<1.2,0,1.2> texture{pacbody}} } torus{1.075,.075 texture{pacbody}} } object{ble rotate z*80} object{ble rotate z*100} scale 1.2 } #declare tooth=union{ #declare i=-1; #while(i<1) superellipsoid{ .7 scale <.04,.2,.085> translate x*.85 rotate y*i*90 texture{pla} } #declare i=i+1/8; #end } #macro pac(a1,a2,e1,e2,e3) union{ object{ph rotate z*-(a1+10)} object{eye scale <.15,.15,.15>*e3 translate x rotate z*e1-y*e2} object{eye scale <.15,.15,.15>*e3 translate x rotate z*e1+y*e2} object{ph rotate z*(a2+10+180)} object{tooth rotate z*a2 translate y*.15} object{tooth rotate -z*a1 translate -y*.15} } #end #declare r=seed(3534590); #declare i=-1; #while(i<1) #declare j=-1; #while(j<1) #if(rand(r)>.7) object{pac(rand(r)*20+10,rand(r)*20+10,rand(r)*30+50,rand(r)*10+30,rand(r)*1+.5) scale .3 rotate (-.5)*45 translate *10 } #end #declare j=j+1/10; #end #declare i=i+1/10; #end #declare sm1=slope_map{ [0,<0,1>] [0.02,<1,.5>] [0.98,<1,-.5>] [1,<0,-1>]} #declare steelcheck=texture{st pigment{color rgb <.8,.85,1>} normal{ average normal_map{ [1,gradient x slope_map{sm1}] [1,gradient z slope_map{sm1}] } }} plane{y,-.3 texture{steelcheck translate (x+z)*.5}}