home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVSCN.ZIP / LEVEL3.ZIP / FISHBOWL.POV < prev    next >
Text File  |  1992-07-03  |  5KB  |  179 lines

  1. // Persistence Of Vision Raytracer version 1.0 sample file.
  2.  
  3. // By Anon ???
  4. // Revision notes:
  5. //   01/19/92 dmf
  6. //      -   Modified the wood texture on the picture frame.
  7. //          Note: Wood textures always look their best at 640x480 or above
  8. //          If you find that wood looks like random blocks of color instead
  9. //          of lines of grain, you're probably experiencing texture aliasing
  10. //          and need to increase the resolution and/or anti-aliasing threshold.
  11. //
  12. //          The fishbowl itself doesn't seem to work the way I would expect,
  13. //          but I don't want to make such extensive changes.
  14.  
  15. #include "colors.inc"
  16. #include "shapes.inc"
  17. #include "textures.inc"
  18.  
  19. // a light tan wood with greenish rings
  20. #declare New_Pine_Wood = texture {
  21.    wood
  22.    turbulence 0.025
  23.    colour_map {
  24.       [0.0 0.4  colour red 1.0 green 0.65875 blue 0.25
  25.       colour red 1.0 green 0.65875 blue 0.25]
  26.       [0.4 1.01 colour red 0.7 green 0.6 blue 0.266
  27.       colour red 0.4 green 0.3 blue 0.033]
  28.    }
  29. }/* end_texture */
  30.  
  31. #declare Y_Wood = texture { New_Pine_Wood
  32.    scale <0.15 0.15 1>
  33.    rotate <86 0 0>
  34.    ambient 0.15
  35.    diffuse 0.8
  36. }
  37. #declare X_Wood = texture { New_Pine_Wood
  38.    scale <0.2 0.2 1>
  39.    rotate <0 86 0>
  40.    ambient 0.15
  41.    diffuse 0.8
  42. }
  43.  
  44.  
  45. camera {
  46.    location <0.0 10.0 -90.0>
  47.    direction <0.0 0.0  1.0>
  48.    up  <0.0 1.0 0.0>
  49.    right <1.0 0.0 0.0>
  50. }
  51.  
  52. /*Top part of bowl*/
  53. object {
  54.    intersection {
  55.       sphere { <0.0 0.0 0.0> 20.0 }
  56.       sphere { <0.0 0.0 0.0> 19.99 inverse }
  57.       plane { <0.0 1.0 0.0> 15.0 rotate <10.0 0.0 0.0> }
  58.       plane { <0.0 1.0 0.0> 10.0 rotate <10.0 0.0 0.0> inverse }
  59.    }
  60.    translate <-8.0 0.0 0.0>
  61.    texture {
  62.       color LightGray alpha 0.7
  63.       ambient 0.3
  64.       diffuse 0.7
  65.       refraction 1.0
  66.       ior 1.5
  67.    }
  68. }
  69.  
  70. /*Bottom part of bowl*/
  71. object {
  72.    intersection {
  73.       sphere { <0.0 0.0 0.0> 20.0 }
  74.       sphere { <0.0 0.0 0.0> 19.99 inverse }
  75.       plane { <0.0 1.0 0.0> 10.0 rotate <10.0 0.0 0.0> }
  76.    }
  77.    translate <-8.0 0.0 0.0>
  78.    texture {
  79.       // Fishbowl.dat
  80.       color LightBlue alpha 0.9
  81.       //       ambient 0.1
  82.       //       diffuse 0.7
  83.       //       refraction 0.9
  84.       //       ior 1.33
  85.  
  86.       // Fishx.dat
  87.       ambient 0.3
  88.       diffuse 0.7
  89.       refraction 0.5
  90.  
  91.    }
  92. }
  93.  
  94. // Table Top or floor
  95. object {
  96.    plane { <0.0 1.0 0.0> -18.0 }
  97.    color Blue
  98.    texture {
  99.       checker colour DarkSlateGrey colour IndianRed
  100.       scale <10.0 10.0 10.0>
  101.       ambient 0.3
  102.       diffuse 0.7
  103.    }
  104. }
  105.  
  106. // Wall
  107. object {
  108.    plane { <0.0 0.0 1.0>   30.0  }/* end_plane ( facing wall ) )*/
  109.    color Cyan
  110.    texture {
  111.       colour red 0.329804 blue 0.204314 green 0.204314
  112.    }
  113. }
  114.  
  115. object {
  116.    light_source { <-100.0  100.0  -130.0>
  117.       colour White
  118.    }
  119. }
  120.  
  121.  
  122. // Picture
  123. composite {
  124.    object {
  125.       intersection {
  126.          plane { <1.0 0.0 0.0> 1.0 }
  127.          plane { <1.0 0.0 0.0> -1.0 inverse }
  128.          plane { <0.0 1.0 0.0> 1.0 }
  129.          plane { <0.0 1.0 0.0> -1.0 inverse }
  130.          plane { <0.0 0.0 1.0> 1.0 }
  131.          plane { <0.0 0.0 1.0> -1.0 inverse }
  132.       }
  133.       translate <1.0 1.0 1.0>
  134.       scale <20.0 15.0 1.0>
  135.       color Magenta
  136.       texture {
  137.          color White
  138.          ambient 0.05
  139.          diffuse 0.9
  140.          reflection 0.95
  141.       }
  142.    }
  143.  
  144.  
  145.    // The picture frame 
  146.    object {
  147.       union {
  148.  
  149.          intersection {
  150.             union {
  151.                quadric { Cylinder_Y scale <1.0 1.0 1.0> translate <41.0 0.0 0.0> texture { Y_Wood }}
  152.                quadric { Cylinder_Y scale <1.0 1.0 1.0> translate <-1.0 0.0 0.0> texture { Y_Wood }}
  153.             }
  154.             plane { <0.0 1.0 0.0> 31.0 }
  155.             plane { <0.0 1.0 0.0> -1.0 inverse }
  156.          }
  157.  
  158.          intersection {
  159.             union {
  160.                quadric { Cylinder_X scale <1.0 1.0 1.0> translate <0.0 31.0 0.0> texture { X_Wood }}
  161.                quadric { Cylinder_X scale <1.0 1.0 1.0> translate <0.0 -1.0 0.0> texture { X_Wood }}
  162.             }
  163.             plane { <1.0 0.0 0.0> 41.0 }
  164.             plane { <1.0 0.0 0.0> -1.0 inverse }
  165.          }
  166.  
  167.          sphere { <-1.0 -1.0 0.0> 1.0 texture { Y_Wood }}
  168.          sphere { <-1.0 31.0 0.0> 1.0 texture { X_Wood }}
  169.          sphere { <41.0 -1.0 0.0> 1.0 texture { Y_Wood }}
  170.          sphere { <41.0 31.0 0.0> 1.0 texture { X_Wood }}
  171.  
  172.       }
  173.       color Gray
  174.    }
  175.  
  176.    scale <1.5 1.5 1.5>
  177.    translate <20.0 20.0 29.0>
  178. }/* end_composite */
  179.