/*------------------------------------------------------------------------------ Script : Robinet.PoV pour PoV 2.0. Auteur : Krohorl Date : 15-Dec-1993, repris le 19-Nov-1994 Descrip : ------------------------------------------------------------------------------*/ #declare Transparent = color red 1.00 green 1.00 blue 1.00 filter 1.00 #declare Blanc = color red 1.00 green 1.00 blue 1.00 #declare RougeClair = color red 1.00 green 0.60 blue 0.70 #declare Epsilon = 0.01 // --- Un metal peint vein‚ de rouge --- #declare MetalPeintCol1 = color red 0.55 green 0.65 blue 1.00 #declare MetalPeintCol2 = color red 0.45 green 0.85 blue 0.90 #declare MetalPeintCol3 = color red 0.95 green 0.35 blue 0.45 #declare MetalPeintFinish = finish { specular 0.6 roughness 0.01 metallic brilliance 0.4 reflection 0.1 } #declare MetalPeint = texture { pigment { bozo turbulence 0.2 scale 0.3 color_map { [0.45 color MetalPeintCol1] [0.55 color MetalPeintCol2] } } } texture { pigment { marble turbulence 1.3 octaves 2 omega 0.9 scale <0.60,0.60,0.05> color_map { [0.45 color Transparent] [0.50 color MetalPeintCol3] [0.60 color MetalPeintCol3] [0.65 color Transparent] } } finish { MetalPeintFinish } } // --- L'eau des gouttes et du bassin --- #declare EauColVerte = color red 0.20 green 1.00 blue 0.80 #declare EauColRouge = color red 1.00 green 0.20 blue 0.50 #declare EauColBleue = color red 0.30 green 0.20 blue 1.00 #declare EauColOrange = color red 1.00 green 0.70 blue 0.20 #declare EauTex = texture { pigment { color EauColVerte filter 0.9 } finish { ambient 0.6 diffuse 0.5 specular 0.8 roughness 0.02 refraction 1 ior 1.7 } } #declare EauSurfTex = texture { EauTex normal { ripples 0.3 frequency 2 } finish { reflection 0.3 } } #declare EauVerteTex = texture { EauTex } #declare EauRougeTex = texture { EauTex pigment { color EauColRouge filter 0.9 } } #declare EauBleueTex = texture { EauTex pigment { color EauColBleue filter 0.9 } } #declare EauOrangeTex = texture { EauTex pigment { color EauColOrange filter 0.9 } } // --- L'‚spŠce de marbre de la table --- #declare TableCol1 = color red 0.77 green 0.85 blue 0.90 #declare TableCol2 = color red 0.55 green 0.50 blue 0.65 #declare TableTex = texture { pigment { granite turbulence 0.6 lambda 1 scale 10 color_map { [0.3 color TableCol1] [1.0 color TableCol2] } } finish { ambient 0.1 diffuse 0.6 reflection 0.3 } } // --- Le tube coud‚ du robinet --- #declare RobSection=0.2 #declare RobTube = union { // --- Coude principal --- difference { torus { 1,RobSection rotate <90,0,0> } plane { <0,1,0> 0 } plane { <0,1,0> 0 rotate <0,0,40> } } // --- Prolongement et petit coude --- union { cylinder { <0,0,0> <2,0,0> RobSection } union { difference { torus { 1,RobSection rotate <90,0,0> } plane { <1,0,0> 0 } plane { <1,0,0> 0 inverse rotate <0,0,-40> } } cylinder { <0,0,0> <1,0,0> RobSection rotate <0,0,-40> translate <0.64279,0.76604,0> } translate <2,-1,0> } rotate <0,0,-50> translate <0.76604,0.64279,0> } bounded_by { box { <-1-RobSection,-3,-RobSection> <3,1+RobSection,RobSection> } } } // --- L'embout du tube --- #declare EmbSection=0.26 #declare EmbCongeSec=EmbSection-RobSection #declare RobEmbout = union { cylinder { <-1,0,0> <-1,-0.5,0> EmbSection } torus { EmbSection-EmbCongeSec,EmbCongeSec translate <-1,0,0> } torus { EmbSection-EmbCongeSec,EmbCongeSec translate <-1,-0.5,0> } bounded_by { box { <-1-EmbSection,-0.5-EmbCongeSec,-EmbSection> <-1+EmbSection,0+EmbCongeSec,EmbSection> } } } // --- Le robinet complet --- #declare Robinet = object { union { object { RobTube } object { RobEmbout } } texture { MetalPeint } } // --- Les manettes du robinet --- #declare Coup = 0.8 #declare Alpha = 36.86990 // ArcCos(Coup) #declare DiaCoup = 0.600000 // Sin(Alpha) #declare DiaCongMin = 0.3 #declare Dx = 0.24000 // DiaCongMin*Cos(Alpha) #declare Dy = 0.18000 // DiaCongMin*Sin(Alpha) #declare DiaCongMaj = DiaCoup-Dy #declare DiaTige = DiaCongMaj-Dy #declare TigeCentHau = 5 // --- Ce qui sert … rendre soft le retour sur les tiges --- #declare Conge = object { torus { DiaCongMaj,DiaCongMin } bounded_by { box { <-Coup+Dy-DiaCongMin,-DiaCongMin,-Coup+Dy-DiaCongMin>, } } rotate <90,0,0> translate <0,0,-Coup+Dx> } // --- Le centre qui relie les 4 tiges plus l'axe --- #declare Centre = union { // --- La sphŠre tronqu‚e --- intersection { sphere { <0,0,0>,1 } box { <-Coup,-Coup,-Coup>, } } object { Conge } object { Conge rotate <0,-90,0> } object { Conge rotate <0,-180,0> } object { Conge rotate <0,-270,0> } object { Conge rotate <-90,0,0> } bounded_by { box { <-Coup-DiaCongMin,-Coup-DiaCongMin,-Coup-DiaCongMin>, } } } // --- Les tiges tronc-coniques arrondies au bout --- #declare Tige = union { cone { <0,0,0>,DiaTige,<1.5,0,0>,DiaTige*1.8 } sphere { <0,0,0>,DiaTige*1.8 scale <0.7,1,1> translate <1.5,0,0> } bounded_by { box { <0,-DiaTige*1.8,-DiaTige*1.8>,<1.5+DiaTige*1.8*0.7,DiaTige*1.8,DiaTige*1.8> } } translate } // --- La manette complŠte --- #declare Manette = object { union { cylinder { <0,0,0>,<0,TigeCentHau,0>,DiaTige*1.2 } union { object { Centre } object { Tige } object { Tige rotate <0,90,0> } object { Tige rotate <0,180,0> } object { Tige rotate <0,270,0> } translate <0,TigeCentHau,0> } } texture { MetalPeint } scale 0.40 } // --- Les gouttes --- #declare GnTrunc=0.05 #declare GnPtLimite = cylinder { <0,-0.55277,0> <0,-GnTrunc,0>,1 } #declare GnBdLimCyl = cylinder { <0,-0.86332,0> <0,0,0>,1 } #declare GnBdLimBox = box { <-1,-0.86332,-1> <1,0,1> } #declare GoutteForme = union { // --- Un int‚rieur de tore dont le trou est r‚duit … rien --- intersection { torus { 1,1 inverse } object { GnPtLimite } } // --- Une sphŠre au bout --- sphere { <0,-0.66332,0>,0.2 } bounded_by { GnBdLimBox } translate <0,GnTrunc,0> } #declare GoutteVerte = object { GoutteForme texture { EauVerteTex } } #declare GoutteRouge = object { GoutteForme texture { EauRougeTex } } // --- Le robinet complet et ses gouttes gouttantes -- #declare RobinetGouttant = union { object { Robinet } object { GoutteVerte scale <1,1.2,1> translate <-1+0.5*RobSection,-0.3,0> } object { GoutteRouge translate <-1+0.5*RobSection,-1.4,0> } translate <0,2.45,0> } // --- La table qui supporte le tout --- #declare TableLong=25 #declare TableLarg=13 #declare TableEpa=1 #declare SupRobTail=2 #declare SupRobCoin=2.2 #declare SupRobEpa=1 #declare EcoulEpa = 0.14 #declare EcoulLon = 5 #declare EcoulEcar = 3*EcoulEpa #declare EcoulCreux = cylinder { <0,0,-EcoulLon-13>,<0,0,EcoulLon-13>,EcoulEpa scale <1,0.5,1> translate <0,TableEpa,0> } #declare Ecoulement = union { object { EcoulCreux translate <-9*EcoulEcar,0,0> } object { EcoulCreux translate <-8*EcoulEcar,0,0> } object { EcoulCreux translate <-7*EcoulEcar,0,0> } object { EcoulCreux translate <-6*EcoulEcar,0,0> } object { EcoulCreux translate <-5*EcoulEcar,0,0> } object { EcoulCreux translate <-4*EcoulEcar,0,0> } object { EcoulCreux translate <-3*EcoulEcar,0,0> } object { EcoulCreux translate <-2*EcoulEcar,0,0> } object { EcoulCreux translate <-1*EcoulEcar,0,0> } object { EcoulCreux } object { EcoulCreux translate < 1*EcoulEcar,0,0> } object { EcoulCreux translate < 2*EcoulEcar,0,0> } object { EcoulCreux translate < 3*EcoulEcar,0,0> } object { EcoulCreux translate < 4*EcoulEcar,0,0> } object { EcoulCreux translate < 5*EcoulEcar,0,0> } object { EcoulCreux translate < 6*EcoulEcar,0,0> } object { EcoulCreux translate < 7*EcoulEcar,0,0> } object { EcoulCreux translate < 8*EcoulEcar,0,0> } object { EcoulCreux translate < 9*EcoulEcar,0,0> } // --- Le bounded met la grouille dans la suite, alors je le vire... // bounded_by { box { <-9*EcoulEcar-EcoulEpa,-EcoulEpa,-EcoulLon-13>,<9*EcoulEcar+EcoulEpa,EcoulEpa,EcoulLon-13> scale 1.1 } } } #declare Table = object { union { // --- Le plateau de la table et ses alv‚oles --- difference { box { <-TableLarg/2,-2,-TableLong>, } plane { <1,0,0>,0 rotate <0,0,-45> translate <-TableLarg/2,TableEpa/2,0> } object { Ecoulement } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <3.6,TableEpa,-3.0> } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <3.6,TableEpa,3.0> } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <4.5,TableEpa,-5.8> } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <4.5,TableEpa,5.8> } object { blob { threshold 0.6 component 1, 0.57, <0, 0.45, 0.08> component 1, 0.77, <0, -0.33, -0.55> component 1, 0.84, <0, -0.35, 0.45> component 1, 0.50, <0, 1.20, 0.53> component 1, 0.30, <0, -0.90, -0.74> } bounded_by { box { <-0.50,-1.15,-1.10>,<0.50,0.80,1.10> } } rotate <0,0,90> rotate <180,0,0> scale <4.8,5,9> translate <-2.0,TableEpa,0> } } union { // --- Le bloc support de l'ovo‹de --- intersection { box { <-SupRobTail/2,TableEpa,-SupRobTail/2>, } box { <-SupRobCoin/2,TableEpa-1,-SupRobCoin/2>, rotate <0,45,0> } } // --- L'ovo‹de support du tuyau du robinet --- difference { sphere { <0,0,0>,SupRobEpa } // --- Le creux d'o— sortent les trucs --- sphere { <0,0,0>,RobSection*1.5 scale <1,0.5,1> translate <0,SupRobEpa,0> } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <0,SupRobEpa,0> rotate <55,0,0> } sphere { <0,0,0>,DiaTige*1.4 scale <1,0.5,1> translate <0,SupRobEpa,0> rotate <-55,0,0> } scale <1,2/3,1> translate <0,TableEpa+SupRobEpa+SupRobEpa/3,0> } bounded_by { box { <-SupRobTail/2,TableEpa,-SupRobTail/2>, } } translate <2.25,0,0> } } texture { TableTex } } // --- Les indicateurs d'eau --- #declare IndicateurForme = sphere { <0,0,0>,0.2 scale <1,1.4,1> translate <0,TableEpa,0> } #declare IndicateurVert = object { IndicateurForme texture { EauVerteTex } } #declare IndicateurRouge = object { IndicateurForme texture { EauRougeTex } } #declare IndicateurBleu = object { IndicateurForme texture { EauBleueTex } } #declare IndicateurOrange = object { IndicateurForme texture { EauOrangeTex } } // --- La surface de l'eau --- #declare Eau = object { box { <-TableLarg/2+0.1,-2+0.1,-TableLong/2+0.1>, } texture { EauSurfTex } } // --- L'ensemble robinet gouttant, manettes, table et eau --- #declare EnsembleTable = union { object { Table } object { Eau } object { RobinetGouttant translate <0,TableEpa+2*SupRobEpa,0> } object { Manette rotate <0,37,0> rotate <65,0,0> translate <2.25,TableEpa+SupRobEpa+SupRobEpa/3,0> } object { Manette rotate <0,7,0> rotate <-65,0,0> translate <2.25,TableEpa+SupRobEpa+SupRobEpa/3,0> } object { Manette rotate <0,66,0> translate <3.6,0,3.0> } object { IndicateurVert translate <2.7,0,3.0> } object { Manette rotate <0,42,0> translate <3.6,0,-3.0> } object { IndicateurRouge translate <2.7,0,-3.0> } object { Manette rotate <0,66,0> translate <4.5,0,5.8> } object { IndicateurOrange translate <3.6,0,5.8> } object { Manette rotate <0,42,0> translate <4.5,0,-5.8> } object { IndicateurBleu translate <3.6,0,-5.8> } } // --- Le fond --- #declare MursCol1 = color red 0.87 green 0.60 blue 0.60 #declare MursCol2 = color red 0.90 green 0.90 blue 1.00 #declare MursTex = texture { pigment { granite turbulence 0.3 scale 20 color_map { [0.0 color MursCol1] [1.0 color MursCol2] } } normal { wrinkles 0.04 scale <0.6,1.2,0.6> } finish { ambient 0.2 diffuse 0.2 reflection 0.4 } } #declare TabletteHaut = TableEpa+15 #declare TabletteBas = TableEpa+3 #declare Coin = object { difference { box { <-100,-10,-200>, inverse } box { <0,TabletteBas,-50>, } } texture { MursTex } } // --- Un metal dor‚ --- #declare AssCol1 = color red 1.0 green 0.7 blue 0.6 #declare AssCol2 = color red 0.9 green 0.85 blue 0.75 #declare AssCol3 = color red 0.60 green 0.60 blue 0.75 #declare AssCol4 = color red 0.30 green 0.70 blue 0.55 #declare AssTex1 = texture { pigment { color AssCol1 } finish { ambient 0.3 diffuse 0.6 specular 0.8 roughness 0.002 metallic reflection 0.1 } } #declare AssTex2 = texture { pigment { color AssCol2 } normal { bumps 0.2 scale 0.5 } finish { ambient 0.3 diffuse 0.5 specular 0.6 roughness 0.006 reflection 0.1 } } #declare AssTex3 = texture { pigment { color AssCol3 } normal { bumps 0.2 scale 0.5 } finish { ambient 0.3 diffuse 0.5 specular 0.5 roughness 0.002 metallic reflection 0.1 } } #declare AssTex4 = texture { pigment { color AssCol4 } normal { bumps 0.2 scale 0.5 } finish { ambient 0.3 diffuse 0.5 specular 0.5 roughness 0.002 metallic reflection 0.1 } } #include "RobAssie.Inc" #declare AssietteUne = object { Assiet1 scale 1/130 rotate <-180,0,0> rotate <0,90,0> texture { AssTex1 } } #declare AssietteDeux = object { Assiet1 scale 1/130 rotate <-180,0,0> rotate <0,90,0> texture { AssTex2 } } #declare AssietteTrois = object { Assiet1 scale 1/130 rotate <-180,0,0> rotate <0,90,0> texture { AssTex3 } } #declare AssietteQuatre = object { Assiet1 scale 1/130 rotate <-180,0,0> rotate <0,90,0> texture { AssTex4 } } // === ScŠne === #declare CameraNormale = camera { location <0,12,-28> direction <0,0,3.5> look_at <1,3.2,0> } #declare CameraLarge = camera { location <0,15,-42> direction <0,0,3.5> look_at <2,3.5,0> } #declare CameraSpeciale = camera { location <0,TabletteBas,-32> direction <0,0,4> look_at <0,TabletteBas,0> } camera { CameraLarge } #declare BackColor = color red 0.45 green 0.85 blue 0.90 background { color BackColor } #declare DemiBlanc = color red 0.50 green 0.50 blue 0.50 #declare Light = light_source { <0,0,0> color DemiBlanc area_light <0.5,0,0>,<0,0.35,0>,4,4 jitter } //#declare Light = light_source { <0,0,0> color DemiBlanc } object { Light rotate <0,20,0> translate <10,10,-20> } object { Light rotate <0,-20,0> translate <-10,10,-20> } union { object { Coin } object { EnsembleTable } object { AssietteUne rotate <0,0,-20> translate } object { AssietteDeux rotate <0,0,-25> translate } object { AssietteTrois rotate <0,0,-20> translate } object { AssietteQuatre rotate <0,0,-23> translate } rotate <0,-55,0> }