//Snowman.pov //Kurt Bangert 1996 //http://www.travelnotes.de //This file produces snow using only standard Pov-Ray statements. //The snow is a bubble (sphere) with a texture. //Maybe one could rotate the sphere for an animation. The appearance //of the snowflakes depends on the +A (antialiasing) switch of Povray, //so please run this file only with antialiasing on. #include "colors.inc" #include "textures.inc" //a texture for falling snow #declare frac = 0.033 //fraction of texture covered by White #declare frac1= frac+0.001 #declare falling_snow = texture { pigment { radial color_map { [ 0.00 color Clear ] [ 0.5-frac1 color Clear ] [ 0.5-frac color White ] [ 0.5+frac color White ] [ 0.5+frac1 color Clear ] [ 1.00 color Clear ]} turbulence 1 octaves 6 omega 8 } finish { Luminous } } //a texture for the hat #declare hat_texture = texture { pigment {Gray95} finish {ambient .1 diffuse .1}} //snow on the ground #declare snow_patch = object { blob { threshold 0.5 component 1,.6, <-2.5, .5, 0> component 1,1 <2.5, 0, -2> component 1,1, <-2, .4, 0> component 1,1.3, <2, 0, -2> component 1,1.2, <-1.5, 0, 0> component 1,.8, <1.2, .3, -2> component 1,1.1, <0, 0, 0> component 1,1.1, <0, 0, -2> component 1,.8, <1.2, .3, 0> component 1,1.2, <-1.5, 0, -2> component 1,1.3, <2, 0, 0> component 1,1, <-2, .4, -2> component 1,1 <2.5, 0,-.5> component 1,2, <-2.5, .5, -2> component 1,.8, <1., .3, -1> component 1,.8, <1.2, .3, .5> texture { pigment { White } finish { ambient .7 diffuse .3 }}} } //black coal #declare coal = sphere {<0,0,0> .17 pigment { Gray90 } scale <1,1,.5> normal { bumps 1 scale 0.05 }} //assemble the Snow Man #declare SnowMan = union { //body sphere { <0, 1.9, 0> 2 scale <1,.9,1> } object { object { coal translate <0,0,-2> } rotate x*30 translate y*1.9 } object { object { coal translate <0,0,-2> } rotate x*10 translate y*1.9 } sphere { <0, 4.4, 0> 1.2 scale <1,.9,1> } object { object { coal translate <0,0,-1.2> } rotate x*30 translate y*4.4 scale <1,.9,1> } object { object { coal translate <0,0,-1.2> }rotate x*0 translate y*4.4 scale <1,.9,1> } object { torus {1.5,.3} scale <1,.6,1> rotate x*90 translate <0,3.2,0> } //head sphere { <0, 5.7, 0> .8 } object { object { coal scale <.7,.7,.3> translate <0,0,-.8> } rotate <20,20,0> translate y*5.7 } object { object { coal scale <.7,.7,.3> translate <0,0,-.8> } rotate <20,-20,0> translate y*5.7 } object { object { coal scale .2 translate <0,0,-.8> } rotate <-27,-20,0> translate y*5.7 } object { object { coal scale .2 translate <0,0,-.8> } rotate <-29,-10,0> translate y*5.7 } object { object { coal scale .2 translate <0,0,-.8> } rotate <-30, 0, 0> translate y*5.7 } object { object { coal scale .2 translate <0,0,-.8> } rotate <-29, 10,0> translate y*5.7 } object { object { coal scale .2 translate <0,0,-.8> } rotate <-27, 20,0> translate y*5.7 } //hat with snow ellipsoids disc { <0,6.3,0> <0,1,.1> 1 texture { hat_texture }} object { sphere {<0,0,0> .95 } clipped_by { plane{-y,0} } scale <1,.15,1> rotate x*10 translate y*6.3 } cylinder { <0,6.3,0><0,7.0,.07> .6 texture { hat_texture }} cylinder { <0,6.3,0><0,7.01,.07> .61 texture { falling_snow }} object { sphere{<0,0,0> .59 } scale <1,.15,1> rotate x*10 translate y*7 } //nose cone { <0, 5.7,-.7> .15 <0,5.4,-1.3> 0 pigment { Red }} pigment { color White} finish { ambient .7 diffuse.3 } normal { bumps 0.6 scale 0.2 } } //--------------- //The scene light_source { <20, 20, -50> color White } camera { location <0,5,-10> look_at <0,5,0> } //background sky object { sphere{ <0, 0, 0>, 1 no_shadow texture { Blue_Sky scale .2 }} scale <300, 100, 300> } fog { color Gray60 distance 100 } //falling snow sphere { <0,0,0> 1 scale 10 translate z*-10 texture { falling_snow } } object { plane {y,0} pigment {White} finish { ambient .7 diffuse .3 } normal { bumps 0.2 } } //patches of snow on the ground object { snow_patch scale <4,.5,4> translate <0,0,8> } object { snow_patch scale <4,.5,4> translate <2,0,10> } object { snow_patch scale <4,.5,4> translate <4,0,12> } //snowmen object { SnowMan scale 1.6 rotate y*10 translate <-3,-.2,8> } object { SnowMan scale 1.6 rotate y*30 translate < 5,-.2,28> } object { SnowMan scale 1.6 rotate y*40 translate <16,-.2,56> } object { SnowMan scale 1.6 rotate y*20 translate <30,-.2,84> } object { SnowMan scale 1.6 rotate y*40 translate <45,-.2,112> } object { SnowMan scale 1.6 rotate y*40 translate <60,-.2,140> } //End