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

  1. // Persistence of Vision Raytracer
  2. // Cantelope segments.  Uses onion for the cantelope interior and skin.
  3. // Demonstrates intersection of spheres and planes, onion texture,
  4. // color maps.
  5. // Time: about 20 minutes @640x480+a0.2 on 486/33.
  6.  
  7. #include "colors.inc"           // Standard colors library
  8.  
  9. #declare Melon =    texture {
  10.    ambient 0.2
  11.    onion
  12.    color_map {
  13.       [0.0   0.95 color Orange       color Orange ]
  14.       [0.95  0.96 color Orange       color GreenYellow ]
  15.       [0.96  0.98 color GreenYellow  color Khaki  ]
  16.       [0.98  1.00 color NewTan       color DarkTan ]
  17.    }
  18. }
  19.  
  20. camera {
  21.    location <-2  3  -3>
  22.    direction <0.0 0.0  1.0>
  23.    up  <0.0  1.0  0.0>
  24.    right <1.33333 0.0 0.0>
  25.    look_at <0 0 0>
  26. }
  27.  
  28.  
  29. // Light source
  30. #declare Grayscale = 0.25
  31. #declare AmbientLight = color red Grayscale green Grayscale blue Grayscale
  32.  
  33. object { light_source { <-20 30 -100> color White  }}
  34.  
  35. object { light_source { <0 50 10> color AmbientLight }}
  36.  
  37.  
  38. // Flat-topped sphere/plane intersection
  39. #declare MelonHalf = object {
  40.    intersection {
  41.       sphere { <0 0 0> 1 }                // outer wall
  42.       sphere { <0 0 0> 0.65 inverse }      // inner wall
  43.       plane { <0 1 0> 0 }                 // top surface
  44.    }
  45.    texture { Melon }
  46.    bounded_by {
  47.       sphere { <0 0 0> 1.001 }
  48.    }
  49. }
  50.  
  51. // Quarter Wedge of above melon
  52. #declare MelonWedge = object {
  53.    intersection {
  54.       sphere { <0 0 0> 1 }                // outer wall
  55.       sphere { <0 0 0> 0.65 inverse }      // inner wall
  56.       plane { <0  1 0> 0 rotate < 45 0 0>}                 // top surface
  57.       plane { <0  1 0> 0 rotate <-45 0 0>}                 // top surface
  58.    }
  59.    texture { Melon }
  60.    bounded_by {
  61.       sphere { <0 0 0> 1.001 }
  62.    }
  63. }
  64.  
  65. object { MelonHalf }
  66. object { MelonWedge rotate <0 30 0> translate <2 0 2> }
  67.