home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / CSG / CLIPTST2.POV next >
Text File  |  1999-10-30  |  3KB  |  99 lines

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