home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / hftutr / hftutor1.pov < prev   
Text File  |  1993-04-15  |  2KB  |  52 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2. // Basic heightfield tutorial
  3. // Requires HFTUTOR.GIF.
  4. // HF Image is a circular gradient with values ranging from 0 to 255
  5. #include "colors.inc"
  6. #include "textures.inc"
  7. #include "shapes.inc"
  8.  
  9. // This camera view will show the heightfield from halfway up the side.
  10. // It's a very boring view, but best demonstrates the positioning of
  11. // the object.
  12. camera {
  13.    location <0  0.5  -2.25>
  14.    direction <0.0 0.0  1.0>
  15.    up  <0.0  1.0  0.0>
  16.    right <1.33333 0.0 0.0>
  17.    look_at <0 0 0>
  18. }
  19.  
  20. // Light source
  21. object { light_source {  <2 12  -10> color White  } }
  22.  
  23. // Sky, ambient set to 1, diffuse 0 to eliminate shadows
  24. object { sphere { <0 0 0> 10000  texture { color Blue  ambient 1 diffuse 0 }}}
  25.  
  26. // Axis grid, each checker is 1 unit measure
  27. object {
  28.     union {
  29.         intersection { Disk_X scale <2.0  0.05  0.001> }
  30.         intersection { Disk_Y scale <0.05  2.0  0.001> }
  31.  
  32.         intersection { Disk_X scale <2.0  0.05  0.001> translate <0 1 0> }
  33.         intersection { Disk_Y scale <0.05  2.0  0.001> translate <1 0 0> }
  34.     }
  35.     texture { Shiny checker color Red color Yellow }
  36. }
  37.  
  38. // The heightfield.
  39. // Image resolution is irrelevant to heightfield scale!
  40. object {
  41.     height_field {                         // 1x1x1, lower left front at 0,0,0
  42.         gif "HFTUTOR.GIF"
  43.     }
  44.  
  45. // For step #2, uncomment the line below and re-render
  46. //    translate <-0.5 0 -0.5>              // Center the heightfield
  47.  
  48. //  scale <1 0.1 1>                        // Adjust height as desired
  49.  
  50.     texture { Shiny  color White }
  51. }
  52.