#include "colors.inc" #include "metals.inc" #include "stones.inc" #include "glass.inc" #include "woods.inc" #declare K = 7; // no default radiosity //global_settings { ambient_light Black } //background { Blue } plane { y,0 texture { T_Wood1 } scale 4} plane { x, -30 texture { brick texture { pigment { Black } } , texture { T_Stone8 } mortar 0.5 brick_size <1,1,2>*5 } } plane { z, 30 texture { brick texture { pigment { Black } } , texture { T_Stone8 } mortar 0.5 brick_size <2,1,1>*5 } } //light_source { <20,10,-5> color White } //light_source { <-20,20,-5> color White } camera { location <20,10,-25> look_at <0,0,0> } //camera { location <20,10,-25>*0.4 look_at <0,2.5,0> } //////////////////////////////////////////////// #declare QuillPoint= difference { prism { linear_sweep linear_spline 0,0.5 7, <0,0>,<1,1>,<1,4>,<0,5>,<-1,4>,<-1,1>,<0,0> rotate <-90,0,0> } union { sphere { 0 1 scale <1.25, 5, 0.95> translate <-1,5,-1> } sphere { 0 1 scale <1.25, 5, 0.95> translate <+1,5,-1> } } box { <-1,0,0> <+1,4,-1> rotate <12.5,0,0> translate <0,3,-0.5> } sphere{ 0 0.2 translate <0,3,-0.5> } box{ <-0.01,3,-1> <+0.01,6,+1> pigment { Black } } scale <1,1.5,1> } //////////////////////////////////////////////// #declare QuillTexture = texture { T_Silver_5A finish { irid { 0.35 thickness .5 turbulence .5}} } //////////////////////////////////////////////// #declare Quill = union { // pointe object { QuillPoint texture { QuillTexture } } // Gugusse cylinder { <0,-2,0> <0,2,0> 1.2 pigment { Black } finish { F_MetalA } } #declare px = 1.6; #declare c = 0; #while (c<9) cylinder { <0,px-0.2,0> <0,px+0.02,0> 1.3 texture { T_Silver_5A } } #declare px = px -0.4; #declare c = c+1; #end // while cylinder { <0,-2,0> < 0,-20,0> 1.4 pigment { Black } finish { F_MetalA } } } //////////////////////////////////////////////// //////////////////////////////////////////////// #declare Scale= difference { prism { linear_sweep linear_spline 0,0.5 7, <0,0>,<1,1>,<1,4>,<0,5>,<-1,4>,<-1,1>,<0,0> rotate <-90,0,0> } union { sphere { 0 1 scale <1.25, 5, 0.95> translate <-1,5,-1> } sphere { 0 1 scale <1.25, 5, 0.95> translate <+1,5,-1> } } box { <-1,0,0> <+1,4,-1> rotate <12.5,0,0> translate <0,3,-0.5> } } //////////////////////////////////////////////// #declare Paw= difference { union { sphere { 0, 1 } sphere { 0 0.3 translate < sqrt(2),0, sqrt(2)>/2} sphere { 0 0.3 translate <-sqrt(2),0, sqrt(2)>/2} sphere { 0 0.3 translate < sqrt(2),0,-sqrt(2)>/2} sphere { 0 0.3 translate <-sqrt(2),0,-sqrt(2)>/2} sphere { 0 0.3 translate <0,0,-1> } } box{ <-2,-1,-2>, <2,0,2> } } //////////////////////////////////////////////////////////////// // body //#declare HogTexture = texture { pigment { Green } } #declare HogTexture = texture { T_Silver_5E finish { irid { 0.35 thickness .5 turbulence .5}} } #declare EyesTexture = texture { pigment { Red } } #declare rayon = 5; // pattes object { Paw translate < sqrt(2),0, sqrt(2)>*(rayon/2) texture { HogTexture }} object { Paw translate < -sqrt(2),0, sqrt(2)>*(rayon/2) texture { HogTexture }} object { Paw translate < sqrt(2),0,-sqrt(2)>*(rayon/2) texture { HogTexture }} object { Paw translate < -sqrt(2),0,-sqrt(2)>*(rayon/2) texture { HogTexture }} // body difference { sphere {0,rayon} box { <-rayon-0.1,-rayon-0.1,-rayon-0.1> } texture { HogTexture } } // Face difference { cone { <0,2,-rayon+2> 2.9 <0,1,-rayon-3> 0 scale <1,0.75,1> } box { <-1,0,-rayon-3> <1,3,-rayon-2+0.5> } texture { HogTexture } } // eyes sphere { 0, 0.3 texture { EyesTexture } translate <-0.75,2.25,-rayon-0.5> } sphere { 0, 0.3 texture { EyesTexture } translate <+0.75,2.25,-rayon-0.5> } //////////////////////////////////////////////////////////////// // scales #declare dapos = 15; #declare dzpos = 0.5; #declare c = 1; #declare zpos = -rayon +0.5; #while (zpos < rayon) #if (c=1) #declare apos = -90+7.5; #declare lpos = +90-7.5; #declare c=0; #else #declare apos = -75; #declare lpos = 75; #declare c=1; #end #while (apos<90) object { Scale scale 0.5 rotate <15,0,0> // tilt translate <0, sqrt(pow(rayon,2)-pow(zpos,2)), zpos> // translate rotate <0,0,apos> // rotate around main axis translate <0,0.5,0> texture { HogTexture } } #declare apos = apos+dapos; #end // apos #declare zpos = zpos + dzpos; #end // zpos //////////////////////////////////////////////////////////////// // autre cochonneries dans le decor object { #declare LampColor= White; #declare LampGranularity=K; #include "..\OtherIncludes\Table_lamp.inc" scale 7 translate <-10,0,-12> } object { Quill scale 0.25 rotate <90,0,0> rotate <0,0,34> rotate <0,180+31,0> translate <+5,0.25+0.1,-10> // +0.1= epaisseur de la stack de papier } cylinder { <3.5,0,-12> <3.5,3,-12> 0.25*1.4 pigment { Black } finish { F_MetalA } } object { #declare ComputerScreenDisplay = "c:/user/testdata/images/screenshots/desktop7.tga" #declare ComputerScreenRadiance = K; #declare ComputerScreenAngle = 10; #include "..\otherIncludes\ComputerScreen.inc" scale 16 rotate <0,11,0> //translate <1.5,0,-1> translate <15,0,15> } #include "..\otherIncludes\keyboard.inc" object { Keyboard scale 12 scale <1,0.5,1> rotate <0,-12,0> translate <20,0,-15> } // stack of paper // top of stack #declare c = 1; #declare r = seed(0); #while (c<10) polygon { 4, <0,0>, <0,1>,<1,1>,<1,0> scale <.483,.722,1> scale 20 rotate <90,0,0> rotate <0,(rand(r)-rand(r))*10,0> translate <2+rand(r)-rand(r),0.01*c,-15-(rand(r)+rand(r))> pigment { White } } #declare c=c+1; #end polygon { 4, <0,0>, <0,1>,<1,1>,<1,0> pigment { image_map { gif "c:\user\testdata\images\bilevel\hiero\am24.gif" interpolate 4} } scale <.483,.722,1> scale 20 rotate <90,0,0> rotate <0,-15,0> translate <2,0.1,-15> } /////////////////////////////////////////////////////// // bodum cup of coffee... kind of //#declare TextureAnse = pigment { Blue } #declare TextureAnse = texture { pigment { color rgbft < 0,0,0.9, 0.99, 0.3 > } finish { //roughness 0.05 specular 1 ambient 0 diffuse 0 refraction on // helps a lot! ior 1.5 refraction 0.9 reflection 0.15 caustics 0.7 } } #declare CoffeeTexture = texture { pigment { color rgbft < 0.3,0.16,0.10, 1, 0.3 > } // reddish-brown finish { //roughness 0.05 specular 0.1 ambient 0 diffuse 0 refraction on // helps a lot! ior 1.5 refraction 0.9 reflection 0.15 caustics 0.5 } } // cup union { merge // cup { lathe { linear_spline //cubic_spline 8, <0,0>,<4,0>,<4,5>,<4.2,5.9>,<4,6>,<3.9,5>,<3.9,0.1>,<0,0.1> } torus { 4.1 0.075 translate <0,5.95> } texture { T_Glass3 } interior { I_Glass } finish { caustics 1.5 } } cylinder { <0,0.01,0> <0,3.2,0> 3.89 texture { CoffeeTexture} } // coffee cylinder { <0,4.5,0> <0,5,0> 4.01 open texture { T_Silver_5E } } // ring box { <-0.5,4.5,-5> <+0.5,5,-4> texture {T_Silver_5E} } // joint (?) difference // poignee { superellipsoid { <0.25, 0.25> scale <0.2,1,1.5> texture { TextureAnse } } // frosted blue superellipsoid { <0.25, 0.25> scale <1,0.7,1.5*0.65> } box { <-1,-1,-0.01> <+1,+1,+2> } scale 2 translate <0,3,-4> } scale <0.5,1,0.5> translate <2,0,-15> }