home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4613 / solitair.rrt < prev    next >
Text File  |  1980-01-10  |  7KB  |  435 lines

  1. // Real Ray Tracer
  2. // un jeu de solitaire
  3. // Jean-Guillaume HAMELIN
  4.  
  5. #include "colors.inc"
  6. #include "textures.inc"
  7. #include "shapes.inc"
  8.  
  9.  
  10. //=============================================
  11. //    DEFINITION DU PLATEAU
  12. //=============================================
  13.  
  14.  
  15. #declare Neuf_Trous = union {
  16.      union {
  17.       union {
  18.         union {
  19.             sphere { <-2  0 0.75> 0.5 }
  20.             sphere { < 0  0 0.75> 0.5 }
  21.         }
  22.         union {
  23.             sphere { < 2  0 0.75> 0.5 }
  24.             sphere { <-2  2 0.75> 0.5 }
  25.         }
  26.       }
  27.       union {
  28.         union {
  29.             sphere { < 0  2 0.75> 0.5 }
  30.             sphere { < 2  2 0.75> 0.5 }
  31.         }
  32.         union {
  33.             sphere { <-2 -2 0.75> 0.5 }
  34.             sphere { < 0 -2 0.75> 0.5 }
  35.         }
  36.       }
  37.      }
  38.      sphere { < 2 -2 0.75> 0.5 }
  39. }
  40.  
  41. object {
  42.  bound {
  43.     difference {
  44.        difference {
  45.         union {
  46.             torus { <+0 +0 +0> <+0 +0 +1> 12 0.5 }
  47.             intersection {
  48.                 Cylinder_Z 
  49.                 slab { <+0 +0 +1> -1 1 }
  50.                 scale <12 12 0.5>
  51.             }
  52.             }
  53.         union {
  54.             torus { <+0 +0 +0.75> <0 0 1> 10 0.5 }
  55.             Neuf_Trous
  56.         }
  57.        }
  58.        union {
  59.         union {
  60.             object { Neuf_Trous translate <-6 0 0> }
  61.             object { Neuf_Trous translate < 6 0 0> }
  62.         }
  63.         union {
  64.             object { Neuf_Trous translate <0 -6 0> }
  65.             object { Neuf_Trous translate <0  6 0> }
  66.         }
  67.        }
  68.     }
  69.   }
  70.   by box { <-12.5 -12.5 -0.5> <+12.5 +12.5 +0.5> }
  71.   texture {
  72.     Jade
  73.     ambient 0.2
  74.     diffuse 0.6
  75.   }
  76. }
  77.  
  78. //=====================================================
  79. //    FIN DE LA DEFINITION DU PLATEAU
  80. //=====================================================
  81.  
  82. //=====================================================
  83. //    DEFINITION DES BILLES
  84. //=====================================================
  85.  
  86. //=============================
  87. //    ligne x=-8
  88. //=============================
  89.  
  90. object {
  91. bound {
  92.  
  93. object {
  94.  sphere  { <-8 -2 +0.75> 0.5 }
  95.  texture { Sapphire_Agate }
  96. }
  97.  
  98. object {
  99.  sphere  { <-8 +0 +0.75> 0.5 }
  100.  texture { Sapphire_Agate }
  101. }
  102.  
  103. object {
  104.  sphere  { <-8 +2 +0.75> 0.5 }
  105.  texture { Sapphire_Agate }
  106. }
  107.  
  108. }
  109. by box { <-8.5 -2.5 0.25> <-7.5 2.5 1.25> }
  110. }
  111.  
  112. //=============================
  113. //    ligne x=-6
  114. //=============================
  115.  
  116. object {
  117. bound {
  118.  
  119. object {
  120.  sphere  { <-6 -2 +0.75> 0.5 }
  121.  texture { Blood_Marble }
  122. }
  123.  
  124. object {
  125.  sphere  { <-6 +0 +0.75> 0.5 }
  126.  texture { Blood_Marble }
  127. }
  128.  
  129. object {
  130.  sphere  { <-6 +2 +0.75> 0.5 }
  131.  texture { Blood_Marble }
  132. }
  133.  
  134. }
  135. by box { <-6.5 -2.5 0.25> <-5.5 2.5 1.25> }
  136. }
  137.  
  138. //=============================
  139. //    ligne x=-4
  140. //=============================
  141.  
  142. object {
  143. bound {
  144.  
  145. object {
  146.  sphere  { <-4 -2 +0.75> 0.5 }
  147.  texture { Pink_Granite }
  148. }
  149.  
  150. object {
  151.  sphere  { <-4 +0 +0.75> 0.5 }
  152.  texture { Pink_Granite }
  153. }
  154.  
  155. object {
  156.  sphere  { <-4 +2 +0.75> 0.5 }
  157.  texture { Pink_Granite }
  158. }
  159.  
  160. }
  161. by box { <-4.5 -2.5 0.25> <-3.5 2.5 1.25> }
  162. }
  163.  
  164. //=============================
  165. //    ligne x=-2
  166. //=============================
  167.  
  168. object {
  169. bound {
  170.  
  171. object {
  172.  sphere  { <-2 -8 +0.75> 0.5 }
  173.  texture { White_Marble }
  174. }
  175.  
  176. object {
  177.  sphere  { <-2 -6 +0.75> 0.5 }
  178.  texture { White_Marble }
  179. }
  180.  
  181. object {
  182.  sphere  { <-2 -4 +0.75> 0.5 }
  183.  texture { White_Marble }
  184. }
  185.  
  186. object {
  187.  sphere  { <-2 -2 +0.75> 0.5 }
  188.  texture { White_Marble }
  189. }
  190.  
  191. object {
  192.  sphere  { <-2 +0 0.75> 0.5 }
  193.  texture { White_Marble }
  194. }
  195.  
  196. object {
  197.  sphere  { <-2 +2 +0.75> 0.5 }
  198.  texture { White_Marble }
  199. }
  200.  
  201. object {
  202.  sphere  { <-2 +4 +0.75> 0.5 }
  203.  texture { White_Marble }
  204. }
  205.  
  206. object {
  207.  sphere  { <-2 +6 +0.75> 0.5 }
  208.  texture { White_Marble }
  209. }
  210.  
  211. object {
  212.  sphere  { <-2 +8 +0.75> 0.5 }
  213.  texture { White_Marble }
  214. }
  215.  
  216. }
  217. by box { <-2.5 -8.5 0.25> <-1.5 8.5 1.25> }
  218. }
  219.  
  220. //=============================
  221. //    ligne x=0
  222. //=============================
  223.  
  224. object {
  225. bound {
  226.  
  227. object {
  228.  sphere  { <+0 -8 +0.75> 0.5 }
  229.  texture { Gold_Metal }
  230. }
  231.  
  232. object {
  233.  sphere  { <+0 -6 +0.75> 0.5 }
  234.  texture { Gold_Metal }
  235. }
  236.  
  237. object {
  238.  sphere  { <+0 -4 +0.75> 0.5 }
  239.  texture { Gold_Metal }
  240. }
  241.  
  242. object {
  243.  sphere  { <+0 -2 +0.75> 0.5 }
  244.  texture { Gold_Metal }
  245. }
  246.  
  247. object {
  248.  sphere  { <+0 +0 +0.75> 0.5 }
  249.  texture { Gold_Metal }
  250. }
  251.  
  252. object {
  253.  sphere  { <+0 +2 +0.75> 0.5 }
  254.  texture { Gold_Metal }
  255. }
  256.  
  257. object {
  258.  sphere  { <+0 +4 +0.75> 0.5 }
  259.  texture { Gold_Metal }
  260. }
  261.  
  262. object {
  263.  sphere  { <+0 +6 +0.75> 0.5 }
  264.  texture { Gold_Metal }
  265. }
  266.  
  267. object {
  268.  sphere  { <+0 +8 +0.75> 0.5 }
  269.  texture { Gold_Metal }
  270. }
  271.  
  272. }
  273. by box { <-0.5 -8.5 0.25> <+0.5 8.5 1.25> }
  274. }
  275.  
  276. //=============================
  277. //    ligne x=2
  278. //=============================
  279.  
  280. object {
  281. bound {
  282.  
  283. object {
  284.  sphere  { <+2 -8 +0.75> 0.5 }
  285.  texture { Chrome_Metal }
  286. }
  287.  
  288. object {
  289.  sphere  { <+2 -6 +0.75> 0.5 }
  290.  texture { Chrome_Metal }
  291. }
  292.  
  293. object {
  294.  sphere  { <+2 -4 +0.75> 0.5 }
  295.  texture { Chrome_Metal }
  296. }
  297.  
  298. object {
  299.  sphere  { <+2 -2 +0.75> 0.5 }
  300.  texture { Chrome_Metal }
  301. }
  302.  
  303. object {
  304.  sphere  { <+2 +0 +0.75> 0.5 }
  305.  texture { Chrome_Metal }
  306. }
  307.  
  308. object {
  309.  sphere  { <+2 +2 +0.75> 0.5 }
  310.  texture { Chrome_Metal }
  311. }
  312.  
  313. object {
  314.  sphere  { <+2 +4 +0.75> 0.5 }
  315.  texture { Chrome_Metal }
  316. }
  317.  
  318. object {
  319.  sphere  { <+2 +6 +0.75> 0.5 }
  320.  texture { Chrome_Metal }
  321. }
  322.  
  323. object {
  324.  sphere  { <+2 +8 +0.75> 0.5 }
  325.  texture { Chrome_Metal }
  326. }
  327.  
  328. }
  329. by box { < 1.5 -8.5 0.25> < 2.5 8.5 1.25> }
  330. }
  331.  
  332. //=============================
  333. //    ligne x=4
  334. //=============================
  335.  
  336. object {
  337. bound {
  338.  
  339. object {
  340.  sphere  { <+4 -2 +0.75> 0.5 }
  341.  texture { Brass_Metal }
  342. }
  343.  
  344. object {
  345.  sphere  { <+4 +0 +0.75> 0.5 }
  346.  texture { Brass_Metal }
  347. }
  348.  
  349. object {
  350.  sphere  { <+4 +2 +0.75> 0.5 }
  351.  texture { Brass_Metal }
  352. }
  353.  
  354. }
  355. by box { < 3.5 -2.5 0.25> < 4.5 2.5 1.25> }
  356. }
  357.  
  358. //=============================
  359. //    ligne x=6
  360. //=============================
  361.  
  362. object {
  363. bound {
  364.  
  365. object {
  366.  sphere  { <+6 -2 +0.75> 0.5 }
  367.  texture { Red_Marble }
  368. }
  369.  
  370. object {
  371.  sphere  { <+6 +0 +0.75> 0.5 }
  372.  texture { Red_Marble }
  373. }
  374.  
  375. object {
  376.  sphere  { <+6 +2 +0.75> 0.5 }
  377.  texture { Red_Marble }
  378. }
  379.  
  380. }
  381. by box { < 5.5 -2.5 0.25> < 6.5 2.5 1.25> }
  382. }
  383.  
  384. //=============================
  385. //    ligne x=8
  386. //=============================
  387.  
  388. object {
  389. bound {
  390.  
  391. object {
  392.  sphere  { <+8 -2 +0.75> 0.5 }
  393.  texture { Blue_Agate }
  394. }
  395.  
  396. object {
  397.  sphere  { <+8 +0 +0.75> 0.5 }
  398.  texture { Blue_Agate }
  399. }
  400.  
  401. object {
  402.  sphere  { <+8 +2 +0.75> 0.5 }
  403.  texture { Blue_Agate }
  404. }
  405.  
  406. }
  407. by box { < 7.5 -2.5 0.25> < 8.5 2.5 1.25> }
  408. }
  409.  
  410.  
  411. //=====================================================
  412. //    FIN DE LA DEFINITION DES BILLES
  413. //=====================================================
  414.  
  415. object {
  416.   plane   { <+0 +0 +1> -0.5 }
  417.   texture {
  418.           Gold_Metal
  419.   }
  420. }
  421.  
  422. camera {
  423.   location  <+0 -10 +25>
  424.   point_at  <+0 +0 +0>
  425.   angle 30
  426. }
  427.  
  428.  
  429.  
  430. object {
  431.   light_source { <+0 -10 +25> intensity 16
  432.   color White }
  433. }
  434.  
  435. end.