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

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By Drew Wells
  4.  
  5. // Room.dat - Empty room created for CIS Comart Raytracing Group Project 
  6.  
  7. #include "shapes.dat"
  8. #include "colors.dat"
  9. #include "textures.dat"
  10.  
  11. { Camera Facing North}
  12. view_point
  13.    direction <0.0 0.0  1.5>
  14.    up  <0.0  1.0  0.0>
  15.    right <1.333333 0.0 0.0>
  16.    translate < 10.0  5.0  -30.0>
  17.    look_at <0.0 5.0 0.0>
  18. end_view_point
  19.  
  20. {***********************************************}
  21. { Define objects for use in scene               }
  22. { Your object should be DECLAREd here           }
  23. {***********************************************}
  24.  
  25. #declare North_Wall = object 
  26.    plane <0.0 0.0 1.0> 10.0 end_plane
  27.    texture 
  28.      granite
  29.      scale <1.0 20.0 1.0>
  30.    end_texture
  31.    color Yellow
  32.  end_object
  33. { South Wall commented out so camera can see in}
  34. #declare South_Wall = object
  35.    plane <0.0 0.0 1.0> -10.0 end_plane
  36.    texture 
  37.      Cherry_Wood
  38.      0.05
  39.      scale <10.0 10.0 10.0>
  40.    end_texture
  41.    color CRed
  42.  end_object
  43.  
  44. { Not visible with current viewpoint}
  45. { But could be useful for light coming through window etc. }
  46. #declare East_Wall = object
  47.    plane <1.0 0.0 0.0> 15.0 end_plane
  48.    texture
  49.      Jade
  50.      scale <10.0 10.0 10.0>
  51.    end_texture
  52.    color CGreen  
  53.  end_object
  54. #declare West_Wall = object
  55.    plane <1.0 0.0 0.0> -15.0 end_plane
  56.    texture 
  57.      White_Wood
  58.      0.05
  59.      scale <15.0 20.0 3.0>
  60.    end_texture
  61.    color CBlue
  62.  end_object
  63. #declare Ceiling = object
  64.    plane <0.0 1.0 0.0> 15.0 end_plane
  65.    texture 
  66.      Red_Marble
  67.      scale <10.0 10.0 10.0>
  68.    end_texture
  69.    color White
  70.  end_object 
  71. #declare Floor = object
  72.    plane <0.0 1.0 0.0> 0.0 end_plane
  73.    texture 
  74.      Pine_Wood
  75.      0.05
  76.      scale <40.0 3.0 3.0>
  77.    end_texture
  78.    color Violet
  79.  end_object
  80.  
  81. {*****************************************}
  82. { Scene description                       }
  83. {*****************************************}
  84. object
  85.   North_Wall
  86. end_object
  87. { Comment out South Wall so camera can see in }
  88. {object
  89.   South_Wall
  90. end_object}
  91. object
  92.   East_Wall
  93. end_object
  94. object
  95.   West_Wall
  96. end_object
  97. object
  98.   Ceiling
  99. end_object
  100. object
  101.   Floor
  102. end_object
  103.  
  104. { Colored spheres to help visualize coordinates}
  105. object {North}
  106.  sphere <0.0 7.0 9.0> 1.0 end_sphere
  107.  texture color Yellow end_texture
  108.  color Yellow
  109. end_object
  110. { South sphere not visible in example gif}
  111. {object {South}
  112.  sphere <0.0 5.0 -10.0> 1.0 end_sphere
  113.  texture color CRed end_texture
  114.  color CRed
  115. end_object}
  116. object {East}
  117.  sphere <10.0 7.0 0.0> 1.0 end_sphere
  118.  texture color CGreen end_texture
  119.  color CGreen
  120. end_object
  121. object {West}
  122.  sphere <-14.0 7.0 0.0> 1.0 end_sphere
  123.  texture color CBlue end_texture
  124.  color CBlue
  125. end_object
  126. object {Up}
  127.  sphere <0.0 14.0 0.0> 1.0 end_sphere
  128.  texture color White end_texture
  129.  color White
  130. end_object
  131. object {Down}
  132.  sphere <0.0 1.0 0.0> 1.0 end_sphere
  133.  texture color Violet end_texture
  134.  color Violet
  135. end_object
  136.  
  137.  
  138. {Crude Spot light - feel free to add more light sources.}
  139. object
  140.  intersection
  141.    sphere <0.0 0.0 0.0> 2.0 inverse end_sphere
  142.    sphere <0.0 0.0 0.0> 2.1 end_sphere
  143.    plane  <0.0 0.0 1.0> 1.2 end_plane
  144.  end_intersection 
  145.  texture
  146.    Brown_Agate
  147.    scale <3.0 3.0 3.0>
  148.    specular 1.0
  149.  end_texture
  150.  rotate <45.0 -40.0 0.0>
  151.  translate <10.0 10.0 -8.0>
  152. end_object
  153.  
  154. object
  155.   sphere <0.0 0.0 0.0> 0.0005 end_sphere
  156.   translate <10.0 10.0 -8.0>
  157.   texture
  158.     colour White
  159.     ambient 0.001
  160.   end_texture
  161.   light_source
  162.   colour White
  163. end_object
  164.  
  165. { Far light source to light where spot doesn't }   
  166. object
  167.   sphere <0.0 0.0 0.0> 0.0008 end_sphere
  168.   translate <-10.0 10.0 -40.0>
  169.   texture
  170.     colour White
  171.     ambient 0.001
  172.   end_texture
  173.   light_source
  174.   colour White
  175. end_object
  176.