home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4613 / fountain.rrt < prev    next >
Text File  |  1980-01-06  |  15KB  |  666 lines

  1. // Real Ray Tracer
  2. // A fountain
  3. // Designed by Fabrice Lamide & Pascal HAUTIN
  4. // May 1994
  5.  
  6. #include "colors.inc"
  7. #include "shapes.inc"
  8. #include "textures.inc"
  9.  
  10. camera {
  11.   location <21 20 -22.5>
  12.   point_at <0 7.8 0>
  13.   angle 12.5
  14. }
  15.  
  16. environment {
  17.   background color Blue
  18.   brightness 1.3
  19.   fall_off 0.015
  20.  
  21. object {
  22.   light_source { <8 5 -5> intensity 15 color White }
  23. }
  24.  
  25. object {
  26.   light_source { <8 18 -5> intensity 10 color White }
  27. }
  28.  
  29. object {
  30.   light_source { <-6 14 11> intensity 10 color White }
  31. }
  32.  
  33. object {
  34.   light_source { <-8 14 6> intensity 10 color White }
  35. }
  36.  
  37. #declare Wood1 = texture {
  38.   wood
  39.   turbulence 0.4
  40.   octaves 2
  41.   scale <0.1 0.1 0.4>
  42.   color_map {
  43.     [0.00 0.10 color red 0.60 green 0.30 blue 0.18
  44.                color red 0.60 green 0.30 blue 0.18]
  45.     [0.10 0.90 color red 0.60 green 0.30 blue 0.18
  46.                color red 0.30 green 0.15 blue 0.09]
  47.     [0.90 1.00 color red 0.30 green 0.15 blue 0.09
  48.                color red 0.30 green 0.15 blue 0.09]
  49.   }
  50. }
  51.  
  52. #declare Recule = 5
  53.  
  54. #declare Lobe = union {
  55.   intersection {
  56.     QCone_X
  57.     slab { <1 0 0> 0 1 }
  58.     scale <1 0.122790698 0.122790698>
  59.   }
  60.   intersection {
  61.     sphere { <1.015077555 0 0> 0.1237129262 }
  62.     plane { <-1 0 0> 1 }
  63.   }
  64.   rotate <0 0 -20>
  65. }    
  66.  
  67. #declare Base = bound {
  68.   object { Lobe rotate <0   0 0> }
  69.   object { Lobe rotate <0  12 0> }
  70.   object { Lobe rotate <0  24 0> }
  71.   object { Lobe rotate <0  36 0> }
  72.   object { Lobe rotate <0  48 0> }
  73.   object { Lobe rotate <0  60 0> }
  74.   object { Lobe rotate <0  72 0> }
  75.   object { Lobe rotate <0  84 0> }
  76.   object { Lobe rotate <0  96 0> }
  77.   object { Lobe rotate <0 108 0> }
  78.   object { Lobe rotate <0 120 0> }
  79.   object { Lobe rotate <0 132 0> }
  80.   object { Lobe rotate <0 144 0> }
  81.   object { Lobe rotate <0 156 0> }
  82.   object { Lobe rotate <0 168 0> }
  83.   object { Lobe rotate <0 180 0> }
  84.   object { Lobe rotate <0 192 0> }
  85.   object { Lobe rotate <0 204 0> }
  86.   object { Lobe rotate <0 216 0> }
  87.   object { Lobe rotate <0 228 0> }
  88.   object { Lobe rotate <0 240 0> }
  89.   object { Lobe rotate <0 252 0> }
  90.   object { Lobe rotate <0 264 0> }
  91.   object { Lobe rotate <0 276 0> }
  92.   object { Lobe rotate <0 288 0> }
  93.   object { Lobe rotate <0 300 0> }
  94.   object { Lobe rotate <0 312 0> }
  95.   object { Lobe rotate <0 324 0> }
  96.   object { Lobe rotate <0 336 0> }
  97.   object { Lobe rotate <0 348 0> }
  98. }
  99. by box { <-1.1 -0.47 -1.1> <1.1 0 1.1> }
  100.  
  101. #declare Milieu1 = bound {
  102.     object { 
  103.       intersection { 
  104.         Hyperboloid_Y 
  105.         slab { <0 1 0> -3.1 1.118 }
  106.         scale <0.6 1.104 0.6>
  107.       }
  108.       translate <0 2.4 0>
  109.     }
  110.   }
  111.   by box { <-2 -0.8 -2> <2 3.6 2> }
  112.  
  113. #declare Bosse = object {
  114.   Ellipsoid
  115.   scale <0.8 0.8 0.2>
  116.   translate <0 4.634272 0> 
  117. }
  118.  
  119. #declare Milieu2 = bound {
  120.   object {
  121.     torus { <0 0 0> <0 0 1> 0.9 0.1 }
  122.     rotate <90 0 0>
  123.     translate <0 3.734272 0> 
  124.   }
  125.   object { 
  126.     intersection { 
  127.       Hyperboloid_Y 
  128.       slab { <0 1 0> -1.118 1.118 }
  129.       scale <0.6 0.7155635063 0.6>
  130.     }
  131.     translate <0 4.634272 0>
  132.   }
  133.   object { Bosse }
  134.   object { Bosse rotate <0  15 0> }
  135.   object { Bosse rotate <0  30 0> }
  136.   object { Bosse rotate <0  45 0> }
  137.   object { Bosse rotate <0  60 0> }
  138.   object { Bosse rotate <0  75 0> }
  139.   object { Bosse rotate <0  90 0> }
  140.   object { Bosse rotate <0 105 0> }
  141.   object { Bosse rotate <0 120 0> }
  142.   object { Bosse rotate <0 135 0> }
  143.   object { Bosse rotate <0 150 0> }
  144.   object { Bosse rotate <0 165 0> }
  145.   object {
  146.     torus { <0 0 0> <0 0 1> 0.9 0.1 }
  147.     rotate <90 0 0>
  148.     translate <0 5.534272 0> 
  149.   }
  150.   object {
  151.     intersection {
  152.       Cylinder_Y
  153.       slab { <0 1 0> -0.3 0.3 }
  154.     }
  155.     scale <0.9 1 0.9>
  156.     translate <0 5.834272 0> 
  157.   }
  158. }
  159. by box { <-1 3.6 -1> <1 6.2 1> }
  160.  
  161. #declare Pied = object {
  162.   composite {
  163.     object { Base scale <4.3 4.3 4.3> }
  164.     object { Milieu1 }
  165.     object { Milieu2 }
  166.   }
  167.   texture {
  168.     White_Marble
  169.     scale <0.5 0.5 0.5>
  170.     ambient 0.2
  171.     diffuse 0.7
  172.     phong 0.25
  173.     phong_size 90
  174.   }
  175. }
  176.  
  177. #declare CuvetteA =
  178.   union {  
  179.     intersection { 
  180.       Paraboloid_Y 
  181.       plane { <0 1 0> 36 }
  182.       scale <1 0.06388888889 1>
  183.     }
  184.     torus { <0 0 0> <0 0 1> 5.90873527 0.15 rotate <90 0 0> translate <0 2.419040954 0> }
  185.   }
  186.  
  187. #declare CuvetteElemB = intersection { 
  188.   Paraboloid_Y 
  189.   plane { <0 1 0> 40 }
  190.   scale <1 0.06388888889 0.2>
  191. }
  192.  
  193. #declare CuvetteB =
  194.   union {
  195.     union {
  196.       union {
  197.         union {
  198.           object { CuvetteElemB }
  199.           object { CuvetteElemB rotate <0 11.25 0> }
  200.         }
  201.         union {
  202.           object { CuvetteElemB rotate <0 22.50 0>}
  203.           object { CuvetteElemB rotate <0 33.75 0> }
  204.         }
  205.       }
  206.       union {
  207.         union {
  208.           object { CuvetteElemB rotate <0 45 0>}
  209.           object { CuvetteElemB rotate <0 56.25 0> }
  210.         }
  211.         union {
  212.           object { CuvetteElemB rotate <0 67.50 0>}
  213.           object { CuvetteElemB rotate <0 78.75 0> }
  214.         }
  215.       }
  216.     }
  217.     union {
  218.       union {
  219.         union {
  220.           object { CuvetteElemB rotate <0 90 0>}
  221.           object { CuvetteElemB rotate <0 101.25 0> }
  222.         }
  223.         union {
  224.           object { CuvetteElemB rotate <0 112.50 0>}
  225.           object { CuvetteElemB rotate <0 123.75 0> }
  226.         }
  227.       }
  228.       union {
  229.         union {
  230.           object { CuvetteElemB rotate <0 135 0>}
  231.           object { CuvetteElemB rotate <0 146.25 0> }
  232.         }
  233.         union {
  234.           object { CuvetteElemB rotate <0 157.50 0>}
  235.           object { CuvetteElemB rotate <0 168.75 0> }
  236.         }
  237.       }
  238.     }
  239.   }
  240.  
  241. #declare Bassin = object {
  242.   intersection { 
  243.     object { Paraboloid_Y scale <1 0.06388888889 1> translate <0 7.325 0> }
  244.     plane { <0 1 0> 9.3 }
  245.   }
  246.   scale <0.9 1 0.9>
  247.   texture {
  248.     color red 0.9 green 0.95 blue 0.9
  249.     ambient 0.03 
  250.     diffuse 0.0175
  251. //    reflection 0.10
  252.     refraction 0.95
  253.     ior 1.33      
  254.     phong 0.15
  255.     phong_size 150
  256.     bump { 
  257.       bumps 0.055
  258.       scale <0.1 0.1 0.1>
  259.       ripples 0.18 { center < 2.297 9.3 0> frequency 5 phase 0 decay 0.8 }
  260.       ripples 0.18 { center <-2.297 9.3 0> frequency 5 phase 0 decay 0.8 }
  261.       ripples 0.18 { center <0 9.3  2.297> frequency 5 phase 0 decay 0.8 }
  262.       ripples 0.18 { center <0 9.3 -2.297> frequency 5 phase 0 decay 0.8 }
  263.     }
  264.   }
  265. }
  266.  
  267. #declare Cuvette = object {
  268.   bound {
  269.     object {
  270.       difference {
  271.         object { CuvetteA }
  272.         object { CuvetteB translate <0 0.1 0> }
  273.         translate <0 7.3 0>
  274.         scale <0.9 1 0.9>
  275.       }
  276.     }
  277.     object { Bassin }   // eau dans la cuvette 
  278.   }
  279.   by box { <-6.4 7.3 -6.4> <6.4 9.7 6.4> }
  280.   texture {
  281.     White_Marble
  282.     scale <0.1 0.1 0.1>
  283.     ambient 0.08
  284.     diffuse 0.17
  285.     phong 0.25
  286.     phong_size 90
  287.   }
  288. }
  289.      
  290. #declare SommetElem1 = intersection { 
  291.   Hyperboloid_Y 
  292.   slab { <0 1 0> -2.108185106 0 }
  293.   scale <0.45 1.660195772 0.15>
  294. }
  295.  
  296. #declare Sommet1 = bound {
  297.   object { SommetElem1 translate <0 11.1 0> }
  298.   object { SommetElem1 rotate <0 30 0> translate <0 11.1 0> }
  299.   object { SommetElem1 rotate <0 60 0> translate <0 11.1 0> }
  300.   object { SommetElem1 rotate <0 90 0> translate <0 11.1 0> }
  301.   object { SommetElem1 rotate <0 120 0> translate <0 11.1 0> }
  302.   object { SommetElem1 rotate <0 150 0> translate <0 11.1 0> }
  303. }
  304. by box { <-1.2 7.4 -1.2> <1.2 11.1 1.2> }
  305.  
  306. #declare Sommet2 = bound {
  307.   object {
  308.     torus { <0 0 0> <0 0 1> 0.45 0.075 }
  309.     rotate <90 0 0>
  310.     translate <0 11.175 0> 
  311.   }
  312.   object {
  313.     difference { 
  314.       intersection { 
  315.         Cylinder_Y 
  316.         slab { <0 1 0> -0.2 0.2 }
  317.         scale <0.45 1 0.45>
  318.       }
  319.       torus { <0 0 0> <0 0 1> 0.45 0.2 rotate <90 0 0> }
  320.       translate <0 11.45 0>
  321.     }
  322.   }
  323.   object {
  324.     torus { <0 0 0> <0 0 1> 0.45 0.075 }
  325.     rotate <90 0 0>
  326.     translate <0 11.725 0> 
  327.   }
  328. }
  329. by box { <-0.525 11.1 -0.525> <0.525 11.9 0.525> }
  330.  
  331. #declare Sommet = object {
  332.   composite {
  333.     object { Sommet1 }
  334.     object { Sommet2 }
  335.     object {
  336.       difference {
  337.         intersection {
  338.           object { Ellipsoid scale <0.8 0.3 0.8> }
  339.           plane { <0 1 0> 0.17 }
  340.         }
  341.         object {
  342.           intersection { 
  343.             Cylinder_Y 
  344.             slab { <0 1 0> 0 1 }
  345.             scale <0.7 1 0.7>
  346.           }
  347.           texture { color Gray05 }
  348.         }
  349.         translate <0 12.025 0> 
  350.       }
  351.     }
  352.   }
  353.   texture {
  354.     marble       // White_Marble
  355.     turbulence 1.0
  356.     color_map {
  357.       [0.0 0.8 color red 0.9 green 0.9 blue 0.9
  358.                color red 0.5 green 0.5 blue 0.5]
  359.       [0.8 1.0 color red 0.5 green 0.5 blue 0.5
  360.                color red 0.2 green 0.2 blue 0.2]
  361.     }
  362.     scale <0.25 0.25 0.25>
  363.     ambient 0.120
  364.     diffuse 0.225
  365.     phong 0.25
  366.     phong_size 90
  367.   }
  368. }
  369.  
  370. #declare Robinet = object {
  371.   bound {
  372.     intersection {
  373.       intersection {
  374.         torus { <0 0 0> <0 0 1> 0.9 0.09 }
  375.         plane { <1 0 0> 0 rotate <0 0 -30> }
  376.       }
  377.       plane { <-1 0 0> 0 }
  378. //      scale <0.85 1 1> 
  379.       translate <0.75 11.125 0> 
  380.     }
  381.   }
  382.   by box { <0.75 11.8 -0.1> <1.5 12.13 0.1> }
  383.   texture {
  384.     Metal
  385.     color Gold
  386.     ambient 0.2
  387.     diffuse 0.5
  388.     phong 0.25
  389.     phong_size 90
  390.     bump { bumps 0.1 scale <0.013 0.013 0.013> }
  391.   }
  392. }
  393.  
  394. #declare Robinets = composite {
  395.   object { Robinet }
  396.   object { Robinet rotate <0 90 0> }
  397.   object { Robinet rotate <0 180 0> }
  398.   object { Robinet rotate <0 270 0> }
  399. }
  400.  
  401. #declare Jet = object {
  402.   bound {
  403.     difference {
  404.       difference {
  405.         torus { <0 0 0> <0 0 1> 1 0.0310344827 }
  406.         plane { <1 0 0> 0 rotate <0 0 -25> }
  407.       }
  408.       plane { <0 1 0> 0 }
  409.       scale <1.9 2.9 2.9> 
  410.       translate <0.3970253 9.276130278 0> 
  411.     }
  412.   }
  413.   by box { <1.2 9.27 -0.09> <2.75 12.17 0.09> }
  414.   texture {
  415.     color red 0.9 green 0.95 blue 0.9
  416.     ambient 0.03 
  417.     diffuse 0.015
  418. //    reflection 0.10
  419.     refraction 0.96
  420.     ior 1.33      
  421.     phong 0.25
  422.     phong_size 90
  423.     bump { bumps 0.1 scale <0.03 0.03 0.03> }
  424.   }
  425. }
  426.  
  427. #declare Jets = composite {
  428.   object { Jet }
  429.   object { Jet rotate <0 90 0> }
  430.   object { Jet rotate <0 180 0> }
  431.   object { Jet rotate <0 270 0> }
  432. }
  433.  
  434. #declare JetSommet = object {
  435.   bound {
  436.     difference {
  437.       intersection { 
  438.         Paraboloid_Y 
  439.         plane { <0 1 0> 1 }
  440.         scale <0.4 1.1 0.4>
  441.       }
  442.       intersection { 
  443.         Paraboloid_Y 
  444.         plane { <0 1 0> 1.1 }
  445.         scale <0.33 1 0.33>
  446.         translate <0 0.1 0>
  447.       }
  448.       rotate <180 0 0>
  449.       scale <1 0.75 1>
  450.       translate <0 12.925 0>
  451.     }
  452.   }
  453.   by box { <-0.4 12 -0.4> <0.4 13.3 0.4> }
  454.   texture {
  455.     color red 0.9 green 0.93 blue 0.9
  456.     ambient 0.02 
  457.     diffuse 0.01
  458. //    reflection 0.10
  459.     refraction 0.96
  460.     ior 1.33      
  461.     phong 0.25
  462.     phong_size 90
  463.     bump { bumps 0.15 scale <0.03 0.03 0.03> }
  464.   }
  465. }
  466.  
  467. #declare Sol = object {
  468.   plane { <0 1 0> -2 }
  469.   texture {
  470.     checker 
  471.       texture {
  472.         Brown_Agate 
  473.         scale <0.7 0.7 0.7>
  474.         ambient 0.15
  475.         diffuse 0.30
  476.       }
  477.       texture {
  478.         Brown_Agate 
  479.         scale <0.7 0.7 0.7>
  480.         ambient 0.15
  481.         diffuse 0.30
  482.         rotate <0 45 0>
  483.       }
  484.       scale <3 0 3>
  485.       ambient 0.1 
  486.       diffuse 0.2
  487.   }
  488.   rotate <0 -30 0>
  489. }
  490.  
  491. #declare Pos_Porte = <3 -1.95 24.5>
  492.  
  493. #declare Mur = object {
  494.   difference {
  495.     plane { <0 0 -1> -25 }
  496.     box { <-4 -0.5 -0.5> <4 12.5 22.5> translate Pos_Porte }
  497.   }
  498.   texture {
  499.     Blue_Agate
  500.     rotate <0 30 0>
  501.     ambient 0.04
  502.     diffuse 0.08
  503.   }
  504.   translate <0 1 Recule>
  505.   rotate <0 -30 0>
  506. }
  507.  
  508. #declare Moulure = intersection {
  509.   union {
  510.     union {
  511.       box { <-0.5 -6 -0.4> <0.2 6 0.4> }
  512.       object { Cylinder_Y scale <0.3 1 0.3> translate < 0.2 0 0> }
  513.     }
  514.     object { Cylinder_Y scale <0.3 1 0.3> translate <-0.5 0 0> }
  515.     translate <4.5 0 0>
  516.   }
  517.   intersection {
  518.     plane { <-1  1 0> 0 }
  519.     plane { <-1 -1 0> 0 }
  520.   }
  521. }
  522.  
  523. #declare Moulure1 = object {
  524.   Moulure
  525.   translate <-2.5 0 0>
  526. }
  527.  
  528. #declare Moulure2 = object {
  529.   Moulure
  530.   rotate <0 0 180>
  531.   translate <2.5 0 0>
  532. }
  533.  
  534. #declare Moulure3 = object {
  535.   Moulure
  536.   rotate <0 0 90>
  537.   scale <0.5 1 1>
  538. }
  539.  
  540. #declare Moulure4 = object {
  541.   Moulure3
  542.   rotate <0 0 180>
  543. }
  544.  
  545. #declare Porte = object {
  546.   bound {
  547.     difference {
  548.       box { <-3.5 0 0> <3.5 12 2> }
  549.       union {
  550.         union {
  551.           Moulure1
  552.           Moulure2
  553.         }
  554.         union {
  555.           Moulure3
  556.           Moulure4
  557.         }
  558.         translate <0 6 0>
  559.       }
  560.     }
  561.   }
  562.   by box { <-3.5 0 0> <3.5 12 2> }
  563.   texture {
  564.     Tom_Wood
  565.     scale <0.75 0.75 0.75>
  566.     rotate <90 0 0>
  567.     ambient 0.225
  568.     diffuse 0.45
  569. //    reflection 0.3
  570.     phong 0.15
  571.     phong_size 200
  572.   }
  573.   translate Pos_Porte
  574.   translate <0 1 Recule> 
  575.   rotate <0 -30 0>
  576. }
  577.  
  578. #declare Poignée = object {
  579.   Ellipsoid
  580.   scale <0.35 0.45 0.35>
  581.   translate <3.1 6 -0.3>
  582.   texture {
  583.     Metal
  584.     color Gold
  585.     ambient 0.18
  586.     diffuse 0.35
  587.     phong 0.25
  588.     phong_size 100
  589.     bump { bumps 0.1 scale <0.013 0.013 0.013> }
  590.   }
  591.   translate Pos_Porte
  592.   translate <0 1 Recule> 
  593.   rotate <0 -30 0>
  594. }
  595.  
  596. #declare Cadre = object {
  597.   difference {
  598.     box { <-4 0 0> <4 12.55 2> }
  599.     box { <-3.6 -0.5 -0.5> <3.6 12.15 2.5> }
  600.   }
  601.   texture {
  602.     Tom_Wood
  603.     scale <1.2 1.2 1.2>
  604.     rotate <90 0 0>
  605.     ambient 0.225
  606.     diffuse 0.450
  607.     phong 0.15
  608.     phong_size 200
  609.   }
  610.   translate <0 -0.05 0>
  611.   translate Pos_Porte
  612.   translate <0 1 Recule> 
  613.   rotate <0 -30 0>
  614. }
  615.  
  616. #declare Tableau = object {
  617.   bound {
  618.     object {
  619.       difference {
  620.         box { <-5 -3.75 -0.4> <5 3.75 0> }
  621.         box { <-4.7 -3.45 -0.5> <4.7 3.45 -0.1> }
  622.       }
  623.       texture {
  624.         Tom_Wood
  625.         scale <0.75 0.75 0.75>
  626.         rotate <90 0 0>
  627.         ambient 0.225
  628.         diffuse 0.450
  629.         phong 0.15
  630.         phong_size 90
  631.       }
  632.     }
  633.     object {
  634.       box { <-4.7 -3.45 -0.3> <4.7 3.45 -0.2> }
  635.       texture {
  636.         image_map { <-4.7 -3.45 -0.3> <1 0 0> <0 1 0> 9.4 "crawford.tga" }
  637.         translate <0 -1 0>
  638.         scale <1 0.75 1>
  639.         ambient 0.05 diffuse 0.075
  640.       }
  641.     }
  642.   }
  643.   by box { <-5 -3.75 -0.4> <5 3.75 0> }
  644.   scale <0.75 0.75 1>
  645.   translate <-15 5 24.75>
  646.   translate <0 0.8 Recule> 
  647.   rotate <0 -30 0>
  648. }
  649.  
  650. object { Pied translate <0 1 0> }
  651. object { Cuvette }
  652. object { Sommet }
  653. object { Robinets }
  654. object { Jets }
  655. object { JetSommet }
  656.  
  657. object { Sol translate <0 1 0> }
  658. object { Mur }
  659. object { Porte }
  660. object { Poignée }
  661. object { Cadre }
  662. object { Tableau }
  663.  
  664. end.
  665.