// POVRAY ||| MAISON 666 09/11/2006 // BIBLIOTHEQUE #include "math.inc" #include "spline.inc" #include "lib_1.inc" #include "lib_2.inc" #include "terrain_exterieurs.inc" // andrea, clementine, berenger #include "structures.inc" // ?? #include "doublages_baies.inc" // melanie, cedric (lezais), thierry #include "escalier.inc" // christoph #include "cloisons_placards.inc" // marina, kenny #include "sanitaires.inc" // charlotte, jennifer #include "eclairages.inc" // valeria #include "meubles.inc" // samuel, cedric (robert), toufik #include "divers.inc" #macro un_prisme( base, sommet, couleur ) object { prism { base, // depart sur axe OY sommet // sommet sur axe OY 10, // nombre de points, suivi de la liste des points : < 0.2, -1.0>, // point 1 < 0.2, 0.2>, // point 2 < 1.0, -0.2>, // point 3 < 1.0, 0.2>, // point 4 < 0.2, 1.0>, // point 5 <-0.2, 1.0>, // point 6 <-1.0, 0.2>, // point 7 <-1.0, -0.2>, // point 8 <-0.2, 0.2> // point 9 <-0.2, -1.0> // point 10 = point 1 //open // optionnel, ouvert ou ferme } ma_texture( couleur ) } #end #macro test_prisme( N ) #local i=0; #while (i ) translate <0,0,3> rotate <0,360*uu,0> } #local i=i+1; #end #end #macro test_intersection() intersection { union { murs() plancher_3() plancher_2() plancher_1() } plane { <0,0,-1>, 0 pigment { color rgb <1,0,0> } } } #end #macro mur_pierre() object { box { <0,0,-0.5>, <0.30,0.60,1> rotate <0,90,0> } texture { pigment { image_map { gif "brick.gif" } } finish { ambient 0.2 diffuse 0.7 specular 0.6 roughness 0.01 } } normal { bump_map { gif "brick_black.gif" } bump_size 2 rotate <0,90,0> } scale 1.2 } #end #macro murs_joints() object { difference { box { <-3.00,-3.00,-3.00>, < 3.00, 3.00, 3.00> } box { <-2.80,-3.01,-2.80>, < 2.80, 3.01, 2.80> } box { <-3.01,-3.01,-3.01>, <-0.90, 0.00, 3.01> } box { <-3.01,-0.01,-2.80>, <-2.69, 1.20, 2.80> } box { < 2.79, 0.00, 0.00>, < 3.01, 3.01,-0.90> } } texture { pigment { gradient y color_map { [ 0.0 color rgb 0.2 ] [ 0.2 color rgb 0.8 ] } scale 1/4*12/10 translate <0,0.001,0> } normal { gradient y normal_map { [ 0.0 bumps 10 ] [ 0.2 bumps 3 scale 1/32 ] } scale 1/4*12/10 translate <0,0.001,0> } finish { ambient 0.3 diffuse 0.7 specular 0.8 roughness 0.01 } } } #end // SCENE //camera { location <-0.9,1.0,-1>*5 look_at <0,0,0> } // PERSPECTIVE 1 //camera { location < -6,-1,-4> look_at <0,0,0> } // PERSPECTIVE 2 //camera { orthographic location <-0.8,1.2,-1>*5 look_at <0,0,0> } // ISOMETRIE //camera { orthographic location <0,1.2,0>*10 look_at <0,0,0> } // PLAN //camera { orthographic location <0,0,-1.2>*6 look_at <0,0,0> } // ELEV LATERALE //camera { orthographic location <1.2,0,0>*6 look_at <0,0,0> } // ELEV ARRIERE //camera { orthographic location <-1.2,0,0>*6 look_at <0,0,0> } // ELEV AVANT background { color rgb 2/4 } light_source { <-1,1,-1>*6 color rgb <1,1,1> } light_source { <1,1,-1>*6 color rgb <1,1,1> } light_source { <0,1,5>*6 color rgb <1,1,1> } axes( 5, 0.02 ) //murs() murs_joints() doublage() plancher_3() plancher_2() plancher_1() //multi_baies() #local P1 = array[6] // un tableau de 6 points [0,1,2,3,4,5] { // permettant de tracer: <-0.5,-0.5,-0.5>, // pp[0] // - une polyligne de 5 segments < 0.5,-0.5,-0.5>, // pp[1] // - une courbe spline quadratique < 0.5,-0.5, 0.5>, // pp[2] // - une courbe spline cubique < 0.5, 0.5, 0.5>, // pp[3] // dans ces deux derniers cas, les courbes <-0.5, 0.5, 0.5>, // pp[4] // n,interpolent pas les extremites <-0.5, 0.5,-0.5> // pp[5] // voir les tableaux suivants, P2 et P3. } #local P2 = array[8] // un tableau de 8 points [0,0,1,2,3,4,5,5] { // les points limites sont doubles <-0.5,-0.5,-0.5>, // pp[0] // pour forcer leur interpolation <-0.5,-0.5,-0.5>, // on obtient une spline non uniforme < 0.5,-0.5,-0.5>, // pp[1] // avec une accumulation de points aux extremites < 0.5,-0.5, 0.5>, // pp[2] < 0.5, 0.5, 0.5>, // pp[3] <-0.5, 0.5, 0.5>, // pp[4] <-0.5, 0.5,-0.5>, <-0.5, 0.5,-0.5> // pp[5] } #local P3 = array[10] { <-0.5,-0.5,-0.5>, <-0.5,-0.5,-0.5>, <-0.5,-0.5,-0.5>, // pp[0] < 0.5,-0.5,-0.5>, // pp[1] < 0.5,-0.5, 0.5>, // pp[2] < 0.5, 0.5, 0.5>, // pp[3] <-0.5, 0.5, 0.5>, // pp[4] <-0.5, 0.5,-0.5>, <-0.5, 0.5,-0.5>, <-0.5, 0.5,-0.5> // pp[5] } #local my_spline = calcul_spline( 200, P1, 1 ) // [0,1,..,99] union { #local i=0; #while (i<200) sphere { my_spline[i], 0.01 pigment { color rgb <1,0,0,0> } scale 2 } #local i=i+1; #end } #local my_spline2 = calcul_spline( 40, P1, 1 ) // [0,1,..,9] #local i = int( clock*39); camera { location my_spline2[i]*5 look_at <0,0,0> }