/*#include "colors.inc" #include "woods.inc" camera{ orthographic location <100,50,100> look_at <0,0,0> angle 80 } background{color Gray90} light_source{<50,90,100> color White} */ // Plateau créé à partir d'objets CSG // Le plateau correspond à un pavé (box) et à deux sphères ajoutées à chaque extrémité du pavé, pour donner une forme ovale à la table #declare plateau= difference{ union { box {<-30, 50, 50> < 40, 60, -50>} difference{ sphere {<30, 55,0>, 50} box {<-20,60,-50> <160,120,50>} box {<-20,50,-50> <160,-120,50>} } difference{ sphere {<-30, 55,0>, 50} box {<20,60,-50> <-100,120,50>} box {<20,50,-50> <-100,-120,50>} } // Les torus et les cylindres suivants permettent d'arrondir les angles torus {50, 5 translate <30,55,0>} torus {50, 5 translate <-30,55,0>} cylinder {<30,55,50> <-30,55,50> 5} cylinder {<30,55,-50> <-30,55,-50> 5} } // Les cylindres et les torus suivants permettent de créer la rainure tout autour du plateau cylinder {<60,57,54> <-60,57,54> 1} cylinder {<60,57,-54> <-60,57,-54> 1} torus {54, 1 translate <31,57,0>} torus {54, 1 translate <-31,57,0>} } // Pied créé à partir d'objets CSG // Chaque pied est construit à partir d'un cylindre auquel est retiré des torus pour former des motifs #declare pied= union { difference { cylinder {<50,50,30> <50,-30,30> 5} torus {5,1 translate <50,-20,30>} torus {5,1 translate <50,6,30>} torus {5,1 translate <50,0,30>} torus {5,1 translate <50,30,30>} torus {5,1 translate <50,36,30>} } torus {3,2 translate <50,-30,30>} texture {T_Wood14 scale 80 } } // Assemblage de tous les éléments de la table #declare table= union { object {pied finish{phong 1 diffuse 0.6 reflection 0.1 ambient 0.4}} object {pied finish{phong 1 diffuse 0.6 reflection 0.1 ambient 0.4} translate -60*z} object {pied finish{phong 1 diffuse 0.6 reflection 0.1 ambient 0.4} translate -100*x} object {pied finish{phong 1 diffuse 0.6 reflection 0.1 ambient 0.4} translate -60*z translate -100*x} object {plateau texture {T_Wood14 scale 80 } finish{phong 1 diffuse 0.6 reflection 0.1 ambient 0.4 }} box {<46,50,32>,<-46,40,28> texture {T_Wood14 scale 80 }} box {<46,50,32>,<-46,40,28> texture {T_Wood14 scale 80 } translate -60*z} box {<51,50,26>,<47,40,-26> texture {T_Wood14 scale 80 }} box {<52,50,26>,<48,40,-26> texture {T_Wood14 scale 80 } translate -100*x} translate -61*y } //object {table }