#include "logo.inc" // textures #declare T_AluNoir = texture { pigment {color rgb <0.44,0.43,0.45>} finish { ambient 0.1 brilliance 6 diffuse 0.7 metallic specular 0.6 roughness 1/120 reflection 0.7 } } #declare T_Verre1 = texture { pigment { color rgbf<0.98,1,0.98,0.95> } finish { specular 0.1 reflection {0.01,0.2} } } #declare T_PlastiqueBeige = texture { pigment {color rgb <1.000,0.953,0.702>} normal {bumps 0.05 scale 0.02} finish {phong 0.9} } #declare T_Plastoche = texture { pigment {color rgb <0.373,0.051,0.055>} normal {bumps 0.45 scale 0.02} finish {phong 0.9} } #declare T_BordEchiquier = texture { pigment {agate color_map { [0.3 color rgb <0.353,0.616,0.612>] [0.5 color rgb <0.169,0.420,0.486>] [0.55 color rgb <0.169,0.420,0.486>] [0.6 color rgb <0.169,0.420,0.486>] [0.9 color rgb <0.255,0.573,0.529>] } } normal { agate 0.7 } finish { specular 0.4 reflection 0.3 conserve_energy } } #declare T_CaseBlanche = texture { pigment {marble color_map { [0.0 color rgb <0.92,0.94,0.6>] [0.55 color rgb <0.9,0.9,0.8>] [0.65 color rgb <0.902,0.925,0.592>] [0.75 color rgb <0.902,0.925,0.592>] [0.9 color rgb <0.886,0.925,0.357>] } warp {turbulence 4} } finish { phong 0.8 reflection 0.3 conserve_energy } scale 0.7 } #declare T_CaseNoire = texture { pigment {marble color_map { [0.2 color rgb <0.06,0.05,0.1>] [0.55 color rgb <0.1,0.1,0.2>] [0.65 color rgb <0.2,0.5,0.2>] [0.75 color rgb <0.1,0.3,0.15>] [0.9 color rgb <0.03,0.07,0.2>] } warp {turbulence 1} translate <20,0,20> rotate y*30 } finish { specular 0.1 roughness 0.01 reflection 0.4 conserve_energy } } #declare T_Echiquier = texture { checker texture {T_CaseNoire} texture {T_CaseBlanche} } #declare T_Blanc =texture { pigment { crackle scale 0.2 turbulence 0.2 color_map { [0 color rgb <0.85,0.92,0.75>] [0.1 color rgb 1] [1 color rgb 1] } } finish {phong 1} } #declare T_Noir = texture { pigment { crackle scale 0.2 turbulence 0.5 color_map { [0 color rgb <0.3,0.35,0.45>] [0.1 color rgb 0.3] [1 color rgb 0.25] } } finish { reflection 0.05 conserve_energy phong 1 } } // objets // échiquier, de <-0.5,-0,5,-0.5> à <8.5,0.5,8.5> # declare Echiquier = union { difference { //echiquier superellipsoid { //montant <0.1,0.1> scale <4.5,0.3,4.5> translate <4,0.3,4> texture {T_BordEchiquier} } box { //cases <-0.01, 0.5,-0.01> <8.01, 0.7,8.01> texture { T_Echiquier } } } union { //pieds cylinder {<0.5,0,0.5>, <0.5,-0.5,0.5>,0.3} cylinder {<0.5,0,7.5>, <0.5,-0.5,7.5>,0.3} cylinder {<7.5,0,7.5>, <7.5,-0.5,7.5>,0.3} cylinder {<7.5,0,0.5>, <7.5,-0.5,0.5>,0.3} texture {T_BordEchiquier} } } // pièces standard // tour rayon 0.4 hauteur 1.4 posé en 0 #declare N_Tour = difference { union { cylinder { <0,0,0>,<0,0.2,0>,0.4} cone {<0,0.2,0>,0.3,<0,1.1,0>,0.2} cylinder {<0,1.1,0>,<0,1.4,0>,0.4} } union { torus {0.4, 0.02 translate <0,0.1,0> } cylinder {<0,1.2,0>,<0,1.5,0>,0.3} box {<-1,1.2,-0.05>,<1,1.5,0.05>} box{<-0.05,1.2,-1>,<0.05,1.5,1>} } } // pion rayon 0.35 hauteur 1.2 posé en 0 #declare N_Pion = difference { union{ cylinder {<0,0,0>,<0,0.2,0>,0.35} cylinder {<0,0.2,0>,<0,0.3,0>,0.25} lathe {cubic_spline 7, <0.5,0.3>,<0.25,0.3>,<0.1,0.55>,<0.1,0.65>,<0.08,0.8>,<0,0.9>,<-0.05,1> } cone {<0,0.67,0>,0.08,<0,0.7,0>,0.15} cone {<0,0.7,0>,0.15,<0,0.73,0>,0.08} sphere {<0,0.95,0>,0.15} } torus {0.35, 0.02 translate <0,0.1,0> } } // fou rayon 0.4 hauteur 1.6 posé en 0 #declare N_Fou = difference { union { cylinder {<0,0,0>,<0,0.2,0>,0.4} cylinder {<0,0.2,0>,<0,0.3,0>,0.3} lathe {cubic_spline 7, <0.5,0.3>,<0.3,0.3>,<0.1,0.6>,<0.07,0.9>,<0.05,1.1>,<0,1.2>,<-0.1,1.25> } cone {<0,0.97,0>,0.08,<0,1,0>,0.18} cone {<0,1,0>,0.18,<0,1.03,0>,0.08} sphere {<0,0,0>, 0.1 scale <1.5,2.5,1.5> translate 1.25*y } sphere {<0,0,0>, 0.1 scale <1,0.6,1> translate 1.54*y } } union{ box {<0,0,0><1,0.05,1> rotate <0,45,45> translate <0,1.25,0> } torus {0.4, 0.02 translate <0,0.1,0> } } } // roi rayon 0.4 hauteur 2 posé en 0 #declare N_Roi = difference { union { cylinder {<0,0,0>,<0,0.2,0>,0.4} cylinder {<0,0.2,0>,<0,0.3,0>,0.3} lathe {cubic_spline 7, <0.5,0.3>,<0.3,0.3>,<0.1,0.7>,<0.07,1.05>,<0.05,1.3>,<0,1.4>,<-0.1,1.45> } cone {<0,1.1,0>,0.08,<0,1.2,0>,0.3} cone {<0,1.2,0>,0.3,<0,1.3,0>,0.08} cone {<0,1.2,0>,0.18,<0,1.6,0>,0.25} intersection { sphere {<0,1.5,0>,0.25} box {<-0.5,1.6,-0.5>,<0.5,1.9,0.5>} } superellipsoid {<0.2, 0.2> scale <0.07,0.3,0.03> translate <0,1.8,0> } superellipsoid {<0.2,0.2> scale <0.2,0.07,0.03> translate <0,1.92,0> } } torus {0.4, 0.02 translate <0,0.1,0> } } #declare N_Reine = difference { // reine rayon 0,4 hauteur 1,86 posée en 0 union { cylinder {<0,0,0>,<0,0.2,0>,0.4} cylinder {<0,0.2,0>,<0,0.3,0>,0.3} lathe {cubic_spline 7, <0.5,0.3>,<0.3,0.3>,<0.1,0.7>,<0.07,1.05>,<0.05,1.3>,<0,1.4>,<-0.1,1.45> } cone {<0,1.1,0>,0.08,<0,1.2,0>,0.3} cone {<0,1.2,0>,0.3,<0,1.3,0>,0.08} cone {<0,1.2,0>,0.18,<0,1.6,0>,0.25} intersection { sphere {<0,1.5,0>,0.25} box {<-0.5,1.6,-0.5>,<0.5,1.9,0.5>} } sphere {<0,0,0>,0.1 scale <1,0.6,1> translate <0,1.8,0> } } torus {0.4, 0.02 translate <0,0.1,0> } } #declare N_Cavalier = difference { //pseudocavalier union { cylinder {<0,0,0>,<0,0.2,0>,0.4} cylinder {<0,0.2,0>,<0,0.3,0>,0.3} object {Povray_Logo scale 0.8 translate <0,0.5,0>} } torus {0.4,0.02 translate <0,0.1,0> } } // pièces modfiées #declare D_Tour = difference { // Tour défensive union { cylinder { <0,0,0>,<0,0.2,0>,0.4} lathe {cubic_spline 6 <0.3,0.1>,<0.3,0.2>,<0.25,0.5>,<0.3,0.8>,<0.4,1.1>,<0.4,1.2> } cylinder {<0,1.1,0>,<0,1.5,0>,0.6} } union { torus {0.4, 0.02 translate <0,0.1,0> } cylinder {<0,1.2,0>,<0,1.7,0>,0.5} box {<-1,1.2,-0.05>,<1,1.6,0.05>} box{<-0.05,1.2,-1>,<0.05,1.6,1>} } } #declare O_Tour = difference { //tour offensive union { cylinder {<0,0,0>,<0,0.2,0>,0.4} difference { // corps tordu sphere_sweep {cubic_spline 5 <0,0,0>,0.3, <0,0.2,0>,0.3, <0.1,0.7,0>,0.25 <0.2,0.9,0>,0.2, <0.3,1,0>,0.2 } cylinder {<0,-0.5,0>,<0,0.2,0>,0.5} //couper les bords cylinder {<0,0,0>,<0,0.5,0>,0.5 rotate <0,0,-45> translate <0.2,0.9,0> } } difference { // toit cylinder {<0,0,0>,<0,0.3,0>,0.4} cylinder {<0,0.1,0>,<0,0.4,0>,0.3} box {<-1,0.1,-0.05>,<1,0.4,0.05>} box{<-0.05,0.1,-1>,<0.05,0.4,1>} rotate <0,0,-45> translate <0.199,0.899,0> } } torus {0.4, 0.02 translate <0,0.1,0> } } //pendule #declare Cadran =union { cylinder { <0,0,0.19>,<0,0,0.195>,0.76 texture {T_PlastiqueBeige} } #declare heure =0; #while (heure<12) #if (mod(heure,3) = 0) #declare longueur = 0.3; #else #declare longueur =0.15; #end box{ <-0.02,-0.6,0.189>,<0.02,-0.6+longueur,0.188> pigment {color rgb 0} rotate 30*heure*z } #declare heure=heure+1; #end } #declare Aiguille = prism{ linear_spline 0,0.02, 4, <-0.1,0>,<0,-0.5>,<0.1,0>,<0,0.1> rotate 90*x texture {T_AluNoir} } #declare Pendule = union { difference { box{<0,0,0>,<5,3,2>} cylinder {<1.25,1.5,-0.05><1.25,1.5,0.2>,0.75} cylinder {<3.75,1.5,-0.05><3.75,1.5,0.2>,0.75} texture {T_Plastoche} } object {Cadran translate <1.25,1.5,0>} object {Cadran translate <3.75,1.5,0>} object {Aiguille rotate -108*z translate <1.25,1.5,0.185> } // aiguilles object {Aiguille scale <0.9,0.8,1> rotate -39*z translate <1.25,1.5,0.185>} object {Aiguille rotate -99*z translate <3.75,1.5,0.185> } object {Aiguille scale <0.9,0.8,1> rotate -210*z translate <3.75,1.5,0.185>} cylinder {<1.25,1.5,-0.05><1.25,1.5,0.1>,0.76 texture {T_Verre1} interior {ior 1.5} } cylinder {<3.75,1.5,-0.05><3.75,1.5,0.1>,0.76 texture {T_Verre1} interior {ior 1.5} } cylinder {<1.25,2.9,1><1.25,3.3,1>,0.1 texture {T_AluNoir} } // axe cylinder {<3.75,2.9,1><3.75,3.6,1>,0.1 texture {T_AluNoir} } cylinder {<1.25,3.29,1><1.25,3.5,1>,0.25 texture {T_AluNoir} } cylinder {<3.75,3.59,1><3.75,3.8,1>,0.25 texture {T_AluNoir} } } /*/test camera { location <0,1,-4> look_at <0,0,0> } light_source { <0,1,-4> color <1,1,1> } object {N_Pion texture {T_Blanc} rotate 100*z translate 0.29*y } plane {y, 0 pigment {checker color rgb <1,0,0> color rgb <0,1,1>}finish {phong 1}} //fin de test*/