

// Un jardin dans un appartement on aura tout vu!!!!!

// A Garden in a flat(UK)?  Why noT!
// A Garden in an apartment (US)?  Why noT!


//***** Echelle : 3 unités = 1 cm      EN THEORIE !!!   Hélas il a fallu tricher!!! quelques fois.

// ne pas oublier d'utiliser le fichier JARDIN.PAR sous FRACTINT pour obtenir les images nécessaires.
//---------------------------------------------------------------------------------------------------

// ***** Dimensions de la pièce *****
#declare X_Debut = -500;
#declare Z_Debut = -700;
#declare Y_Debut =    0;
#declare X_Fin   =  700;
#declare Z_Fin   =  500;
#declare Y_Fin   =  840;

#declare X_Piece=abs(int(X_Debut)) + abs(int(X_Fin));
#declare Z_Piece=abs(int(Z_Debut)) + abs(int(Z_Fin));

#declare E_Papier = 1;
#declare E_Platre = 4;


// ***** Dimensions des parpaings *****
#declare Lon_Parpaing = 140;
#declare Lar_Parpaing =  50;
#declare Hau_Parpaing =  50;
#declare Lon_Joint    =  10;
#declare Lar_Joint    =  50;
#declare Hau_Joint    =  10;

// ***** Dimensions des lames de parquet *****
#declare Lon_Parquet = 60;
#declare Lar_Parquet = 12;
#declare Hau_Parquet =  4;
#declare Nb_Parquet =   Lon_Parquet / Lar_Parquet;

// ***** Dimensions des plinthes *****
#declare Lar_Plinthe   =   4;
#declare Hau_Plinthe   =  30;
#declare Lon_Plinthe_1 = 450;
#declare Lon_Plinthe_2 = 300;

// ***** Dimensions des papiers *****
#declare E_Papier    = 1;
#declare Lar_Papier  = 159;
#declare Bas_Papier  = Hau_Parquet + Hau_Plinthe + Lar_Plinthe;
#declare Haut_Papier = Y_Fin;


// ***** Dimensions du Gueridon *****
#declare Dia_Plateau   = 100;
#declare E_Plateau     =   9;
#declare Dia_Colonne   =   9;
#declare Bas_Colonne   =  33;
#declare Hau_Colonne   = 140;
#declare Haut_Plateau  = Bas_Colonne + Hau_Colonne;
#declare Haut_Gueridon = Bas_Colonne + Hau_Colonne + E_Plateau;

// ***** Dimensions du tableau horizontal *****
#declare Arm       =  3;
#declare Lar_Cadre =  Arm * 5;
#declare E_Cadre   =  Arm * 3;
#declare E_Tableau   =   1;
#declare Bas_Tableau = 450;
#declare Lar_Tableau = 280;
#declare Hau_Tableau = 160;
#declare Haut_Tableau = Bas_Tableau + Hau_Tableau;

// ***** Dimensions de l'étagère *****
#declare H_Lon_Etagere = 218;
#declare H_Lar_Etagere =  30;
#declare E_Etagere     =   6;
#declare Joint_Etagere =   2;
#declare Bord_Etagere  =  20;
#declare E_Decoupe     =   0.05;
#declare V_Lon_Etagere = 218;
#declare V_Lar_Etagere =  31;
#declare Haut_Etagere  = 420;

// ***** Dimensions des livres *****
#declare Lon_Livre    = 55;
#declare Lar_Livre    = 16;
#declare Hau_Livre    = 70;
#declare E_Couverture =  1;
#declare E_Dos        =  5;
#declare N_Nb_Livres  =  5;
#declare Titre = "Rocailles"
#declare Photo = "Plantes.tga"
#declare Y = 0.75;
#declare Position = 0;
#declare Angle = 0;

// ***** Dimensions du bilboquet *****
#declare Dia_Socle   = 10;
#declare Dia_Boule   = 15;
#declare Dia_Ficelle =  1;

// ***** Dimension du Vase *****
#declare Dia_Pied   = 10;

// ***** Dimensions du Napperon *****
#declare X_Facteur = 300;
#declare Y_Facteur =   1;
#declare Z_Facteur = 250;

// ***** Dimensions du Bougeoir *****
#declare Dia_Chandelier = 15;
#declare Hau_Chandelier = 65;
#declare Dia_Bougie     = 15;

// ***** Dimensions des Briques *****
#declare Lon_Brique = 22;
#declare Lar_Brique = 10;
#declare Hau_Brique = 10;
#declare Lon_3_4    = 16;
#declare Lon_Ciment =  2;
#declare Lar_Ciment = 10;
#declare Hau_Ciment =  2;
#declare Hau_Allee  =  5;

// ***** Dimensions des plantes *****

#declare X_Plante_Arche =  70;
#declare Y_Plante_Arche =  20;
#declare Z_Plante_Arche =  30;

#declare X_Plante_Allee =  80;
#declare Y_Plante_Allee =  50;
#declare Z_Plante_Allee = 120;

#declare X_Plante_Escalier =  75;
#declare Y_Plante_Escalier = 100;
#declare Z_Plante_Escalier = 220;

#declare X_Plante_Devant = 175;
#declare Y_Plante_Devant =  50;
#declare Z_Plante_Devant =  35;

#declare X_Plante_Haut = 165;
#declare Y_Plante_Haut = 100;
#declare Z_Plante_Haut = 120;

#declare X_Plante_Tour = 185;
#declare Y_Plante_Tour = 155;
#declare Z_Plante_Tour = 260;




// * * * * *     Textures     * * * * *


#declare Tex_Ciment =
texture{
   pigment{color <0.3,0.3,0.3>}
   finish {crand 0.125}
       }

#declare Tex_Parpaing =
texture{
   pigment{
      granite
      turbulence 0.2
      lambda 2.5
      omega 0.25
      octaves 10
      color_map{
         [0.2 color <0.5,0.5,0.5> ]
         [0.3 color <0.4,0.4,0.4> ]
         [0.4 color <0.3,0.3,0.3> ]
               }
          }
       }

#declare Tex_Platre =
texture{
   pigment{color <0.99,0.99,0.99>}
   finish {crand 0.08}
       }

#declare Tex_Parquet =
texture{
   pigment{
      wood
      turbulence <0.8, 0.1, 500>
      octaves 1.5
      scale <0.05,0.2, 1>
      color_map{
          [0.0, 0.7 color rgb <0.90, 0.80, 0.30> color rgb <0.50, 0.30, 0.15>]
          [0.7, 1.0 color rgb <0.85, 0.75, 0.35> color rgb <0.60, 0.32, 0.18>]
              }
           }
        }

texture{
   pigment{
      bozo
      scale <0.5, 0.5, 100000>
      color_map{
         [0.0, 0.3 color rgbf <0.85, 0.35, 0.20, 0.80> color rgbf <0.85, 0.65, 0.40, 0.60>]
         [0.3, 1.0 color rgbf <0.85, 0.65, 0.40, 0.60> color rgbf <0.90, 0.35, 0.18, 0.80>]
               }
          }
       }

#declare Tex_Plinthes =
texture{
   pigment{
      wood
      turbulence <0.8, 0.1, 500>
      octaves 1.5
      scale <0.05,0.2, 1>
      color_map{
          [0.0, 0.7 color rgb <0.90, 0.85, 0.30> color rgb <0.55, 0.35, 0.15>]
          [0.7, 1.0 color rgb <0.85, 0.85, 0.35> color rgb <0.65, 0.37, 0.18>]
              }
           }
        }

texture{
   pigment{
      bozo
      scale <0.5, 0.5, 100000>
      color_map{
         [0.0, 0.3 color rgbf <0.90, 0.40, 0.20, 0.80> color rgbf <0.80, 0.70, 0.40, 0.60>]
         [0.3, 1.0 color rgbf <0.90, 0.70, 0.40, 0.60> color rgbf <0.85, 0.40, 0.18, 0.80>]
               }
          }
       }

#declare Tex_Papier_Droite =           // A Revoir ?
texture{
   pigment{
      color<0.880,0.733,0.547> * 1.25
          }
   finish {crand 0.15 ambient 0.5 diffuse 0.3}
        }

#declare Tex_Papier_Gauche =          // A Revoir ?
texture{
   pigment{
      color <0.880,0.733,0.547> * 1.8
          }
   normal{
      bumps 1.5
         }
   finish {ambient 0.4 diffuse 0.15}
       }

#declare Tex_Noire =
texture{
   pigment{
      color <0,0,0>
          }
       }

#declare Tex_Blanche =
texture{
   pigment{
      color <1,1,1>
          }
       }

#declare Tex_Invisible =
texture{
   pigment{
      color rgbf <1,1,1,1>
          }
       }

#declare Tex_Armature =
texture{
   pigment{
      wood
      color_map{
         [0.0, 1.0 color rgb <0.90,0.80,0.30> * 0.4
                   color rgb <0.50,0.30,0.15> * 0.5]
               }
      ramp_wave
          }
   scale <0.5, 0.5, 1>
       }

#declare Tex_Claire_Tableau =
texture{pigment{color rgb<0.45,0.45,0.45>}}

#declare Tex_Foncee_Tableau =
texture{pigment{color rgb<0.25,0.25,0.25>}}


#declare Tex_Etagere =
texture{
   pigment{
      wood
      color_map{
         [0.0, 1.0 color rgb <0.98,0.82,0.32>
                   color rgb <0.55,0.44,0.22>]
               }
          }
       }

#declare Tex_Livre_Couverture =
texture{
   pigment{
   marble
   turbulence 3
   color_map{
      [0 color <0.401,0.182,0.142>]
      [1 color <0.514,0.154,0.138>]
            }
          }
       }

#declare Tex_Livre_Dos =
texture{
   pigment{
   marble
   turbulence 1.5
   color_map{
      [0.0 color<0.247,0.165,0.165> * 1.0]
      [0.8 color<0.247,0.145,0.185> * 0.9]
      [1.0 color<0.214,0.125,0.115> * 0.7]
           }
          }
       }

#declare Tex_Titre =
texture{pigment{color rgb<1,1,0>}}

#declare Tex_Livre_Papier =
texture{
   pigment{
      gradient x
      turbulence 0.01
      color_map{
         [0.00 color rgb<1.000, 1.000, 1.000>]
         [0.05 color rgb<0.753, 0.753, 0.753>]
         [0.05 color rgb<0.918, 0.918, 0.918>]
         [0.09 color rgb<0.718, 0.718, 0.718>]
         [0.15 color rgb<0.816, 0.816, 0.816>]
         [0.21 color rgb<0.918, 0.918, 0.918>]
         [0.25 color rgb<0.784, 0.784, 0.784>]
         [0.28 color rgb<0.980, 0.980, 0.980>]
         [0.36 color rgb<0.710, 0.710, 0.710>]
         [0.42 color rgb<0.867, 0.867, 0.867>]
         [0.47 color rgb<0.933, 0.933, 0.933>]
         [0.59 color rgb<0.675, 0.675, 0.675>]
         [0.68 color rgb<1.000, 1.000, 1.000>]
         [0.75 color rgb<0.776, 0.776, 0.776>]
         [0.84 color rgb<0.878, 0.878, 0.878>]
         [0.92 color rgb<1.000, 1.000, 1.000>]
         [0.95 color rgb<0.784, 0.784, 0.784>]
         [1.00 color rgb<1.000, 1.000, 1.000>]
               }
          }
      finish{ambient 0.5 brilliance 1.5}
      scale <Lar_Livre,1,1>
       }

#declare Tex_Bilboquet =                    //Dark_Wood   POVLAB.inc     Denis Ollivier
texture{pigment{color<1,0,0>}}
texture{
   pigment{
      wood
      turbulence 0.2
      color_map{
         [0.0, 0.8  color rgb <0.42857, 0.23810, 0.04762>
                    color rgb <0.42857, 0.23810, 0.04762>]
         [0.8, 1.01 color rgb <0.4, 0.333, 0.066>
                    color rgb <0.2, 0.033, 0.033>]
               }
          }
       }

#declare Tex_Ficelle =
texture{pigment{color<1,1,1>}}


#declare Tex_Vase =
texture{
    pigment{color rgb <0.325,0.332,0.378>}
    finish{
        metallic
        ambient 0.2
        diffuse 0.7
        specular 0.1
        reflection 0.1
        brilliance 0.7
          }
       }


#declare Tex_Gueridon=   // Modified from Woods.inc woodmap.inc
   texture{
      pigment{
      wood
      turbulence 0.1
      octaves 4
      lambda 3
      scale 0.5
      rotate <0.125, 0.125, 0>
         color_map{
            [0.0,0.1 color rgb<0.35,0.16,0.12 >* 0.5
                     color rgb<0.35,0.16,0.12>* 0.5]
            [0.1,0.9 color rgb<0.35,0.20,0.16>* 0.5
                     color rgb<0.46,0.26,0.18>* 0.5]
            [0.9,1.0 color rgb<0.46,0.26,0.18>* 0.5
                     color rgb<0.35,0.16,0.12>* 0.5]
                   }
             }
       finish{ambient 0.1 diffuse 0.2 reflection 0.05}
         }

   texture{
      pigment{
         wood
         turbulence <0.025, 0.025, 0.1>
         octaves 4
         omega 1.3
         scale <0.30, .20, 1>
         translate <-600,0,20>
         color_map{
            [0.0,0.1 color rgb<0.45,0.26,0.22>* 0.5
                     color rgb<0.45,0.26,0.22>* 0.5]
            [0.1,0.9 color rgb<0.45,0.30,0.26>* 0.5
                     color rgb<0.56,0.36,0.28>* 0.5]
            [0.9,1.0 color rgb<0.56,0.36,0.28>* 0.5
                     color rgb<0.45,0.26,0.22>* 0.5]
                  }
             }
      finish{ambient 0.2 diffuse 0.3 reflection 0.05}
          }


#declare Tex_Napperon =
texture{pigment{color rgbf<1,1,1,1>}}
texture{pigment{color rgb<0.8,0.8,0.7>}}


#declare Tex_Chandelier =
texture{
    pigment{color rgb <0.275,0.282,0.278>}
    finish{
        metallic
        ambient 0.1
        diffuse 0.55
        specular 0.01
        reflection 0.075
        brilliance 0.8
          }
       }

#declare Tex_Bougie=
   texture{
      pigment{color<0.969,0.252,0.066> filter 0.3}
      finish{specular 0.9}
          }

#declare Tex_Flamme=
texture{
   pigment{
      onion
      turbulence 0.2
      color_map{
         [0.0 0.65  color<0.996,0.899,0.066> filter 0.5 color<0.996,0.899,0.066> filter 0.5]
         [0.65 1.0  color<0.600,0.700,0.600> filter 0.5 color<0.250,0.805,0.905> filter 0.5]
               }
          }
    scale <2,10,2>
       }

#declare Tex_Brique_Rouge=
   texture{
      pigment{color<1,.6,.1>}
      finish {crand 0.25}
          }

#declare Tex_Brique_Blanche=
   texture{
      pigment{color<0.85,0.85,0.75>}
      finish {crand 0.18}
          }

#declare Terres=
texture{
   pigment{
      gradient y
      color_map{
         [0.010 color <0.095,0.025,0.025>]
         [0.020 color <0.111,0.034,0.028>]
         [0.030 color <0.142,0.054,0.031>]
         [0.040 color <0.187,0.075,0.034>]
         [0.050 color <0.204,0.098,0.037>]
         [0.060 color <0.212,0.106,0.041>]
               }
          }
       }




#declare Tex_Feuille_Arche=
texture{
   pigment{
      onion
      color_map{
         [0.05  color<0.218,0.442,0.118>]
         [0.18  color<0.202,0.376,0.105>]
         [0.43  color<0.209,0.319,0.112>]
         [1.00  color<0.302,0.542,0.205>]
               }
          }
      finish{specular 0.257 ambient 0.214}
      translate <0,0,10>
      scale 0.65
       }


#declare Tex_Feuille_Allee=
texture{
   pigment{
      onion
      color_map{
         [0.15  color<0.350,0.657,0.205>]
         [0.80  color<0.620,0.818,0.105>]
         [1.00  color<0.350,0.605,0.205>]
               }
          }
      finish{specular 0.609}
      translate <0,0,15>
       }

#declare Tex_Tige_Allee =
texture{
   pigment{color<0.625,0.794,0.109>}
   finish{specular 0.334 }
       }

#declare Tex_Branche_Allee =
texture{
   pigment{color<0.325,0.442,0.109>}
   finish{specular 0.234}
       }


#declare Tex_Feuille_Devant=
texture{
   pigment{
      onion
      color_map{
         [0.20  color<0.018,0.251,0.018>]
         [0.40  color<0.002,0.356,0.005>]
         [0.60  color<0.009,0.401,0.012>]
         [0.80  color<0.012,0.524,0.028>]
         [1.00  color<0.102,0.656,0.105>]
               }
      scale 2.5
          }
      finish{specular 0.246}
       }


#declare Tex_Tige_Devant=
texture{
   pigment{color<0.305,0.397,0.115>}
      finish{specular 0.435}
       }


#declare Tex_Feuille_Escalier =
texture{
   pigment{
      onion
	  color_map{
	     [0.25 color<0.188,0.434,0.179>]
	     [0.40 color<0.139,0.414,0.298>]
	     [0.65 color<0.139,0.609,0.298>]
             [1.00 color<0.140,0.655,0.132>]
		       }
	      }
   finish{
      specular 0.4
      ambient 0.2
      diffuse 0.7
       }
   scale 2.3
       }
 
#declare Tex_Tige_Escalier =
texture{
   pigment{color<0.188,0.334,0.179>}
   finish{specular 0.584}
       }

 
 
#declare Tex_Feuille_Haut = 
texture {
   pigment{
      onion
      turbulence 0.3 
      color_map {
         [0.00 0.20 color<0.102,0.600,0.058> color<0.082,0.550,0.028>]
	 [0.20 0.75 color<0.082,0.550,0.028> color<0.012,0.350,0.012>]
	 [0.75 1.00 color<0.012,0.350,0.012> color<0.102,0.600,0.058>]
		}
	  }
   finish{specular 0.15}
scale <2.5,2.5,2.5>
	}

#declare Tex_Tige_Haut =
texture{
   pigment{ color<0.012,0.350,0.012> }
   finish{ specular 0.15 }
       }
     
     
#declare Tex_Feuille_Tour = 
texture {
   pigment{
      bozo
      turbulence 0.8
      color_map {
         [0.35 color<0.024,0.350,0.018>]
	 [0.40 color<0.628,0.600,0.010>]
	 [0.70 color<0.089,0.280,0.051>]
		}
	  }
   finish{specular 0.12}
//scale <0.8,1,1.5>
	}
#declare Tex_Tige_Tour =
texture{
   pigment{ color<0.012,0.250,0.012> }
   finish{ specular 0.15 }
       }
     