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

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By Dan Farmer
  4. //    Minneapolis, MN
  5. {
  6.       a pastoral scene with a granite stone fence.  This was never really
  7.       "finished", but it works as it is.  Plenty of material to play around
  8.       with here.  The basic building blocks are here... just use your
  9.       imagination.
  10. #include "shapes.dat"    
  11. #include "colors.dat"
  12. #include "textures.dat"
  13.  
  14. view_point
  15.     location <50.0  40.0  -350.0>
  16.     look_at <-100.0 0.0 0.0>
  17.     direction <0.0 0.0 2.0>
  18.     right < 1.3333 0.0 0.0 >
  19. end_view_point
  20.  
  21. { Add light source }
  22. object
  23.     sphere <0.0 0.0 0.0> 20.0 end_sphere
  24.     translate <100.0  200.0  -630.0>
  25.     texture
  26.       color White
  27.       ambient 1.0
  28.       diffuse 0.0
  29.     end_texture
  30.     light_source
  31.     color White
  32. end_object
  33.  
  34. object
  35.     sphere <0.0 0.0 0.0> 50.0 end_sphere
  36.     translate <50.0  20000.0 50.0>
  37.     texture
  38.       color White
  39.       ambient 1.0
  40.       diffuse 0.0
  41.     end_texture
  42.     light_source
  43.     color White
  44. end_object
  45.  
  46. { Add the sky to the picture }
  47. object
  48.     sphere <0.0 0.0 0.0> 1000000.0 end_sphere
  49.     texture
  50.         color SkyBlue
  51.     diffuse 0.0
  52.     ambient 0.5
  53.     end_texture
  54.     color SkyBlue
  55. end_object
  56.  
  57. { Grassy meadow }
  58. object
  59.     plane <0.0 1.0 0.0> -2.0 end_plane
  60.     texture
  61.         0.05  { This value dithers the colors }
  62.     color red 0.2 green 1.0 blue 0.4
  63.     waves 1.0
  64.     frequency 2000.0
  65.     scale <50000.0 50000.0 50000.0>
  66.     ambient 0.1
  67.     diffuse 0.3
  68.     end_texture
  69.     color red 0.2 green 1.0 blue 0.4
  70. end_object
  71.  
  72. { Put up a distant wall to prevent a black line in the middle of the
  73.    screen }
  74. object
  75.     plane <0.0 0.0 1.0> 1000000.0  end_plane
  76.     texture
  77.         color red 0.4 green 0.4 blue 0.8
  78.     ambient 1.0
  79.     diffuse 0.0
  80.     end_texture
  81.     color red 0.4 green 0.4 blue 0.8
  82. end_object
  83.  
  84.  
  85. #declare Wall_Segment = object
  86.     intersection Cube end_intersection
  87.     scale <8.0 50.0 100.0>
  88.     texture
  89.         0.05
  90.         granite
  91.     ambient 0.3
  92.     diffuse 0.7
  93.     brilliance 7.0
  94.     reflection 0.1
  95.     phong 1.0
  96.     phongsize 60
  97.     end_texture
  98.     color White
  99. end_object
  100.  
  101. #declare Granite_Ball = object
  102.     sphere <0.0 0.0 10.0> 10.0 end_sphere
  103.     texture
  104.         0.05
  105.         granite
  106.     ambient 0.3
  107.     diffuse 0.7
  108.     brilliance 7.0
  109.     reflection 0.1
  110.     phong 1.0
  111.     phongsize 60
  112.     end_texture
  113.     color White
  114. end_object
  115.  
  116. #declare Column = object
  117.     intersection Cube end_intersection
  118.     scale <12.0 60.0 12.0>
  119.     texture
  120.         0.05
  121.         granite
  122.     ambient 0.3
  123.     diffuse 0.7
  124.     brilliance 7.0
  125.     reflection 0.1
  126.     phong 1.0
  127.     phongsize 60
  128.     end_texture
  129.     color White
  130. end_object
  131.  
  132. { note: Granite column is 12 wide x 12 deep x 60 high
  133.         Granite ball has a radius of 20 }
  134. #declare Pillar = composite
  135.     object Column       translate <0.0  0.0 0.0> end_object
  136.     object Granite_Ball translate <0.0 70.0 0.0> end_object
  137. end_composite
  138.  
  139. { Note: Wall segments are 100 units long, Pillars are 12 units "long" }
  140. composite
  141.     Pillar
  142.     translate <0.0 0.0 -106.0 >
  143. end_composite
  144. object
  145.     Wall_Segment
  146.     translate <-2.0 0.0 -6.0 >
  147. end_object
  148. composite
  149.     Pillar
  150.     translate <0.0 0.0 0.0 >
  151. end_composite
  152. object
  153.     Wall_Segment
  154.     translate <-2.0 0.0 112.0 >
  155. end_object
  156. composite
  157.     Pillar
  158.     translate <0.0 0.0 112.0 >
  159. end_composite
  160. object
  161.     Wall_Segment
  162.     rotate <0.0 -90.0 0.0>
  163.     translate <76.0 0.0 114.0 >
  164. end_object
  165. composite
  166.     Pillar
  167.     translate <176.0 0.0 112.0 >
  168. end_composite
  169.