#include "colors.inc" #include "woods.inc" /*camera{ orthographic location <0,-90,20> look_at <0,0,0> angle 20 } background{color Gray90 } light_source{<10,-70,23> color White} */ #declare epaisseur=0.09; //Création de la forme du panier #declare cote= sphere_sweep { cubic_spline 52, <0, 3.6, 0>, 0.08 <0.4, 3.4, 0>, 0.08 <0.9, 3.5, 0>, 0.08 <1.3, 3.3, 0>, 0.08 <1.7, 3.2,0>, 0.08 <2.1, 2.8, 0>, 0.08 <2.5, 2.6, 0>, 0.08 <2.7, 2.1, 0>, 0.08 <3.1, 1.8, 0>, 0.08 <3.2, 1.3, 0>, 0.08 <3.5, 1, 0>, 0.08 <3.5, 0.5, 0>, 0.08 <3.7, 0, 0>, 0.08 <3.5, -0.5, 0>, 0.08 <3.5, -1, 0>, 0.08 <3.2, -1.3, 0>, 0.08 <3.1, -1.8, 0>, 0.08 <2.7, -2.1, 0>, 0.08 <2.5, -2.6, 0>, 0.08 <2.1, -2.8, 0>, 0.08 <1.7, -3.2,0>, 0.08 <1.3, -3.3, 0>, 0.08 <0.9, -3.5, 0>, 0.08 <0.4, -3.4, 0>, 0.08 <0, -3.6, 0>, 0.08 <-0.4, -3.4, 0>, 0.08 <-0.9, -3.5, 0>, 0.08 <-1.3, -3.3, 0>, 0.08 <-1.7, -3.2,0>, 0.08 <-2.1, -2.8, 0>, 0.08 <-2.5, -2.6, 0>, 0.08 <-2.7, -2.1, 0>, 0.08 <-3.1, -1.8, 0>, 0.08 <-3.2, -1.3, 0>, 0.08 <-3.5, -1, 0>, 0.08 <-3.5, -0.5, 0>, 0.08 <-3.7, -0, 0>, 0.08 <-3.5, 0.5, 0>, 0.08 <-3.5, 1, 0>, 0.08 <-3.2, 1.3, 0>, 0.08 <-3.1, 1.8, 0>, 0.08 <-2.7, 2.1, 0>, 0.08 <-2.5, 2.6, 0>, 0.08 <-2.1, 2.8, 0>, 0.08 <-1.7, 3.2,0>, 0.08 <-1.3, 3.3, 0>, 0.08 <-0.9, 3.5, 0>, 0.08 <-0.4, 3.4, 0>, 0.08 <-0, 3.6, 0>, 0.08 <0.4, 3.4, 0>, 0.08 <0.9, 3.5, 0>, 0.08 <1.3, 3.3, 0>, 0.08 } // Assemblage des mailles pour former la cuve #declare cuve= #declare i=1; #declare j=1.2; #while (i<33) #declare i=i+1; #declare j=j+0.02; union { object{cote rotate i*22.5*z translate epaisseur*i*z scale j texture {T_Wood13} finish {phong 0.6}} } #end // Création du dessus de la cuve #declare tour= sphere_sweep { b_spline 19, <0, 4, 0.25>, 0.1 <2, 3.5,0> 0.1 <3.5, 2,-0.25> 0.1 <4, 0, 0>, 0.1 <3.5, -2, 0.25> 0.1 <2, -3.5, 0> 0.1 <0, -4, -0.25>, 0.1 <-2, -3.5, 0> 0.1 <-3.5, -2, 0.25> 0.1 <-4, 0, 0>, 0.1 <-3.5, 2, -0.25>, 0.1 <-2, 3.5,0> 0.1 <0, 4, 0.25>, 0.1 <2, 3.5,0> 0.1 <3.5, 2,-0.25> 0.1 <4, 0, 0>, 0.1 <3.5, -2, 0.25> 0.1 <2, -3.5, 0> 0.1 <0, -4, -0.25>, 0.1 } #declare contour= union{ object{tour translate -0.15*x scale 0.89 } object{tour rotate 45*z translate 0.15*x scale 0.90 } object{tour rotate 90*z translate -0.15*y scale 0.91} object{tour rotate 135*z translate 0.15*y scale 0.92 } object{tour translate -0.15*x scale 0.93} object{tour rotate 45*z translate 0.15*x scale 0.94 } object{tour rotate 90*z translate -0.15*y scale 0.95} object{tour rotate 135*z translate 0.15*y scale 0.96 } object{tour translate -0.15*x scale 0.97} object{tour rotate 45*z translate 0.15*x scale 0.98 } object{tour rotate 90*z translate -0.15*y scale 0.99} object{tour rotate 135*z translate 0.15*y scale 1 } } // Création de l'ance #declare formeance= sphere_sweep { b_spline 10, <0, 4, 0.25>, 0.1 <2, 3.5,0> 0.1 <3.5, 2,-0.25> 0.1 <4, 0, 0>, 0.1 <3.5, -2, 0.25> 0.1 <2, -3.5, 0> 0.1 <0, -4, -0.25>, 0.1 <-2, -3.5, 0> 0.1 <-3.5, -2, 0.25> 0.1 <-4, 0, 0>, 0.1 } #declare ance= union{ object{formeance translate -0.15*x scale 0.89 } object{formeance rotate 10*z translate 0.15*x scale 0.90 } object{formeance rotate 20*z translate -0.15*y scale 0.91} object{formeance rotate 30*z translate 0.15*y scale 0.92 } object{formeance translate -0.15*x scale 0.93} object{formeance rotate 10*z translate 0.15*x scale 0.94 } object{formeance rotate 20*z translate -0.15*y scale 0.95} object{formeance rotate 30*z translate 0.15*y scale 0.96 } } //Assemblage du panier #declare panier= union{ object{cuve} object{contour scale 1.8 translate 5.8*z texture{T_Wood15} finish {phong 0.6}} object{contour scale 1.42 translate 1.7*z texture{T_Wood15} finish {phong 0.6}} object{contour scale 1.15 texture{T_Wood15} finish {phong 0.6}} object{ance scale 1.6 rotate <90,-120,15> translate 5.7*z texture{T_Wood15} finish {phong 0.6}} } //object {panier}