#include "colors.inc" #include "woods.inc" #include "metals.inc" #include "textures.inc" /* Epaisseur de la table (et de ses pieds) */ #declare Thickness = 0.09; /* Hauteur de la table */ #declare Height = 1.12; /* Demi-largeur de la table */ #declare HalfWidth = 1; /* Debordement de la table par rapport a ses pieds */ #declare Offset = 0.09; /* Hauteur du verre */ #declare GlassHeight = 0.28; /* Le modele de verre */ #declare Glass = difference { /* L'exterieur */ cylinder { <0, Height+Thickness, 0>, <0, Height+Thickness+GlassHeight, 0>, 0.4*GlassHeight pigment { color Red transmit 0.8} } /* L'interieur (on le fait un peu plus haut pour être sur d'evider le verre */ cylinder { <0, Height+Thickness, 0>, <0, Height+Thickness+(1.01*GlassHeight), 0>, 0.399*GlassHeight pigment { color Red transmit 0.8} } }; /* Le modele de chaise */ #declare TextureChair = texture { T_Brass_4B} #declare Chair = union { cylinder { <-1, 0, 1>, <-1, 1, 1>, 0.1 texture {TextureChair}} cylinder { <1, 0, 1>, <1, 1, 1>, 0.1 texture {TextureChair}} cylinder { <-1, 0, -1>, <-1, 1, -1>, 0.1 texture {TextureChair}} cylinder { <1, 0, -1>, <1, 1, -1>, 0.1 texture {TextureChair}} box { <-1.2, 1, -1.2>, <1.2, 1.1, 1.2> texture {TextureChair} } } #declare TextureTable = texture { P_WoodGrain4A } camera { location <1.9*HalfWidth, 2.3*Height, 2.6*HalfWidth> look_at <0, 0, 0> } /* Plancher */ plane { /* On indique la normale au plan: l'axe vertical */ <0, 1, 0>, 0 pigment { color White } } /* Pieds de la table */ cylinder { , , Thickness texture {TextureTable} } cylinder { , , Thickness texture {TextureTable} } cylinder { <-HalfWidth, 0, -HalfWidth>, <-HalfWidth, Height, -HalfWidth>, Thickness texture {TextureTable} } cylinder { <-HalfWidth, 0, HalfWidth>, <-HalfWidth, Height, HalfWidth>, Thickness texture {TextureTable} } /* Plateau de la table */ box { < - (HalfWidth + Offset), Height + Thickness, - (HalfWidth + Offset)>, < HalfWidth + Offset, Height, HalfWidth + Offset> texture {TextureTable}} /* Verres */ object {Glass translate <0.5*HalfWidth, 0, 0.3*HalfWidth>} object {Glass translate <-0.8*HalfWidth, 0, 0.3*HalfWidth>} object {Glass translate <0.56*HalfWidth, 0, -0.39*HalfWidth>} object {Glass translate <-0.5*HalfWidth, 0, 0.7*HalfWidth>} /* Carafe */ union { difference { /* L'exterieur */ cylinder { <0, Height+Thickness, 0>, <0, Height+Thickness+(GlassHeight*2.8), 0>, 0.4*(GlassHeight*2.8) pigment { color White transmit 0.7} } cylinder { <0, Height+Thickness, 0>, <0, Height+Thickness+(1.01*GlassHeight*2.8), 0>, 0.399*(GlassHeight*2.8) pigment { color White transmit 0.7} } } /* L'eau */ cylinder { <0, Height+Thickness, 0>, <0, Height+Thickness+(0.5*GlassHeight*2.8), 0>, 0.399*(GlassHeight*2.8) texture {Water} } } /* Chaises */ object {Chair translate <-5.5, 0, -4.2> scale <0.4, 0.8, 0.4>} object {Chair translate <4.7, 0, -1.1> scale <0.4, 0.8, 0.4>} object {Chair translate <4.2, 0, 3.9> scale <0.4, 0.8, 0.4>} object {Chair translate <-0.9, 0, 3.5> scale <0.4, 0.8, 0.4>} light_source {<4, 15, 25> color White} light_source {<20, 19, 8> color White}