// tfester@scivit.de // Persistence of Vision Ray Tracer Scene Description File #version 3.6; global_settings { assumed_gamma 1.0 // max_trace_level 25 //radiosity {} } #declare Cameraz = camera { location <1, 0, -10> look_at <0, 0, 0> } camera {Cameraz} background {color srgb<3,38,66>/255} #default{ finish{ambient 0.1 diffuse 0.9 } } // create a regular point light source light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate <1, 1, -200> } light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate <-100, 100, 00> } // Textures #declare T_pois=texture { pigment {color rgb x} finish { ambient 1 specular 0 roughness 0 reflection 0 } } texture { pigment { leopard color_map { [ 0.0 rgbft <0.501961, 0.25098, 0.25098, 0.0, 0.0> ] [ 0.1 rgbft <1.0, 0, 0, 0.0, 0.0> ] [ 0.8 rgbft <1.0, 0, 0, 0.0, 0.0> ] [ 1.0 rgbft <1.0, 1.0, 1.0, 0.0, 0.10> ] } } scale <0.1,0.1,0.1>/2 translate <0.5,0.5,0.9> rotate 20 finish { ambient 0.9 diffuse 0.65 brilliance 1.5 specular 0.85 roughness 0.01 reflection 0.4 } } #declare T_ribbon=texture { pigment {color rgb x+y} finish { ambient 0.2 diffuse 0.8 reflection 0.5 } } // Macro that returns a shell and a light pointing on the opening #macro create_shell(position, zoom, rotation) //Light in the opening of the snail shell light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate (position + <2, -2.5, 0>)*zoom } //Shell //Spiral parameters #declare Inclination = 0.01045; #declare HeightVariable = 0.105; #declare RadiusVariable = 0.0355; #declare ThicknessVariable = 0.04; //Starting position on y-axix #declare YStart = 3.9; union { blob { threshold 0.6 #declare ticker = 0; #while (ticker<400) #declare Angle = 5.5 * ticker; #declare Radius = RadiusVariable * exp(Inclination*ticker); #declare DeltaY = HeightVariable * exp(Inclination*ticker); #declare Gauge = ThicknessVariable * exp(Inclination*ticker); sphere { <0, 0, 0>, 1.2*Gauge , 0.3 //This sphere produces the solid shell translate rotate <0, Angle, 0> pigment { //color rgb<46, 147, 26>/255 color rgb<2, 42, 5>/255 } } sphere { <0, 0, 0>, 0.9*Gauge , -1 //And this sphere is substracted produces the inner void translate <0.9*Radius, YStart - DeltaY, 0> rotate <0, Angle, 0> pigment { color rgb<255, 255, 0>/255 // solid color pigment } } // Decorations - "spikes" #if (mod(ticker, 10) = 0) //a spike is inserted every thenth element sphere { <0, 0, 0>, Gauge/3 , 0.5 scale <4, 1, 1> translate rotate <0, 0, 50> //This rotation produces the upper row of spikes translate rotate <0, Angle, 0> pigment { color rgb<238, 29, 40>/255 // solid color pigment } } sphere { <0, 0, 0>, Gauge/3 , 0.5 scale <4, 1, 1> translate rotate <0, 0, -15> //and this rotation produces the lower row of spikes translate rotate <0, Angle, 0> pigment { color rgb<248, 224, 25>/255 // solid color pigment } } #else #end #declare ticker = ticker + 1; #end } //A gift union { box {<0,0,0> <1,1,1> //pigment{color rgb x} texture{T_pois} } box {<0.4,-.01,-.01> <0.6,1.01,1.01> //pigment{color rgb x+y} texture{T_ribbon} } box {<-.01,-.01,0.4> <1.01,1.01,0.6> //pigment{color rgb x+y} texture{T_ribbon} } sphere {<0,0,0> 0.15 //pigment{color rgb x+y} texture{T_ribbon} translate <0.5,1,0.5> } rotate <-10,10,10> scale 1.8 translate <1, -4.5, -1> } rotate rotation translate position scale zoom } //Stripes blob { threshold 0.6 #declare ticker = 0; #while (ticker<396) #declare Angle = 5.5 * ticker; #declare Radius = RadiusVariable * exp(Inclination*ticker); #declare DeltaY = HeightVariable * exp(Inclination*ticker); #declare Gauge = ThicknessVariable * exp(Inclination*ticker); #declare ticker2 = 0; #while (ticker2< 10) sphere { <0, 0, 0>, 0.1*Gauge , 1 scale <1, 0.5 4> translate <0.8*Gauge, 0, 0> rotate <0, 0, -25+ticker2*10> //This rotation produces the various stripes translate rotate <0, Angle, 0> pigment { color rgb<255, 255, 255>/255 } } #declare ticker2 = ticker2 + 1; #end #declare ticker = ticker + 1; #end rotate rotation translate position scale zoom } #end create_shell(<0,0,0>,<1,1,1>,<0,0,0>) create_shell(<-5,-5,-3>,<1,1,1>/2,<-20,30,10>)