home *** CD-ROM | disk | FTP | other *** search
/ Freelog 11 / Freelog011.iso / SeriePOV / Igloo_Ex2.pov < prev    next >
Text File  |  2000-05-23  |  6KB  |  183 lines

  1. // Persistence of Vision Ray Tracer Scene Description File
  2. // File: .pov
  3. // Vers: 3.1
  4. // Desc: Tutoriel sur l'Igloo Exercice 2
  5. // Date: 20/05/00 
  6. // Auth: Alonso Eusebio Pablo pour Freelog #10 DPpresse
  7.  
  8. //-----------------------------------------DECLARATIONS--------------------------------------------
  9.  
  10. #version 3.1  // Permet d'utiliser les instructions propre α Pov v 3.1 
  11.  
  12. global_settings { assumed_gamma 1.0 }  // definition du Gamma
  13.  
  14. //-------------------------------Inclusions Standard de POV-Ray------------------------------------
  15.  
  16. #include "colors.inc"    // Declaration des couleurs standard
  17. #include "textures.inc"    // Declaration des textures standard
  18.  
  19. //---------------------------------DEFINITION DE LA CAMERA-----------------------------------------
  20.  
  21. camera
  22. {  // debut de la camera
  23.   location  <2.5, 1.0, -2.0> // position de la camera <X Y Z>
  24.   look_at   <0.0, 0.0,  0.0> // point de mire <X Y Z>
  25. }  // fin de la camera
  26.  
  27. //----------------------------------FOND DE CIEL---------------------------------------------------
  28.  
  29. sky_sphere // sphere infinie
  30. {  // debut du ciel
  31.   pigment  // pigment de la sphere
  32.   {
  33.     gradient y  // dΘgradΘ vertical
  34.     color_map { [0.0 color rgb <0.,0.,1.0>] [.1 color blue 0.2] } // couleurs: deux couleurs marines
  35.   }
  36. }  // fin du ciel
  37. //------------------------------ZONE LUMINEUSE STANDARD--------------------------------------------
  38.  
  39. light_source
  40. {  // debut de la source lumineuse
  41.   0*x // position initiale de la lumiΦre
  42.   color <.1, .1, .6> // couleur de la lumiΦre bleu roi
  43.   area_light
  44.   <8, 0, 0> <0, 0, 8> // zone couverte par la lumiere (x * z)
  45.   4, 4                // nombre total de lumiers dans la zone (4x*4z = 16)
  46.   adaptive 0          // 0,1,2,3... 
  47.   jitter              // ajoute un effet tamise aleatoire
  48.   translate <40, 50, 40>   // <x y z> translation de la zone de lumiΦre depuis son point d'origine
  49. }  // fin de la source lumineuse
  50. //--------------------------------------BANQUISE---------------------------------------------------
  51.  
  52. plane   // Definition d'un plan infini
  53. {
  54.   y, // <X Y Z> normale de la surface,ici le vecteur Y
  55.   0.0 // distance entre l'origine et la surface normale
  56.   hollow on // autorise un pigment
  57.   pigment  // texture simulant la neige boueuse
  58.   {
  59.   agate // motif de type agate
  60.   agate_turb 0.3 //  turbulence [1.0]  
  61.   }
  62. }
  63.  
  64. //----------------------------L'OBJET "IGLOO"------------------------------------------------------     
  65.  
  66. //------- Objet BolΘen "Brut" qui sera usinΘ
  67.  
  68. #declare Brut = union {  // OpΘration AND
  69.          
  70.          sphere // insertion d'une sphere 
  71.                 {
  72.                   <0, 0, 0> // centre <X Y Z>
  73.                   1.1       // rayon
  74.                 }
  75.  
  76.         cylinder  // insertion d'un cylindre
  77.                 {
  78.                   0*x,  1.0*x,  0.8 // depart, arrivee, rayon
  79.                 }
  80.  
  81.         cylinder // insertion d'un deuxieme cylindre
  82.                 {
  83.                   1.0*x,  1.3*x,  0.9 // depart, arrivee, rayon
  84.                 }            
  85.   
  86.   } // fin de l'object Brut
  87.   
  88. //------- Objet BolΘen "Outil" qui servira d'outil
  89.  
  90. #declare Outil = union { 
  91.         
  92.         box // Insertion d'un parallΘlΘpipΦde
  93.         {
  94.           <-1.4, -1.4, -1.4>  // premier sommet <X1 Y1 Z1>
  95.           < 1.4,  0,  1.4>  // sommet opposΘ <X2 Y2 Z2>
  96.         }
  97.         
  98.         sphere // insertion d'une sphΦre 
  99.                 {
  100.                   <0, 0, 0> // centre <X Y Z>
  101.                   1       // rayon
  102.                 }
  103.  
  104.         cylinder  // insertion d'un cylindre
  105.                 {
  106.                   0*x,  1.4*x,  0.7 // dΘpart, arrivΘe, rayon
  107.                 }
  108.   
  109.   } // Fin de l'objet "Outil"
  110.  
  111. //------- OpΘration "Brut" NOT "Outil" = "Igloo"
  112.   
  113. #declare Igloo = difference
  114. {
  115.         object { Brut}
  116.         object { Outil}
  117. }
  118.          
  119.  
  120. //--------------------INSERTION DE L'OBJET "IGLOO" DANS LA SCENE---------------------------------
  121.  
  122. object { Igloo //insertion de l'objet portant le label:"Igloo"
  123.  
  124.  pigment   // texture de l'Igloo
  125.   {
  126.     brick      color Gray, color White  // briques blanches avec joints gris
  127.     brick_size <0.3,0.3,0.3>   // taille des blocs
  128.     mortar     0.03       // epaisseur des joints
  129.   }
  130. }  // fin de l'insertion de l'Igloo
  131.  
  132. //------------------CREATION DU SAPIN--------------------------------------------------------------
  133.  
  134.  
  135. //
  136. #declare sapin = union { //dΘclartion d'une opΘration "AND" dont le rΘsultat se nome "sapin"
  137.  
  138. cylinder  // tronc
  139.         {
  140.          0*y,  0.5*y,  .05
  141.         pigment {
  142.                 color Maroon   //couleur marron
  143.                 }
  144.         }
  145.  
  146. cone   // c⌠ne de base
  147.         {
  148.           0.7*y,  0.0,  // Disque au sommet et rayon
  149.           0.5*y, .25    // Disque a la base et rayon
  150.         pigment {
  151.                 color Green     // couleur verte
  152.                 }
  153.         }
  154.  
  155. cone    // c⌠ne du milieu
  156.         {
  157.           .95*y,  0.0,
  158.           0.65*y, .20
  159.         pigment {
  160.                 color Green
  161.                 }
  162.         }
  163.  
  164. cone  //  c⌠ne du sommet
  165.         {
  166.         1.1*y,  0.0,
  167.         0.9*y, .08
  168.   
  169.         pigment {
  170.                 color Green
  171.                 }
  172.         }
  173.  
  174. } // Fin de la definition du sapin
  175.  
  176. //--------------------------INSERTION DU SAPIN DANS LA SCENE---------------------------------------
  177. object { sapin 
  178.  
  179. translate <1., .0, -1.6>  // <dX dY dZ>  translation du sapin
  180.  
  181. } // fin de l'insertion du sapin
  182.  
  183. //---------------------------Ouf! c'est tout pour ce mois-ci---------------------------------------