home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovscn / 1 / alphafun.pov next >
Text File  |  1992-07-21  |  2KB  |  90 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2. // Fun with alpha (and other neat tricks).
  3.  
  4. #include "shapes.inc"
  5. #include "colors.inc"
  6.  
  7. camera {
  8.    location <0.0  2.0  -4.5>
  9.    direction <0.0 0.0  1.0>
  10.    up  <0.0  1.0  0.0>
  11.    right <1.33333 0.0 0.0>
  12.    look_at <0 0.4 0>
  13. }
  14.  
  15. // Floor, with phoney gray "planks"
  16. object {
  17.    plane { <0.0 1.0 0.0> 0.0 }
  18.    texture {
  19.       gradient <1 0 0>
  20.       color_map {
  21.          [0.0 0.25 color Gray color Gray]
  22.          [0.25 0.50 color DimGray color LightGray ]
  23.          [0.50 0.75 color LightGray color Gray]
  24.          [0.75 1.0 color Gray color Gray]
  25.       }
  26.       scale <0.45 1 1>
  27.       ambient 0.1
  28.       diffuse 0.7
  29.    }
  30. }
  31.  
  32.  
  33. //  Note: Clear = color White alpha 1
  34.  
  35. // A blobby sphere
  36. object {
  37.    sphere { <0.0  1.0  -1.5>  1.0 }
  38.    texture {
  39.       bozo
  40.       turbulence 0.5
  41.       octaves 1
  42.       scale <0.2 0.2 0.2>
  43.       color_map {
  44.          [0.0 0.5 color red 1 alpha 0.5 color red 1 alpha 1]
  45.          [0.5 1.0 color Clear color Clear ]
  46.       }
  47.       ambient 0.15
  48.       diffuse 0.7
  49.    }
  50. }
  51.  
  52. // A sliced green box
  53. object { box { UnitBox
  54.       scale <1 1 1>
  55.       rotate <0 45 0>
  56.       translate <-4 1 4>
  57.    }
  58.    texture {
  59.       gradient <0 1 0>
  60.       color_map {
  61.          [0.0 0.5 color Green color Green ]
  62.          [0.5 1.0 color Clear color Clear ]
  63.       }
  64.       scale <0.5 0.5 0.5>
  65.    }
  66. }
  67.  
  68. // A yellow, swirly finite cylinder
  69. object { intersection { Disk_Y
  70.       scale <1 1 1>
  71.       translate <4 1 4>
  72.    }
  73.    texture {
  74.       gradient <0 1 0 >
  75.       turbulence 2
  76.       octaves 1
  77.       color_map {
  78.          [0.0 0.5 color Yellow color Yellow ]
  79.          [0.5 1.0 color Clear color Clear ]
  80.       }
  81.       scale <0.5 0.5 0.5>
  82.    }
  83. }
  84.  
  85. object {
  86.    light_source { <10.0  12.0  -40.0>
  87.       colour White
  88.    }
  89. }
  90.