home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / PVDAT.ZIP / ARCHES.DAT < prev    next >
Encoding:
Text File  |  1991-09-07  |  3.6 KB  |  151 lines

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By Dan Farmer
  4. //    Minneapolis, MN
  5.  
  6. // Parabolic arches on the water.  Is this the St. Louis McDonalds? 
  7.  
  8.  
  9. #include "colors.dat"
  10. #include "shapes.dat"
  11. #include "textures.dat"    
  12.  
  13. view_point
  14.    location <60.0  0.0  -135.0>
  15.    direction <0.0 0.0  2.0>
  16.    up  <0.0  1.0  0.0>
  17.    right <1.33333 0.0 0.0>
  18.    look_at <0.0 0.0 0.0>
  19. end_view_point
  20.  
  21. // Light 
  22. object  
  23.    sphere <0.0  0.0  0.0>  2.0 end_sphere
  24.    translate <200.0  200.0  -150.0>
  25.    texture
  26.       colour Orange // Note the color of light
  27.       ambient 1.0
  28.       diffuse 0.0
  29.    end_texture
  30.    light_source
  31.    colour Orange
  32. end_object
  33.  
  34. // Now draw the sky (From sunset.dat 
  35. object
  36.    sphere <0.0  0.0  0.0> 300.0 end_sphere
  37.    texture
  38.       0.05 // Add random dithering
  39.       gradient <0.0  1.0  0.0>
  40.       colour_map [0.0 0.8  colour red 0.5 green 0.1 blue 0.7
  41.                            colour red 0.1 green 0.1 blue 0.9]
  42.                  [0.8 1.0 colour red 0.1 green 0.1 blue 0.9
  43.                           colour red 0.1 green 0.1 blue 0.9]
  44.       end_colour_map
  45.       scale <300.0  300.0  300.0>
  46.       ambient 0.7
  47.       diffuse 0.0   { we don't want clouds casting shadows on the sky }
  48.    end_texture
  49.    colour red 0.7  green 0.7 blue 1.0
  50. end_object
  51.  
  52. // Put in a few clouds 
  53.  
  54. object
  55.    sphere <0.0  0.0  0.0> 259.0 end_sphere
  56.  
  57.    texture
  58.       bozo
  59.       turbulence 0.7
  60.       colour_map
  61.           [0.0 0.6  colour red 1.0 green 1.0 blue 1.0 alpha 1.0
  62.                     colour red 1.0 green 1.0 blue 1.0 alpha 1.0]
  63.           [0.6 0.8 colour red 1.0 green 1.0 blue 1.0 alpha 1.0
  64.                     colour red 1.0 green 1.0 blue 1.0]
  65.           [0.8 1.001 colour red 1.0 green 1.0 blue 1.0
  66.                      colour red 0.8 green 0.8 blue 0.8]
  67.       end_colour_map
  68.       scale <100.0  20.0  100.0>
  69.       ambient 0.7
  70.       diffuse 0.0
  71.    end_texture
  72.    colour red 0.7  green 0.7  blue 1.0
  73. end_object
  74.  
  75.  
  76.  
  77. // Define the ocean surface 
  78. object
  79.    plane <0.0  1.0  0.0> -10.0 end_plane
  80.  
  81.    texture
  82.       colour CBlue
  83.       waves 0.05
  84.       reflection 0.8
  85.       frequency 5000.0
  86.       scale <3000.0 3000.0 3000.0>
  87.    end_texture
  88.    colour CBlue
  89. end_object
  90.  
  91. { Put a floor underneath to catch any errant waves from the ripples }
  92. object
  93.    plane <0.0  1.0  0.0> -11.0 end_plane
  94.    texture
  95.       0.05
  96.       colour CBlue
  97.       ambient 1.0
  98.       diffuse 0.0
  99.    end_texture
  100.    colour CBlue
  101. end_object
  102.  
  103.  
  104. composite
  105.   object
  106.     difference
  107.         quadric Paraboloid_Y            { Declared in shapes.dat }
  108.             scale <20.0 20.0 5.0>
  109.             rotate <180.0 0.0 0.0>
  110.             translate <0.0 0.0 0.0>
  111.         end_quadric
  112.         quadric Paraboloid_Y
  113.             scale <15.0 20.0 15.0>
  114.             rotate <180.0 0.0 0.0>
  115.             translate <0.0 -2.0 0.0>
  116.         end_quadric
  117.     end_difference
  118.     texture
  119.         Metal                // Declared in textures.dat 
  120.           0.05        // Add random dithering
  121.         color White    // Declared in colors.dat 
  122.     end_texture
  123.     color White
  124.   end_object
  125. translate <0.0 30.0 -25.0>
  126. end_composite
  127.  
  128. composite
  129.   object
  130.     difference
  131.         quadric Paraboloid_Y
  132.             scale <20.0 20.0 5.0>
  133.             rotate <180.0 0.0 0.0>
  134.             translate <0.0 0.0 0.0>
  135.         end_quadric
  136.         quadric Paraboloid_Y
  137.             scale <15.0 20.0 15.0>
  138.             rotate <180.0 0.0 0.0>
  139.             translate <0.0 -2.0 0.0>
  140.         end_quadric
  141.     end_difference
  142.     texture
  143.         Metal
  144.           0.05 // Add random dithering
  145.           color White
  146.     end_texture
  147.     color White
  148.   end_object
  149. translate <0.0 30.0 50.0>
  150. end_composite
  151.