Advertisement
Guest User

Untitled

a guest
Sep 18th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Includes */
  2. #include "colors.inc"
  3. #include "textures.inc"
  4. #include "shapes.inc"
  5.  
  6. /* Déclarations */
  7. #declare ORIGINE = <0,0,0>; // Coordonnées de l'origine
  8. #declare CAMERA = <-30,20,0>; // Position de la caméra
  9.  
  10. #declare RotationNext = 30;
  11. #declare RotationEnd = 88;
  12.  
  13.  
  14. /* Objets */
  15.   /* Objets de base */
  16. #declare BaseDomino = object { // Forme du domino
  17.   Round_Box(<0,0,0>,<1,0.5,2>, 0.125, 0)
  18.   scale 5
  19.   rotate<-90,0,0>
  20.   translate<0,0,0>
  21. }
  22.  
  23. #declare Table = object {
  24.   box { ORIGINE <100,10,100> texture { Chrome_Metal } }
  25. }
  26.  
  27.   /* Objets complexes */
  28. #declare Domino = union { // Assemblage du domino standard final
  29.   object { BaseDomino }
  30.   texture { Ruby_Glass finish { phong 0.5 ambient 0.3 specular 0.5} }
  31. }
  32.  
  33.  
  34. /* Animation */
  35. // rotation max avant toucher : 30
  36. /* #if (Rotation =< RotationNext)
  37.  
  38. */
  39. // rotation max par terre :
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. /* Description de la scène*/
  54.   /* Dominos */
  55. object { Domino rotate <29,0,0>}
  56. object { Domino rotate <0,0,0> translate <0,0,7>}
  57. object { Domino rotate <45,0,0> translate <0,0,14>}
  58. object { Domino rotate <45,0,0> translate <0,0,21>}
  59. object { Domino rotate <45,0,0> translate <0,0,28>}
  60. object { Domino rotate <45,0,0> translate <0,0,35> }
  61.  
  62. object { Table translate <-50,-10,-50> }
  63.  
  64.   /* Sources de lumières */
  65. light_source { // Lumière ambiante sur la caméra
  66.   CAMERA
  67.   1
  68. }
  69.  
  70. light_source { // Lumière en hauteur
  71.   <2,50,2>
  72.   2
  73. }
  74.  
  75.   /* Caméra */
  76. camera { // Caméra principale
  77.   location CAMERA
  78.   look_at ORIGINE
  79. }
  80.  
  81.  
  82.  
  83. /* Axes de construction */
  84. cylinder { ORIGINE, <0,100,0>, 1 texture { pigment { Red } } } // Axe Y
  85. cylinder { ORIGINE, <100,0,0>, 1 texture { pigment { Green } } } // Axe X
  86. cylinder { ORIGINE, <0,0,100>, 1 texture { pigment { Blue } } } // Axe Z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement