home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / rayce27 / vlothack.r < prev   
Encoding:
Text File  |  1994-01-08  |  9.4 KB  |  414 lines

  1. /* VLOTHACK.R
  2.  * A port to Rayce of
  3.  * A port to PoV
  4.  * of Lex van der Sluijs' vlot.v for Vivid,
  5.  * by Han-Wen Nienhuys <hanwen@stack.urc.tue.nl>
  6.  */
  7.  
  8. #include "colors.inc"
  9. #include "shapes.inc"
  10.  
  11. #declare FoV_45 = 1.373                   /*  bij aspect 1:1 */
  12.  
  13. camera {
  14.   location <170, -286, 60>
  15.   direction <1.373, 0, 0>
  16.   sky <0, 0, 1>
  17.   look_at <0, -40, 65>
  18.   fov 45
  19. }
  20.  
  21. options { background color SkyBlue }
  22.  
  23. object {
  24.   light_source { <-600, -450, 1500> color red 1.0 green 1.0 blue 1.0 }
  25. }
  26.  
  27. #declare LeXgreen = color red 0.3 green 0.6 blue 0.8
  28. #declare waterplane = object {                     /* water */
  29.   plane { <0, 0, 1>, -1 }
  30.   texture{
  31.     diffuse color green .1 blue .05
  32.     reflection color red .05 green .15 blue .1
  33.     refraction color red .5 green .8 blue .7
  34.     ior 1.2
  35.     roughness 0.01
  36.     specular color White
  37.     diffuse color Gray10
  38. //            waves 0.1 frequency 30
  39. //            ripples 0.4 frequency 0.2
  40.   }
  41. }
  42.  
  43. object {     /*  voor digital zits */
  44.   plane { <0, 0, 1>, -50 }
  45.   texture {
  46.     color LeXgreen
  47.     ambient 1.0 diffuse 0.0
  48.     reflection 0.0
  49.     refraction 0.0
  50.   }
  51. }
  52.  
  53. #declare Zeil_Texture = texture {
  54.   /*granite
  55.   turbulence 1.0 */
  56.   diffuse color rgb <.6, .6, .6>
  57.   ambient color rgb <.4, .4, .4>
  58.   specular color rgb <.1, .1, .1>
  59.   
  60.   /*  color_map {
  61.     [0.0 0.7 color Gray80 color Gray80]
  62.     [0.7 1.0 color Gray80 color Gray50]
  63.   }*/
  64.   
  65.   brilliance 1.5
  66.   specular 0.13
  67.   roughness 1.0
  68.   reflection 0.0
  69.   refraction 0.0
  70. }
  71.  
  72.  
  73. #declare varnished_pine =  texture {
  74.   color rgb 0.7 * <color Brown> //  Dark_Wood
  75.   ambient color rgb 0.2 * <color White>
  76.   diffuse color rgb 0.6 * <color White>
  77.   roughness 0.2
  78.   specular 0.5
  79. }
  80. /*
  81. #declare bound_balk_Y  = object {
  82.   intersection { Y_Disk }
  83.   bounded_by { box { <-1, 0, -1>, <1, 1, 1> } }
  84. }
  85. #declare bound_balk_X  = object {
  86.   intersection { X_Disk }
  87.   bounded_by { box { <0, -1 ,-1>, <1, 1, 1> } }
  88. }
  89. #declare bound_balk_Z  = object {
  90.   intersection { Z_Disk }
  91.   bounded_by { box { <-1, -1, 0>, <1, 1, 1> } }
  92. }
  93. #declare balk_Y  = object {
  94.   intersection { Y_Disk }
  95. }
  96. #declare balk_X  = object {
  97.   intersection { X_Disk }
  98. }
  99. #declare balk_Z  = object {
  100.   intersection { Z_Disk }
  101. }
  102. */
  103. #declare houtenvlot = composite {
  104.   cylinder {
  105.     <-40, -61, 0>, <-40, 101, 0>, 10
  106.   }
  107.   cylinder {
  108.     <-20, -60, 0>, <-20, 100, 0>, 10
  109.   }
  110.   cylinder {
  111.     <0, -63, 0>, <0, 100, 0>, 10
  112.   }
  113.   cylinder {
  114.     <20, -62, 0>, <20, 98, 0>, 10
  115.   }
  116.   cylinder {
  117.     <40, -58, 0>, <40, 100, 0>, 10
  118.   }
  119.   bounded_by { box { <-50, -70, -10 >, <50, 110, 10> } }
  120.   texture { varnished_pine }
  121. }
  122.  
  123. #declare zeil_en_tuig = composite {
  124.   cylinder {
  125.     <0,10, 0>, <0, 10, 180>, 3
  126.     /*    bound_balk_Z
  127.     scale <3, 3, 180>
  128.     translate <0, 10, 0>*/
  129.   }
  130.   cylinder  {
  131. //            bound_balk_X
  132.     <-50, 6, 170>, <50, 6, 170>, 1
  133. //            scale <100, 1, 1> translate <-50, 6, 170>
  134.   }
  135.   cylinder {
  136.     <-50, 6, 20>, <50, 6, 20>, 1
  137. //            bound_balk_X
  138. //            scale <100, 1, 1> translate <-50, 6, 20>
  139.   }
  140.   object {  // zeil
  141.     quadric { Cylinder_X scale <1, 182, 182> translate <0, 171, 95> }
  142.     bounded_by {
  143.       box { <-50, -30, 0>, <50, 5.5, 180> }
  144.     }
  145.     clipped_by { bounded_by }
  146.     texture { Zeil_Texture }
  147.   }
  148.   bounded_by { box { <-51, -15, 9>, <51, 15, 180> } }
  149.   texture { varnished_pine }
  150. }
  151.  
  152.  
  153. #declare Gold = colour red 0.8 green 0.498039 blue 0.196078
  154. #declare metallic_gold = texture {
  155.   color Gold
  156. //       metallic
  157.   ambient    0.2
  158.   diffuse    0.7
  159.   brilliance 6.0
  160.   reflection 0.25
  161.   refraction 0.0
  162.   specular   0.75
  163.   roughness  0.0125
  164. }
  165.  
  166. #declare schatkist = composite {
  167.   composite { 
  168.   object {
  169.     box { <-30, 0, 0>, <0, 40, 30> }
  170.   }
  171.     cylinder {
  172.       <-15, 0, 30>, <-15, 40, 30>, 15
  173.     }
  174.     texture { varnished_pine }
  175.   }
  176.   composite{
  177.     cylinder {
  178.       <-15, 10, 30>, <-15, 13, 30>, 15.21
  179.     }
  180.     cylinder { < -15, 27, 30>, <-15, 30, 30>, 15.21 }
  181.     object { // verticaal
  182.       box { <-30.21, 27, 0>, <0.21, 30, 30> }
  183.  
  184.     }
  185.     object { // verticaal
  186.       box { <-30.21, 10, 0 >, <0.21, 13, 30> }
  187.  
  188.     }
  189.     object { // horiz onder
  190.       box { <-30.21, -0.21, 3.5>, <0.21, 40.21, 6.5> }
  191.  
  192.     }
  193.     object { // horiz boven
  194.       box { <-30.21, -0.21, 23.5>, <0.21, 40.21, 26.5> }
  195.  
  196.     }
  197.     object { // slot
  198.       box { <0.2, 17.5, 22.5>, <0.22, 22.5, 27.5> }
  199.     }
  200.     texture { metallic_gold }
  201.   }
  202.   bounded_by { box { <-31, -1, -1>, <31, 42, 45> } }
  203.   rotate <0, 0, -15>
  204.   translate <-10, -50, 10>
  205. }
  206.  
  207. /*************************************************************************
  208.  * schipbreukeling                                    *
  209.  *************************************************************************/
  210.  
  211. #declare real_chrome = texture {
  212.   color LightGray
  213. //       metallic
  214.   ambient 0.3
  215.   diffuse 0.7
  216.   reflection color rgb 0.15 * <1,1,1>
  217.   brilliance 8.0
  218.   specular 0.8
  219.   roughness 0.1
  220.   refraction 0.0
  221. }
  222.  
  223.  
  224. #declare poppetje = composite {
  225.   /*
  226.    * ONDER DE GORDEL
  227.    */
  228.   texture { real_chrome }
  229.   composite {
  230.       cylinder { <-10,0,0>, <10,0,0>, 7.5 }
  231.       sphere { <-10, 0, 0>, 7.5 }
  232.       sphere { <10, 0, 0>, 7.5 }
  233.     }
  234.   
  235.   
  236. //     benen
  237.   composite {
  238.     composite {
  239.       object { // benen
  240.         cylinder { <-10, -40, 0>, <-10, 0, 0>, 3 }// scale <3, 40, 3> translate <-10, -40, 0>       
  241.       }
  242.       object {
  243.         cylinder { <10, -40, 0>, <10, 0, 0>, 3 }// scale <3, 40, 3> translate <-10, -40, 0>       
  244. //        balk_Y scale <3, 40, 3> translate <10, -40, 0>
  245.         
  246.       }
  247.       object { // knieen
  248.         sphere { <-10, -40, 0>, 5 }
  249.         
  250.       }
  251.       object {
  252.         sphere { <10, -40, 0>, 5 }     
  253.       }
  254.       bounded_by { box { <-15, -40, -6>, <15, 0, 6> } }
  255.     }
  256.     
  257.     composite { // onderbenen
  258.       composite { // links
  259.         object {
  260.           //balk_Z scale <3, 3, 40> translate <-10, -40, -40>         
  261.     cylinder { <-10, -40, -40>, <-10, -40, 0>, 3 }
  262.         }
  263.         object {
  264. //          balk_Z scale <3, 3, 40> translate <10, -40, -40>
  265.     cylinder { <10, -40, -40>, <10, -40, 0>, 3 }
  266.           
  267.         }
  268.         object { // voet
  269.           sphere { <10, -40, -40>, 6 }
  270.           clipped_by { plane { <0, 0, -1>, 40 } }
  271.           
  272.           rotate <2, 2, 0>
  273.         }
  274.         object { // voet
  275.           sphere { <-10, -40, -40>, 6 }
  276.           clipped_by { plane { <0, 0, -1>, 40 } }
  277.           rotate <-2, -2, 0>
  278.         }
  279.         bounded_by { box { <-16, -45, -50>, <16, -35, 0> } }
  280.       }
  281.       
  282. //             transform_pop //einde onderbenen
  283.       rotate <5, 0, 0>
  284.     }                        /* onderbenen */
  285. //        transform_pop //einde benen
  286.     rotate <5, 0, 0>
  287.   }
  288.   
  289.   /*
  290.    * BOVEN DE GORDEL
  291.    */
  292.   composite {  // ruggegraat
  293.     object {
  294. //      bound_balk_Z scale <3, 3, 50>
  295.       cylinder { <0>,50*z, 3 }     
  296.     }
  297.     
  298.     composite {
  299.       object { // schouders
  300.         union {
  301.           cylinder { <-12.5 ,0,0>, <12.5,0,0> ,5}
  302.           sphere { <-12.5, 0, 0>, 5 }
  303.           sphere { <12.5, 0, 0>, 5 }
  304.         }
  305.         
  306.       }
  307.       composite { // hoofd & nek
  308.         object {
  309.           cylinder { <0>, 15*z, 3}
  310.           
  311.         }
  312.         object {
  313.           sphere { <0, 0, 20>, 10 }
  314.           
  315.         }
  316.       }
  317.       bounded_by { box { <-12.5, -5, -5>, <12.5, 5, 30> } }
  318.       rotate <25, 0, 0>
  319.       translate <0, 0, 50>
  320.     }
  321.     
  322.     composite { // rechterarm
  323.       object {
  324. //        balk_Z scale <3, 3, 35> translate <-12.5, 0, 15>
  325.       cylinder { <-12.5, 0, 15>, <-12.5, 0, 50>, 3}      
  326.       }
  327.       object { // elleboog
  328.         sphere { <-12.5, 0, 15>, 5 }        
  329.       }
  330.       composite { // onderarm
  331.         object {
  332. //          balk_Z scale <3, 3, 35> translate <-12.5, 0, -20>
  333.         cylinder { <-12.5, 0, 15>, <-12.5, 0, 35>, 3}      
  334.           
  335.         }
  336.         composite { // rechterhand
  337.           object {
  338.             intersection {
  339.               sphere { <-12.5, 0, -20>, 6  }
  340. //                                          plane { <0, 0, 1> -20 texture { metallic_gold } }
  341.             }
  342.           }
  343.           translate <12.5, 0, 20>
  344.           rotate <0, 10, 0>
  345.           translate <-12.5, 0, -20>
  346.         }
  347.         
  348. //                einde rechter onderarm
  349.         
  350.         translate <12.5, 0, -15>
  351.         rotate <-90, 0, 15>
  352.         translate <-12.5, 0, 15>
  353.       }                        /* r.onderarm */
  354.       translate <12.5, 0, -50>
  355.       rotate <-30, 0, -20>
  356.       translate <-12.5, 0, 50>
  357.     }                        /* einde RECHTER arm */
  358.     
  359.     composite { // linkerarm
  360.       object {
  361. //        balk_Z
  362. //        scale <3, 3, 35> translate <12.5, 0, 15>
  363.       cylinder { <12.5,0,15> , <12.5, 0, 50> , 3}
  364.       }
  365. //             elleboog
  366.       object {
  367.         sphere { <12.5, 0, 15>, 5 }
  368.       }
  369.       
  370.       composite { // onderarm
  371.         cylinder {
  372.               //balk_Z
  373.           <12.5,0,-20>, <12.5,0,15>, 3
  374.  //        scale <3, 3, 35> translate <12.5, 0, -20>
  375.         }
  376.         
  377. //                rechterhand ??? volgens mij de linker, maar ja...
  378.         composite {
  379.           object {
  380.             intersection {
  381.               sphere { <12.5, 0, -20>, 6  }
  382.               plane { <0, 0, 1>, -20 texture { metallic_gold } }
  383.             }
  384.           }
  385.         }
  386.         
  387. //                 einde linkerhand/rechterhand (LeX, wat is dit nu weer?)
  388.         translate <-12.5, 0, -15>
  389.         rotate <-80, 0, -5>
  390.         translate <12.5, 0, 15>
  391.       }            /* einde onderarm */
  392.       translate <-12.5, 0, -50>
  393.       rotate <-30, 0, 20>
  394.       translate <12.5, 0, 50>
  395.     }    /* einde linker arm */
  396.     
  397. //        transform_pop // einde ruggegraat
  398.     rotate <30, 0, 0>
  399.   }
  400.   bounded_by { box { <-36, -60, -50>, <36, 40, 80> } }
  401.   rotate <0, 0, 10>
  402.   translate <23, -34, 15>
  403. } /* composite */
  404.  
  405. composite {
  406.   composite { poppetje }
  407.   composite { zeil_en_tuig }
  408.   composite { houtenvlot }
  409.   composite { schatkist }
  410.   rotate <0, 0, 30>
  411. }
  412.  
  413. object { waterplane }
  414.