home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / general / raytrace / mtv / mtv.txt < prev   
Text File  |  1992-12-09  |  3KB  |  68 lines

  1. ########################################################################
  2.               MTV RAYTRACER*
  3.          written by Mark Terrence VandeWettering
  4.               markv@cs.uoregon.edu
  5. ########################################################################
  6. * Well, I have had the initials since 1964, Music Television can't say
  7.   that :-)
  8.  
  9. This represents the second formal release of the MTV Raytracer.
  10. It was written to help me understand how raytracing works, to
  11. generate cute images, and generally because I like to program. 
  12. Feel free to use it for any purpose, I am releasing it into the 
  13. public domain.
  14.  
  15. The input format to this ray tracer is called "NFF" or Neutral File
  16. Format, which was invented by Eric Haines' for his Standard Procedural
  17. Database.  The SPD was designed to allow programmers to test their
  18. raytracers on databases of varying sizes.  While not the end-all to
  19. object file formats, it has served me well.  If you wish to change the
  20. input file to something else, you probably only need to change the
  21. parser in "parse.y", not any of the other code.
  22.  
  23. NFF supports the following primitives:
  24.     spheres
  25.     cylinders
  26.     cones
  27.     polygons
  28.     polygonal patches (normals are interpolated from corner points)
  29.  
  30. The MTV raytracer supports all of these primitives, with the minor
  31. limitation that polygonal patches must be triangles (have only three
  32. vertices).  I am sure some clever person can convert patches with more
  33. sides to triangles, I haven't found the need yet.
  34.  
  35. The output from the raytracer is very simple, and not directly tied to
  36. any specific device.   It consists of a single line, with format in 
  37. C scanf style of "%d %d\n", which gives the resolution of the image.
  38. It is then followed by x*y sets of (red green blue) bytes.  We have 
  39. pretty unstandard hardware here,  (I convert these to Utah Raster
  40. Toolkit form and then filter that to display on a Tek4115) but I do 
  41. maintain an archive of source which has been sent to me for this
  42. purpose.  More below--
  43.  
  44. By the time you read this, this raytracer should be available via
  45. anonymous ftp from drizzle.cs.uoregon.edu.  I will try to archive
  46. source code for displaying the ".pic" files, as well as interesting
  47. objects that I run accross.  Filters already exist to display images on
  48. suns, to convert to PostScript and Impress, as well as X bitmaps Also
  49. available is Eric Haines' SPD source code, so you can generate your own
  50. fractal spheres, mountains, gears etc.
  51.  
  52. By placing this in the comp.sources.unix, I hope to get this to more of
  53. the people who have requested it.  I will entertain e-mail with
  54. questions, and even requests for the source code, but remember that I am
  55. a grad student only, and have limited time.  If it takes me a long time
  56. to reply, send mail to me again.
  57.  
  58. Thanks must go to Eric Haines especially, whose e-mail conversations
  59. have been interesting and fruitful.  Also thanks to the numerous
  60. authors whose research into raytracing has seen implementation in this
  61. raytracer, and have provided a host of ideas about image synthesis.
  62. Also thanks to Jeff Eaton and David Koblas, whose criticism and sense of
  63. competition drove this poor hacker to write a better program than he
  64. could have without them.
  65.  
  66. Ta Ta For Now...
  67. Mark VandeWettering
  68.