home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 13 Bitmap / 13-Bitmap.zip / povscn.zip / scenes / level1 / cantelop.pov < prev    next >
Text File  |  1993-09-28  |  2KB  |  62 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.    finish { ambient 0.2 }
  11.    pigment {
  12.       onion
  13.       color_map {
  14.          [0.0   0.95 color Orange       color Orange ]
  15.          [0.95  0.96 color Orange       color GreenYellow ]
  16.          [0.96  0.98 color GreenYellow  color Khaki  ]
  17.          [0.98  1.00 color NewTan       color DarkTan ]
  18.       }
  19.    }
  20. }
  21.  
  22. camera {
  23.    location <-2, 3, -3>
  24.    direction <0.0, 0.0, 1.0>
  25.    up  <0.0, 1.0, 0.0>
  26.    right <4/3, 0.0, 0.0>
  27.    look_at <0, 0, 0>
  28. }
  29.  
  30.  
  31. // Light source
  32. #declare Grayscale = 0.25
  33. #declare AmbientLight = color red Grayscale green Grayscale blue Grayscale
  34.  
  35. light_source { <-20, 30, -100> color White }
  36.  
  37. light_source { <0, 50, 10> color AmbientLight }
  38.  
  39. // Flat-topped sphere/plane intersection
  40. #declare MelonHalf = intersection {
  41.    sphere { <0, 0, 0>, 1 }                // outer wall
  42.    sphere { <0, 0, 0>, 0.65 inverse }     // inner wall
  43.    plane { y, 0 }                         // top surface
  44.  
  45.    texture { Melon }
  46.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  47. }
  48.  
  49. // Quarter Wedge of above melon
  50. #declare MelonWedge = intersection {
  51.    sphere { <0, 0, 0>, 1 }                 // outer wall
  52.    sphere { <0, 0, 0>, 0.65 inverse }      // inner wall
  53.    plane { y, 0 rotate  45*x }             // top surface
  54.    plane { y, 0 rotate -45*x }             // top surface
  55.  
  56.    texture { Melon }
  57.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  58. }
  59.  
  60. object { MelonHalf }
  61. object { MelonWedge rotate 30*y translate <2, 0, 2> }
  62.