home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / pov / bathroom / bathroom.pov next >
Encoding:
Text File  |  1980-03-09  |  10.9 KB  |  674 lines

  1. // Bathroom by Marc Gumpinger 1993 [100114,2165]
  2.  
  3. #declare Clear = color red 1 green 1 blue 1 alpha 1
  4. #declare White = color red 1 green 1 blue 1
  5. #declare Black = color
  6.  
  7. #include "shapes.inc"
  8. #include "shapesq.inc"
  9.  
  10.  
  11. /****************************************
  12.           D E C L A R A T I O N S
  13. ****************************************/
  14.  
  15.  
  16. // -------------- TEXTURES --------------
  17.  
  18. #declare Wall_Texture =
  19. texture
  20. {
  21.     agate
  22.     turbulence 1000
  23.     color_map
  24.     {
  25.         [0 0.75 color red 0.9 green 0.9 blue 0.9 color red 0.85 green 0.85 blue 0.8]
  26.         [0.75 0.95 color red 0.85 green 0.85 blue 0.8 color red 0.725 green 0.725 blue 0.725]
  27.         [0.95 1 color red 0.725 green 0.725 blue 0.725 color red 0.3 green 0.3 blue 0.2]
  28.     }
  29.     roughness 3
  30.     scale <0.5 0.5 0.5>
  31.     ambient 0.2
  32.     diffuse 1
  33. }
  34. texture
  35. {
  36.     spotted
  37.     turbulence 0.3
  38.     color_map
  39.     {
  40.         [0 0.8 color Clear color Clear]
  41.         [0.8 0.8 color red 0.7 green 0.7 blue 0.7 color red 0.4 green 0.4 blue 0.4 alpha 0.5]
  42.         [0.8 1 color red 0.4 green 0.4 blue 0.4 alpha 0.5 color red 0.35 green 0.35 blue 0.35]
  43.     }
  44.     dents 0.1
  45.     ripples 0.1
  46.     scale <0.01 0.01 0.01>
  47.     ambient 0.2
  48.     diffuse 1
  49. }
  50. texture
  51. {
  52.     agate
  53.     turbulence 1
  54.     color_map
  55.     {
  56.         [0 0.75 color Clear color Clear]
  57.         [0.75 1 color red 0.1 green 0.1 blue 0.1 alpha 0.3 color red 0.1 green 0.1 blue 0.1 alpha 0.4]
  58.     }
  59.     scale <1.5 1.5 1.5>
  60.     dents 0.1
  61.     bumps 0.1
  62.     ambient 0.2
  63.     diffuse 1
  64. }
  65. texture
  66. {
  67.     marble
  68.     turbulence 1000
  69.     color_map
  70.     {
  71.         [0 0.7 color Clear color Clear]
  72.         [0.7 1 color red 0.5 green 0.5 blue 0.5 alpha 0.9 color red 0.5 green 0.5 blue 0.5 alpha 1]
  73.     }
  74.     dents 0.1
  75.     bumps 0.1
  76.     scale <20 20 20>
  77.     ambient 0.2
  78.     diffuse 1
  79.     reflection 0.15
  80. }
  81. texture
  82. {
  83.     marble
  84.     turbulence 0.95
  85.     color_map
  86.     {
  87.         [0 0.995 color Clear color Clear]
  88.         [0.995 1 color Black alpha 0.1 color Black alpha 0.1]
  89.     }
  90.     scale <18 8 10> 
  91.     translate <-3 0 0> 
  92.     ambient 0
  93.     diffuse 0.5
  94. }
  95.  
  96. #declare Blob_Texture = 
  97. texture
  98. {
  99.     turbulence 2
  100.     color color red 0.9 green 0.9 blue 1 alpha 0.875
  101.     waves 1
  102.     scale <0.15 0.15 0.15>
  103.     ambient 0.25
  104.     diffuse 1
  105.     refraction 1
  106.     ior 1.33
  107. }
  108. texture
  109. {
  110.     turbulence 0.25 
  111.     gradient <0 1 0>
  112.     color_map
  113.     {
  114.         [0 0.3 color Clear color Clear] 
  115.         [0.3 0.45 color Clear color red 0.1 green 0.1 blue 0.75 alpha 0.8] 
  116.         [0.45 1 color red 0.1 green 0.1 blue 0.75 alpha 0.9 color red 0.05 green 0.05 blue 0.45 alpha 0.9]
  117.     }
  118.     ambient 0.2 
  119.     diffuse 1 
  120.     refraction 1
  121.     ior 1.33
  122.     scale <0.25 1.3 1> 
  123.     translate <0 -0.225 0>
  124.     waves 1
  125. }
  126. texture
  127. {
  128.     turbulence 1.5
  129.     bozo
  130.     color_map
  131.     {
  132.         [0 0.8 color Clear color Clear]
  133.         [0.8 1 color green 0.4 alpha 0.3 color green 0.15 alpha 0.1]  
  134.     }
  135.     ambient 0.2 
  136.     diffuse 1 
  137.     refraction 1
  138.     ior 1.33
  139.     waves 1
  140.     scale <0.4 0.4 0.4> 
  141.     translate <-0.35 0.6 0>
  142. }
  143.  
  144. #declare TapTexture =
  145. texture
  146. {
  147.     metallic
  148.     color red 0.95 green 0.95 blue 0.95
  149.     reflection 0.95
  150.     ambient 0.05   
  151.     diffuse 0.2 
  152.     brilliance 8.0
  153.  specular 0.8
  154.  roughness 0.0005
  155. }
  156.  
  157. #declare basinTextureOut =
  158. texture
  159. {
  160.     
  161.     color White
  162.     bumps 0.05
  163.     ambient 0.05
  164.     diffuse 1
  165.     specular 0.45
  166.     roughness 0.4
  167.     reflection 0.175
  168.     brilliance 3
  169.     phong 0.75
  170.  phong_size 100
  171. }
  172.  
  173. #declare basinTextureIn =
  174. texture
  175. {
  176.     
  177.     color White
  178.     bumps 0.05
  179.     ambient 0.05
  180.     diffuse 0.75
  181.     specular 0.25
  182.     roughness 0.2
  183.     reflection 0.175
  184.     brilliance 3
  185.     phong 0.75
  186.  phong_size 80
  187. }
  188.  
  189.  
  190. // -------------- OBJECTS --------------
  191.  
  192. declare Torus =
  193. quartic
  194. {
  195.     < 1 0 0 0 2 0 0 2 0 -52.84
  196.    0 0 0 0 0 0 0 0 0 0
  197.    1 0 0 2 0 49.595 0 0 0 0
  198.    1 0 -52.84 0 614.9160063 >
  199. }
  200.  
  201. declare Torus2 =
  202. quartic
  203. {
  204.     < 1 0 0 0 2 0 0 2 0 -51 
  205.    0 0 0 0 0 0 0 0 0 0
  206.    1 0 0 2 0 50 0 0 0 0
  207.    1 0 -51 0 615 >
  208. }
  209.  
  210. #declare tap =
  211. composite
  212. {                                                                                                                                                                                                        
  213.     object
  214.     {
  215.         union
  216.         {
  217.             difference
  218.             {
  219.                 difference
  220.                 {
  221.                     sphere { <0 0 11> 6.5 }
  222.                     sphere { <0 0 10.25> 6 }
  223.                 }
  224.                 quadric { Cylinder_Z scale <3 3 3> inverse }
  225.                 quadric { Cylinder_Z scale <4 4 4> translate <4.8 3.2 0> }
  226.                 quadric { Cylinder_Z scale <4 4 4> translate <-4.8 3.2 0> }
  227.                 quadric { Cylinder_Z scale <4 4 4> translate <0 -5 0> }
  228.             }
  229.             translate <0 0 -17>
  230.             rotate <0 -75 0>
  231.             scale <0.5 0.5 0.5>
  232.         }
  233.         translate <-1 0 0>
  234.         scale <1.25 1.25 1.25>
  235.         texture
  236.         {
  237.             TapTexture
  238.         }
  239.     }
  240.     object
  241.     {
  242.         difference
  243.         {
  244.             quadric { QCone_X scale <0.5 0.09 0.09> translate <-1.6 0 0> }
  245.             plane { <1 0 0> 0 }
  246.             plane { <1 0 0> 2 inverse }
  247.         }
  248.         translate <-1 0 0>
  249.         texture
  250.         {
  251.             TapTexture
  252.         }
  253.     }
  254.     object
  255.     {
  256.         difference
  257.         {
  258.             quartic { Torus_40_12 scale <0.05 0.025 0.05> rotate <90 0 90> }
  259.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <0.6 0 0> }
  260.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <-0.6 0 0> }
  261.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <0 0.6 0> }
  262.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <0 -0.6 0> }
  263.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <0.45 0.45 0> }
  264.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <-0.45 0.45 0> }
  265.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <-0.45 -0.45 0> }
  266.             quadric { Cylinder_Z scale <0.2 0.2 0.2> translate <0.45 -0.45 0> }
  267.         }
  268.         rotate <0 90 0>
  269.         translate <0.5 0 0>
  270.         scale <2 2 2>
  271.         texture
  272.         {
  273.             TapTexture
  274.         }
  275.     }
  276.     object
  277.     {
  278.         difference
  279.         {
  280.             blob
  281.             {
  282.                 threshold 0.5
  283.                 component 1.25 0.75 <0 2 0>
  284.                 component 2 1 <0 1 0>
  285.                 component 1 0.75 <0 0.25 0>
  286.                 component 1 0.5 <-0.7 1 0>
  287.                 sturm
  288.             }
  289.             quadric { Ellipsoid scale <2 1.9 2> inverse }
  290.             plane { <1 0 0> -1.15 }
  291.             }
  292.         scale <2 4 2>
  293.         translate <3 -4 0>
  294.         texture
  295.         {
  296.             TapTexture
  297.         }
  298.     }
  299.     object
  300.     {
  301.         difference
  302.         {
  303.             quadric { Cylinder_Y translate <3.3 2 0> scale <0.9 0.9 0.9> }
  304.             plane { <0 1 0> 0 }
  305.             plane { <0 1 0> 6 inverse }
  306.         }
  307.         texture
  308.         {
  309.             TapTexture
  310.         }
  311.     } 
  312.     object
  313.     {
  314.         difference
  315.         {
  316.             quartic { Lemniscate scale <1.5 4 4> rotate <0 0 90> sturm }
  317.             plane { <0 1 0> 0 inverse }
  318.         }
  319.         translate <3 -3.5 0>
  320.         texture
  321.         {
  322.             TapTexture
  323.         }
  324.     }
  325.     object
  326.     {
  327.         difference
  328.         {
  329.             quartic { Torus scale <1 1 1> rotate <90 0 0> }
  330.             plane {<0 1 0> 0 } 
  331.         }
  332.         rotate <0 -135 0>
  333.         translate <6.545 6 -3.575> 
  334.         texture
  335.         {
  336.             TapTexture
  337.         }
  338.     }
  339.     object
  340.     {
  341.         quartic { Torus2 scale <0.175 0.175 0.175> translate <10.125 6 -7.1> }
  342.         texture
  343.         {
  344.             TapTexture
  345.         }
  346.     }
  347. }
  348.  
  349. #declare basin =
  350. object
  351. {
  352.     difference
  353.     {
  354.         union
  355.         {
  356.             difference
  357.             {
  358.                 difference
  359.                 {
  360.                     quartic 
  361.                     { 
  362.                         Piriform 
  363.                         scale <1 1.75 1> 
  364.                         rotate <0 0 90> 
  365.                         translate <0 -1 0>    
  366.                         sturm 
  367.                         texture 
  368.                         { 
  369.                             basinTextureOut 
  370.                         } 
  371.                     } 
  372.                     difference
  373.                     {    
  374.                         quartic { Witch_Hat scale <2.2 0.55 1.45> translate <0 0 -0.05> inverse sturm }
  375.                         plane { <0 1 0> -0.75 }
  376.                     }
  377.                     scale < 1 1 1.5 >
  378.                 }    
  379.                 plane { <0 0 1> 0.25 inverse }
  380.             }
  381.             box { UnitBox scale <1.15 0.2 0.2> translate <0 -0.3 0.5> texture { basinTextureOut } }
  382.         }
  383.         quadric { Cylinder_X scale <0.075 0.1 0.1> translate <0 -0.1 0.35> }
  384.     }
  385.     texture
  386.     {
  387.         basinTextureIn
  388.     }
  389. }
  390.  
  391. #declare Eye = 
  392. composite
  393. {
  394.     object
  395.     {
  396.         quadric 
  397.         { 
  398.             Ellipsoid scale <0.3 0.3 0.3> translate <0 0.7 -0.5>
  399.             texture
  400.             {
  401.                 marble
  402.                 turbulence 1
  403.                 reflection 0.35
  404.                 specular 0.5
  405.                 brilliance 0.5
  406.                 ambient 0.15
  407.                 diffuse 1
  408.                 bumps 0.1
  409.                 color_map
  410.                 {
  411.                     [0 0.9 color red 1 green 1 blue 1 color red 1 green 1 blue 1]
  412.                     [0.9 1.01 color red 1 color red 0.5]
  413.                 }
  414.                 scale <0.2 0.2 0.2>
  415.                 rotate <0 5 0>
  416.             }
  417.         }
  418.     }
  419.     object
  420.     {
  421.         quadric { Ellipsoid scale <0.29 0.29 0.29> translate <0 0.7 -0.51075>}
  422.         texture
  423.         {
  424.             marble
  425.             turbulence 1
  426.             ambient 0.1
  427.             diffuse 0.8
  428.             phong 1
  429.             phong_size 50
  430.             specular 1
  431.             reflection 0.5
  432.             color_map
  433.             {
  434.                 [0 0.9 color blue 0.4 color blue 0.3]
  435.                 [0.9 1.01 color red 0 green 0 blue 0 color red 0 green 0 blue 0]
  436.             }
  437.             bumps 0.1
  438.             scale <0.02 0.02 0.02>
  439.         }
  440.     }
  441.     object
  442.     {
  443.         quadric { Ellipsoid scale <0.28 0.28 0.28> translate <0 0.7 -0.5209>}
  444.         texture
  445.         {
  446.             ambient 0.1
  447.             diffuse 0.8
  448.             phong 1
  449.             phong_size 50
  450.             specular 1
  451.             reflection 0.8
  452.             bumps 0.1
  453.             scale <0.2 0.2 0.2>
  454.             color red 0 green 0 blue 0
  455.         }
  456.     }
  457.     scale <2 2 2> 
  458.     translate <0 -1.5 0>
  459. }
  460.  
  461. #declare Monster =
  462. composite
  463. {
  464.     composite
  465.     {
  466.         #include "Blob.inc"
  467.     }
  468.     composite
  469.     {
  470.         Eye // left
  471.         scale <0.175 0.175 0.175>
  472.         translate <-0.1 1 -0.1>
  473.         rotate <-10 0 0>
  474.     }
  475.     composite
  476.     {
  477.         Eye // right
  478.         scale <0.175 0.175 0.175>
  479.         translate <0.25 0.775 0.05> //0.25 0.775 0.075
  480.         rotate <-8 -10 0>
  481.     }
  482. }
  483.  
  484. #declare Soap_Dispenser =
  485. composite
  486. {
  487.     object
  488.     {
  489.         union    
  490.         {
  491.             difference
  492.             {
  493.                 quadric 
  494.                 { 
  495.                     Cylinder_Y scale <1.5 1.5 1.5>
  496.                     texture 
  497.                     {
  498.                         color White
  499.                         metallic
  500.                         roughness 0.0001
  501.                         specular 0.6
  502.                         phong 1
  503.                         phong_size 100
  504.                         ambient 0
  505.                         diffuse 1
  506.                         reflection 0.1
  507.                         brilliance 1.5
  508.                     }
  509.                     texture
  510.                     {
  511.                         image_map
  512.                         {
  513.                             2 gif "Label.gif" once alpha 0 1 interpolate 4 
  514.                         }
  515.                         scale <0.5 3 0.5>
  516.                         rotate <0 -120 0>
  517.                         translate <0 -1.25 0>
  518.                     }
  519.                 }
  520.                 plane { <0 1 0> -1.5 }
  521.                 plane { <0 1 0> 2 inverse }
  522.             }
  523.             difference
  524.             {
  525.                 quadric { Ellipsoid scale <1.5 0.5 1.5> translate <0 2 0> }
  526.                 plane { <0 1 0> 2 }
  527.             }
  528.             difference
  529.             {
  530.                 quadric { Cylinder_Y scale <0.6 1 0.6> }
  531.                 plane { <0 1 0> 1 }
  532.                 plane { <0 1 0> 3 inverse }
  533.             }
  534.             difference
  535.             {
  536.                 quadric { Cylinder_Y scale <0.4 1 0.4> }
  537.                 plane { <0 1 0> 1 }
  538.                 plane { <0 1 0> 3.3 inverse }
  539.             }
  540.             difference
  541.             {
  542.                 quadric { Cylinder_Y scale <0.325 1 0.325> }
  543.                 plane { <0 1 0> 1 }
  544.                 plane { <0 1 0> 3.8 inverse }
  545.             }
  546.         }
  547.         texture
  548.         {
  549.             color White
  550.             roughness 0.3
  551.             specular 0.6
  552.             phong 1
  553.             phong_size 100
  554.             ambient 0
  555.             diffuse 0.8
  556.             reflection 0.1
  557.             brilliance 1.5
  558.         }
  559.     }
  560.     object
  561.     {
  562.         difference
  563.         {
  564.             union
  565.             {
  566.                 difference
  567.                 {
  568.                     quadric { QCone_X scale <4 1 1> translate <0 3.5 0>}
  569.                     plane { <1 0 0> -0.2â•©inverse }
  570.                     plane { <1 0 0> -1.25 }
  571.                 }
  572.                 quadric { Ellipsoid scale <0.3 0.3 0.3> translate <-1.25 3.5 0> }
  573.             }
  574.             plane { <0 1 0> 3.4 }
  575.             plane { <0 1 0> 3.6 inverse }
  576.             quadric { Ellipsoid scale <0.25 0.1 0.25> translate <-1.25 3.625 0> }
  577.             quadric { Cylinder_Z scale <0.5 0.1 1> translate <-0.75 3.365 0> }
  578.         }
  579.         texture
  580.         {
  581.             color White
  582.             roughness 0.3
  583.             specular 0.6
  584.             phong 1
  585.             phong_size 100
  586.             ambient 0
  587.             diffuse 0.8
  588.             reflection 0.1
  589.             brilliance 1.5
  590.         } 
  591.         scale <1.5 1.5 1.5>
  592.         translate <1.85 -1.375 0.15>
  593.     }
  594.     rotate <0 15 0>
  595.     scale <0.25 0.25 0.25>
  596. }
  597.  
  598.  
  599.  
  600. /****************************************
  601.                 S C E N E
  602. ****************************************/
  603.  
  604.  
  605. camera
  606. {
  607.     location <-8 5.1 -28> 
  608.     right <1.499267936 0 0> // the 35mm slide ratio
  609.     up <0 1 0>
  610.     direction <0 0 5>
  611.     look_at <-0.2 1.1 0> 
  612. }
  613.  
  614. object
  615. {
  616.     light_source 
  617.     {
  618.      <0 5 -20> //0 20 -20
  619.   color red 0.9 green 0.9 blue 0.9
  620.   spotlight
  621.   point_at <0 1 1>
  622.   tightness 0.01
  623.   radius 6 
  624.   falloff 11 
  625.     }
  626. }
  627.  
  628. composite
  629. {
  630.     Soap_Dispenser
  631.     translate <1.775 0 1.5> 
  632. }
  633.  
  634. composite
  635. {
  636.     tap
  637.     scale <0.125 0.125 0.125>
  638.     translate <-1.5 0.35 1.5> 
  639. }
  640.  
  641. object
  642. {
  643.     basin
  644.     scale <2.25 2.5 2.5>
  645. }
  646.  
  647. composite
  648. {
  649.     Monster
  650.     scale <2 2 2>
  651.     translate <0.25 1.5 0.1> 
  652.     rotate <0 20 0>
  653. }
  654.  
  655. object
  656. {
  657.     box { UnitBox scale <35 20 35> translate <-31.5 0 -33> }
  658.     texture
  659.     {
  660.         Wall_Texture
  661.     }
  662. }
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.