home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovscn / 1 / cliptst2.pov < prev    next >
Text File  |  1994-08-11  |  3KB  |  102 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2. // Demonstrates clipped_by
  3.  
  4. #include "colors.inc"           // Standard colors library
  5. #include "textures.inc"         // LOTS of neat textures.  Lots of NEW textures.
  6.  
  7. camera {
  8.    location <0.0  3  -4>
  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 0>
  13. }
  14.  
  15.  
  16. // Light source
  17. #declare Grayscale = 0.25
  18. #declare AmbientLight = color red Grayscale green Grayscale blue Grayscale
  19.  
  20. object { light_source { <-20 30 -100> color White  }}
  21.  
  22. object { light_source { <50 50 15> color AmbientLight }}
  23.  
  24.  
  25. // A hollow sphere using a clipping plane.  This sphere has no "thickness"
  26. // to its walls,  no matter what the scaling.
  27. object {
  28.    sphere { <0 0 0> 1 }
  29.    clipped_by {
  30.       plane { <0 1 0> 0.25 }
  31.    }
  32.  
  33.    texture {
  34.       Phong_Glossy
  35.       ambient 0.2
  36.       gradient <1 1 1>
  37.       // Notice the -1 to +1 color range.  This is just to demonstrate
  38.       // that this is a valid form for a color map.  It's not really
  39.       // neccessary in this case to do it this way, but thought I'd
  40.       // use it for instructional value.
  41.       color_map {
  42.          [ -1.0  0.0 color Yellow color Cyan ]
  43.          [  0.0  1.0 color Cyan color Magenta]
  44.       }
  45.       scale <0.1  0.1  0.1>
  46.    }
  47.    bounded_by {
  48.       sphere { <0 0 0> 1.001 }
  49.    }
  50.    translate <-2 1 0>
  51. }
  52.  
  53. // Hollow sphere done with intersection.
  54. object {
  55.    intersection {
  56.       sphere { <0 0 0> 1 }               // outer wall
  57.       sphere { <0 0 0> 0.85 inverse }     // inner wall
  58.       plane { <0 1 0> 0.25 }              // top surface
  59.    }
  60.    texture {
  61.       Phong_Glossy
  62.       ambient 0.2
  63.       leopard
  64.       color_map {
  65.          [0.0   0.10 color Yellow color Red ]
  66.          [0.10  0.98 color Red color Blue ]
  67.          [0.98  1.00 color Magenta color Yellow  ]
  68.       }
  69.       //        scale <0.05  1.0  0.05>
  70.       scale <0.025  1.0  0.025>
  71.    }
  72.    bounded_by {
  73.       sphere { <0 0 0> 1.001 }
  74.    }
  75.    translate <2 1 0>
  76. }
  77.  
  78. // Flat-topped sphere/plane intersection
  79. object {
  80.    intersection {
  81.       sphere { <0 0 0> 1 }               // outer wall
  82.       plane { <0 1 0> 0.25 }             // top surface
  83.    }
  84.    texture {
  85.       Phong_Glossy
  86.       ambient 0.2
  87.       onion
  88.       turbulence 10                      // try with 0 turb, too!
  89.       octaves 2
  90.       color_map {
  91.          [0.0   0.30 color Yellow color Orange ]
  92.          [0.30  0.90 color Orange color Magenta ]
  93.          [0.90  1.00 color Blue color Green    ]
  94.       }
  95.    }
  96.    bounded_by {
  97.       sphere { <0 0 0> 1.001 }
  98.    }
  99.    translate <0 1 -1>
  100. }
  101.  
  102.