home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / graphics / 9311 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  31.9 KB

  1. Xref: sparky comp.graphics:9311 news.answers:2661
  2. Newsgroups: comp.graphics,news.answers
  3. Path: sparky!uunet!elroy.jpl.nasa.gov!ufo!grieggs
  4. From: grieggs@jpl-devvax.jpl.nasa.gov (John T. Grieggs)
  5. Subject: (31aug92) comp.graphics Frequently Asked Questions (FAQ)
  6. Message-ID: <1992Aug31.203116.11940@jpl-devvax.jpl.nasa.gov>
  7. Followup-To: poster
  8. Sender: grieggs@jpl-devvax.jpl.nasa.gov (John T. Grieggs)
  9. Reply-To: grieggs <grieggs@jpl-devvax.jpl.nasa.gov>
  10. Organization: Jet Propulsion Laboratory, Pasadena, CA
  11. Date: Mon, 31 Aug 1992 20:31:16 GMT
  12. Approved: news-answers-request@MIT.edu
  13. Expires: Mon, 14 Sep 1992 20:31:17 GMT
  14. Lines: 761
  15.  
  16. Archive-name: graphics/faq
  17.  
  18. This message is automatically posted once a week in an effort to cut
  19. down on the repetitive junk in comp.graphics.  It was last changed on
  20. 31aug92.  If you have answers to other frequently asked questions that
  21. you would like included in this posting, please send me mail.  If you
  22. don't want to see this posting every week, please add the subject line
  23. to your kill file.  Thank you.
  24. ---
  25. _john
  26.  
  27.     John Grieggs grieggs@jpl-devvax.jpl.nasa.gov JohnG@portal.com
  28. ---
  29. Last update: 08/31/92
  30.  
  31. The FAQ is doing well.  Here's what's new:
  32.  
  33. POV mailing list (erich@eye.com).
  34.  
  35. New IP address for gondwana.ecr.mu.oz.au (bernie@ecr.mu.oz.au).
  36.  
  37. Errata for "Digital Image Warping" (erich@eye.com).
  38.  
  39. IP address for weedeater.math.yale.edu (erich@eye.com).
  40.  
  41. IP addresses for marsh.cs.curtin.edu.au, ftp.cosy.sbg.ac.at (me).
  42.  
  43. General re-formatting and tweaking (me).
  44.  
  45.         grieggs@jpl-devvax.jpl.nasa.gov
  46.  
  47.  
  48.  
  49. Contents:
  50.  
  51.     1) General references for graphics questions.
  52.     2) Drawing three-dimensional objects on a two-dimensional screen.
  53.     3) Quantizing 24 bit images down to 8 bits.
  54.     4) Converting color into grayscale.
  55.     5) Quantizing grayscale to black&white.
  56.     6) Rotating a raster image by an arbitrary angle.
  57.     7) Free image manipulation software.
  58.     8) Format documents for TIFF, IFF, BIFF, NFF, OFF, FITS, etc.
  59.     9) Converting between vector formats.
  60.     10) How to get Pixar films.
  61.     11) How do I draw a circle as a Bezier (or B-spline) curve?
  62.     12) How to order standards documents.
  63.     13) How to FTP by email.
  64.     14) How to tell whether a point is within a planar polygon.
  65.     15) How to tessellate a sphere.
  66.     16) Specific references on ray-tracing and global illumination.
  67.     17) SIGGRAPH information online
  68.     18) SIGGRAPH Panels Proceedings available
  69.     19) Graphics mailing lists
  70.     20) Specific references on file formats
  71.     21) What about GIF?
  72.     22) What is morphing?
  73.     23) How to ray-trace height fields
  74.     24) How to find the area of a 3D polygon
  75.  
  76.  
  77. 1) General references for graphics questions:
  78.  
  79.     Computer Graphics: Principles and Practice (2nd Ed.), J.D. Foley,
  80.     A. van Dam, S.K. Feiner, J.F. Hughes, Addison-Wesley 1990, ISBN
  81.     0-201-12110-7
  82.     Procedural Elements for Computer Graphics, David F. Rogers, McGraw
  83.     Hill 1985, ISBN 0-07-053534-5
  84.     Mathematical Elements for Computer Graphics 2nd Ed., David F. Rogers
  85.     and J. Alan Adams, McGraw Hill 1990, ISBN 0-07-053530-2
  86.     Three Dimensional Computer Graphics, Alan Watt, Addison-Wesley 1990, ISBN
  87.     0-201-15442-0
  88.     An Introduction to Ray Tracing, Andrew Glassner (ed.), Academic Press
  89.     1989, ISBN 0-12-286160-4
  90.     Graphics Gems, Andrew Glassner (ed.), Academic Press 1990, ISBN
  91.     0-12-286165-5
  92.     Graphics Gems II, James Arvo (ed.), Academic Press 1991, ISBN
  93.     0-12-64480-0
  94.     Graphics Gems III, David Kirk (ed.), Academic Press 1992, ISBN
  95.     0-12-409670-0 (with IBM disk) or 0-12-409671-9 (with Mac disk)
  96.     Digital Image Warping, George Wolberg, IEEE Computer Society Press
  97.     Monograph 1990, ISBN 0-8186-8944-7
  98.     Digital Image Processing (2nd Ed.), Rafael C. Gonzalez, Paul Wintz,
  99.     Addison-Wesley 1987, ISBN 0-201-11026-1
  100.     A Programmer's Geometry, Adrian Bowyer, John Woodwark, Butterworths 1983,
  101.     ISBN 0-408-01242-0 Pbk
  102.  
  103. An automatic mail handler at Brown University allows users of "Computer
  104. Graphics: Principles and Practice," by Foley, van Dam, Feiner, and
  105. Hughes, to obtain text errata and information on distribution of the
  106. software packages described in the book.  Also, users can send the
  107. authors feedback, to report text errors and software bugs, make
  108. suggestions, and submit exercises.  To receive information describing
  109. how you can use the mail handler, simply mail graphtext@cs.brown.edu
  110. and put the word "Help" in the Subject line.  Use the Subject line
  111. "Software-Distribution" to receive information specifically concerning
  112. the software packages SRGP and SPHIGS.
  113.  
  114. Errata for "An Introduction to Ray Tracing" is available on
  115. wuarchive.wustl.edu in graphics/graphics/books/IntroToRT.errata.
  116.  
  117. Errata for "Digital Image Warping" is in the same directory as
  118. "Digital-Image-Warping.errata".
  119.  
  120. All C code from the "Graphics Gems" series is available via anonymous ftp
  121. from princeton.edu.  Look in the directory pub/Graphics/GraphicsGems for
  122. the various volumes (Gems, GemsII, GemsIII), and get the README file first.
  123.  
  124.  
  125. 2) Drawing three-dimensional objects on a two-dimensional screen.
  126.  
  127. The simple answer is, you divide by the depth.  For a more verbose
  128. explanation, see any of the above references, starting with:
  129.  
  130. The Foley & Van Dam & Feiner & Hughes "Computer Graphics" book is certainly
  131. a good start.  Chapter 6 is "Viewing in 3D", then read chapter 15,
  132. "Visible-Surface Determination".  For more information go to chapter 16 for
  133. shading, chapter 19 for clipping, and branch out from there.
  134.  
  135.  
  136. 3) Quantizing 24 bit images down to 8 bits.
  137.  
  138. Find a copy of "Color Image Quantization for Frame Buffer Display" by
  139. Paul Heckbert, SIGGRAPH '82 Proceedings, page 297.  There are other
  140. algorithms, but this one works well and is fairly simple.  Implementations
  141. are included in most raster toolkits (see item 7 below).
  142.  
  143. A variant method is described in "Graphics Gems", p. 287-293.  Note that
  144. the code from the "Graphics Gems" series is all available from an FTP site,
  145. as described above.
  146.  
  147. Check out John Bradley's "Diversity Algorithm", which is incorporated into
  148. the xv package and described in the back of the manual.
  149.  
  150.  
  151. 4) Converting color into grayscale.
  152.  
  153. The NTSC formula is:
  154.  
  155.     luminosity = .299 red + .587 green + .114 blue
  156.  
  157.  
  158. 5) Quantizing grayscale to black&white.
  159.  
  160. The only reference you need for this stuff is:
  161.  
  162.     Digital Halftoning, Robert Ulichney, MIT Press 1987, ISBN 0-262-21009-6
  163.  
  164. But before you go off and start coding, check out the image manipulation
  165. software mentioned in item 7 below.  All of the packages mentioned can do
  166. some form of gray to b&w conversion.
  167.  
  168.  
  169. 6) Rotating a raster image by an arbitrary angle.
  170.  
  171. The obvious but wrong method is to loop over the pixels in the source
  172. image, transform each coordinate, and copy the pixel to the destination.
  173. This is wrong because it leaves holes in the destination.  Instead,
  174. loop over the pixels in the destination image, apply the *reverse*
  175. transformation to the coordinates, and copy that pixel from the source.
  176. This method is quite general, and can be used for any one-to-one
  177. 2-D mapping, not just rotation.  You can add anti-aliasing by doing
  178. sub-pixel sampling.
  179.  
  180. However, there is a much faster method, with antialising included,
  181. which involves doing three shear operations.  The method was originally
  182. created for the IM Raster Toolkit (see below); an implementation is
  183. also present in PBMPLUS.  Reference: "A Fast Algorithm for Raster
  184. Rotation", by Alan Paeth (awpaeth@watcgl.waterloo.edu) Graphics
  185. Interface '86 (Vancouver).  An article on the IM toolkit appears in
  186. the same journal.  An updated version of the rotation paper appears
  187. in "Graphics Gems" (see section [1]) under the original title.
  188.  
  189.  
  190. 7) Free image manipulation software.
  191.  
  192. There are a number of toolkits for converting from one image format to
  193. another, doing simple image manipulations such as size scaling, plus
  194. the above-mentioned 24 -> 8, color -> gray, gray -> b&w conversions.
  195. Here are pointers to some of them:
  196.  
  197.     PBMPLUS, by Jef Poskanzer.  Comprehensive format conversion and image
  198.     manipulation package.  The latest version is always available via
  199.     anonymous FTP as ftp.ee.lbl.gov:pbmplus*.tar.Z,
  200.     wuarchive.wustl.edu:graphics/graphics/packages/pbmplus/pbmplus*.tar.Z,
  201.     and export.lcs.mit.edu:contrib/pbmplus*.tar.Z.
  202.  
  203.     IM Raster Toolkit, by Alan Paeth (awpaeth@watcgl.uwaterloo.ca).
  204.     Provides a portable and efficient format and related toolkit.  The
  205.     format is versatile in supporting pixels of arbitrary channels,
  206.     components, and bit precisions while allowing compression and machine
  207.     byte-order independence.  The kit contains more than 50 tools with
  208.     extensive support of image manipulation, digital halftoning and format
  209.     conversion.  Previously distributed on tape c/o the University of
  210.     Waterloo, an FTP version will appear someday.
  211.  
  212.     Utah RLE Toolkit.  Conversion and manipulation package, similar to
  213.     PBMPLUS.  Available via FTP as cs.utah.edu:pub/urt-*,
  214.     princeton.edu:pub/Graphics/urt-*, and freebie.engin.umich.edu:pub/urt-*.
  215.  
  216.     Fuzzy Pixmap Manipulation, by Michael Mauldin <mlm@nl.cs.cmu.edu>.
  217.     Conversion and manipulation package, similar to PBMPLUS.  Version 1.0
  218.     available via FTP as nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z,
  219.     ftp.uu.net:pub/fbm.tar.Z, and ucsd.edu:graphics/fbm.tar.Z.
  220.  
  221.     Img Software Set, by Paul Raveling <raveling@venera.isi.edu>.  Reads and
  222.     writes its own image format, displays on an X11 screen, and does some
  223.     image manipulations.  Version 1.3 is available via FTP as
  224.     export.lcs.mit.edu:contrib/img_1.3.tar.Z, and
  225.     venera.isi.edu:pub/img_1.3.tar.Z along with a large collection of color
  226.     images.
  227.  
  228.     Xim, by Philip R. Thompson.  Reads and writes its own image format,
  229.     displays on an X11 screen, and does some image manipulations.
  230.     Available in your nearest X11R4 source tree as contrib/clients/xim.
  231.     A more recent version is available via ftp from video.mit.edu.  It uses
  232.     x11r4 and the OSF/Motif toolkit to provide basic interactive image
  233.     manipulation and reads/writes GIF, xwd, xbm, tiff, rle, xim, and other
  234.     formats.
  235.  
  236.     xloadimage, by Jim Frost <madd@std.com>.  Reads in images in various
  237.     formats and displays them on an X11 screen.  Available via FTP as
  238.     export.lcs.mit.edu:contrib/xloadimage*, and in your nearest comp.sources.x
  239.     archive.
  240.  
  241.     TIFF Software, by Sam Leffler <sam@okeeffe.berkeley.edu>.  Nice
  242.     portable library for reading and writing TIFF files, plus a few tools
  243.     for manipulating them and reading other formats.  Available via FTP as
  244.     ucbvax.berkeley.edu:pub/tiff/*.tar.Z or ftp.uu.net:graphics/tiff.tar.Z
  245.  
  246.     xtiff, an X11 tool for viewing a TIFF file.  It was written to handle
  247.     as many different kinds of TIFF files as possible while remaining
  248.     simple, portable and efficient.  xtiff illustrates some common problems
  249.     with building pixmaps and using different visual classes.  It is
  250.     distributed as part of Sam Leffler's libtiff package and it is also
  251.     available on export.lcs.mit.edu, ftp.uu.net and comp.sources.x.
  252.     xtiff 2.0 was announced in 4/91; it includes Xlib and Xt versions.
  253.  
  254.     ALV, a Sun-specific image toolkit.  Version 2.0.6 posted to
  255.     comp.sources.sun on 11dec89.  Also available via email to
  256.     alv-users-request@cs.bris.ac.uk.
  257.  
  258.     popi, an image manipulation language.  Version 2.1 posted to
  259.     comp.sources.misc on 12dec89.
  260.  
  261.     ImageMagick, an X11 package for display and interactive manipulation
  262.     of images.  Uses its own format (MIFF), and includes some converters.
  263.     Available via FTP as export.lcs.mit.edu:contrib/ImageMagick.tar.Z
  264.  
  265.     Khoros, a huge (~100 meg) graphical development environment based on
  266.     X11R4.  Khoros components include a visual programming language, code
  267.     generators for extending the visual language and adding new application
  268.     packages to the system, an interactive user interface editor, an
  269.     interactive image display package, an extensive library of image and
  270.     signal processing routines, and 2D/3D plotting packages.  Available via
  271.     FTP as pprg.eece.unm.edu:pub/khoros/*.
  272.  
  273.     LaboImage, a SunView-based image processing and analysis package.  It
  274.     includes more than 200 image manipulation, processing and measurement
  275.     routines, on-line help, plus tools such as an image editor, a color
  276.     table editor and several biomedical utilities.  Available via anonymous
  277.     FTP as ads.com:pub/VISION-LIST-ARCHIVE/SHAREWARE/LaboImage_3.1.tar.Z
  278.  
  279.     The San Diego Supercomputer Center Image Tools, software tools for
  280.     reading, writing, and manipulating raster images.  Binaries for some
  281.     machines available via anonymous FTP in sdsc.edu:sdscpub.
  282.  
  283.     The Independent JPEG Group has written a package for reading and
  284.     writing JPEG files.  FTP to ftp.uu.net:graphics/jpeg/jpegsrc.v?.tar.Z
  285.  
  286. Don't forget to set binary mode when you FTP tar files.  For you MILNET
  287. folks who still don't have name servers, the IP addresses are:
  288.  
  289.     ads.com            128.229.30.16
  290.     cs.utah.edu            128.110.4.21
  291.     coral.cs.jcu.edu.au        137.219.17.4
  292.     export.lcs.mit.edu        18.24.0.12
  293.     freebie.engin.umich.edu    141.212.103.21
  294.     ftp.ee.lbl.gov        128.3.112.20
  295.     ftp.uu.net            137.39.1.9 or 192.48.96.9
  296.     gondwana.ecr.mu.oz.au    128.250.70.62
  297.     karazm.math.uh.edu        129.7.7.6
  298.     marsh.cs.curtin.edu.au    134.7.1.1
  299.     nic.funet.fir        128.214.6.100
  300.     ftp.cosy.sbg.ac.at        141.201.2.15
  301.     ftp.ncsa.uiuc.edu        141.142.20.50
  302.     nl.cs.cmu.edu        128.2.222.56
  303.     pprg.eece.unm.edu        129.24.24.10
  304.     princeton.edu        128.112.128.1
  305.     sdsc.edu            132.249.20.22
  306.     ucbvax.berkeley.edu        128.32.133.1
  307.     venera.isi.edu        128.9.0.32
  308.     weedeater.math.yale.edu    128.36.23.17
  309.     wuarchive.wustl.edu        128.252.135.4
  310.     zamenhof.cs.rice.edu    128.42.1.75
  311.  
  312. Please do *not* post or mail messages saying "I can't FTP, could someone
  313. mail this to me?"  There are a number of automated mail servers that will
  314. send you things like this in response to a message.  See item 13 below for
  315. details on some.
  316.  
  317. Also, the newsgroup alt.graphics.pixutils is specifically for discussion
  318. of software like this.  You may find useful information there.
  319.  
  320.  
  321. 8) Format documents for TIFF, IFF, BIFF, NFF, OFF, FITS, etc.
  322.  
  323. You almost certainly don't need these.  Read the above item 7 on free
  324. image manipulation software.  Get one or more of these packages and
  325. look through them.  Chances are excellent that the image converter you
  326. were going to write is already there.  But if you still want one of the
  327. format documents, many such files are available by anonymous ftp from
  328. zamenhof.cs.rice.edu in directory pub/graphics.formats.  It is also
  329. mirrored at ftp.cosy.sbg.ac.at in dir /pub/mirror/file-formats/graphic.
  330.  
  331. These files were collected off the net and are believed to be correct.
  332. This archive includes pixel formats, and two- and three-dimensional object
  333. formats.  The future of this archive is uncertain at the moment, as Mark
  334. Hall <foo@cs.rice.edu> will apparently no longer be maintaining it.
  335.  
  336. A second graphics file format archive is now being actively maintained
  337. by Quincey Koziol (koziol@ncsa.uiuc.edu).  The latest version exists at
  338. ftp.ncsa.uiuc.edu in /misc/file.formats/graphics.formats.  Apparently,
  339. neither of these is complete, you might want to check both.
  340.  
  341. FITS stands for Flexible Image Transport System, it's an image file
  342. format most often used in astronomy.  Refer to the sci.space FAQ for
  343. more information if needed.
  344.  
  345.  
  346. 9) Converting between vector formats.
  347.  
  348. A lot of people ask about converting from HPGL to PostScript, or MacDraw
  349. to CGM, or whatever.  It is important to understand that this is a very
  350. different problem from the image format conversions in item 7.  Converting
  351. one image format to another is a fairly easy problem, since once you
  352. get past all the file header junk, a pixel is a pixel -- the basic objects
  353. are the same for all image formats.  This is not so for vector formats.
  354. The basic objects -- circles, ellipses, drop-shadowed pattern-filled
  355. round-cornered rectangles, etc. -- vary from one format to another.
  356. Except in extremely restricted cases, it is simply not possible to do
  357. a one-to-one conversion between vector formats.
  358.  
  359. On the other hand, it is quite possible to do a close approximation,
  360. rendering an image from one format using the primitives from another.
  361. As far as I know, no one has put together a general toolkit of such
  362. converters, but two different HPGL to PostScript converters have been
  363. posted to comp.sources.misc.  Check the index on your nearest archive
  364. site.
  365.  
  366. A related frequent question is how to convert from some vector format
  367. to a bitmapped image - from PostScript to Sun raster format, or HPGL to
  368. X11 bitmap.  For example, some of the commercial PostScript clones for
  369. PC's allow you to render to a disk file as well as a printer.  Also,
  370. the PostScript interpreters in the NeXT box and in Sun's X11/NeWs can
  371. be used to render to a file if you're clever.  But in general, the
  372. answer is no.  However, if someone were to put together a vector to
  373. vector conversion toolkit, adding a vector to raster converter would be
  374. trivial.
  375.  
  376.  
  377. 10) How to get Pixar films.
  378.  
  379. The various John Lasseter / Pixar computer animated shorts are available
  380. on video tape.  You can order them from Direct Cinema Limited:
  381.  
  382.     Film                           Individual Price      Institutional Price
  383.     Luxo, Jr.                $14.95            $50.00
  384.     Red's Dream                $19.95            $75.00
  385.     Tin Toy                $24.95            $75.00
  386.     Knickknack                $24.95            $75.00
  387.     Luxo, Jr./Red's Dream/Tin Toy    $39.95            $100.00
  388.  
  389. All tapes are on 1/2" VHS NTSC.  Add $10/tape for PAL format.  Also
  390. available:
  391.  
  392.     Tin Toy T-shirt            $15.00
  393.     Knickknack 3D T-shirt        $15.00 (includes glasses)
  394.  
  395. For individual orders, add $5 S&H for the first tape or shirt, $2 for
  396. each additional tape or shirt.  For institutional orders, add $5 S&H
  397. for the first tape, $3 for each additional tape.  Foreign shipping, add
  398. $3/tape or shirt.  Call 800-525-0000 (213-396-4774 international,
  399. 213-396-3233 FAX) to charge to your credit card.  Call first to verify
  400. prices and availability.  Or, just write to:
  401.  
  402.     Direct Cinema Limited
  403.     1749 14th Street
  404.     Santa Monica, CA 90404-4342
  405.  
  406. Allan Braunsdorf has this to say:
  407.  
  408. At SIGGRAPH they were selling a tape with all four shorts
  409. for $25.  That was a sale price.  You can get it for slightly
  410. more than that normally.  ($35 maybe.)  I believe it's
  411. available from RenderMan Retail (at Pixar's address).
  412.  
  413. Does anyone know this address and the real price?
  414.  
  415.  
  416. 11) How do I draw a circle as a Bezier (or B-spline) curve?
  417.  
  418. The short answer is, "You can't."  Unless you use a rational spline you
  419. can only approximate a circle.  The approximation may look acceptable,
  420. but it is sensitive to scale.  Magnify the scale and the error of
  421. approximation magnifies.  Deviations from circularity that were not
  422. visible in the small can become glaring in the large.  If you want to
  423. do the job right, consult the article:
  424.  
  425.   "A Menagerie of Rational B-Spline Circles"
  426.   by Leslie Piegl and Wayne Tiller
  427.   in IEEE Computer Graphics and Applications, volume 9, number 9,
  428.   September, 1989, pages 48-56.
  429.  
  430. For rough, non-rational approximations, consult the book:
  431.  
  432.   Computational Geometry for Design and Manufacture
  433.   by I. D. Faux and M. J. Pratt,
  434.   Ellis Horwood Publishers, Halsted Press, John Wiley 1980.
  435.  
  436. For the best known non-rational approximations, consult the article:
  437.  
  438.   "Good Approximation of Circles by Curvature-continuous Bezier Curves"
  439.   by Tor Dokken, Morten Daehlen, Tom Lyche, and Knut Morken
  440.   in Computer Aided Geometric Design, volume 7, numbers 1-4 (combined),
  441.   June, 1990, pages 33-41 [Elsevier Science Publishers (North-Holland)]
  442.  
  443.  
  444. 12) How to order standards documents.
  445.  
  446. The American National Standards Institute sells ANSI standards, and also
  447. ISO (international) standards.  Their sales office is at 1-212-642-4900,
  448. mailing address is 1430 Broadway, NY NY 10018.  It helps if you have the
  449. complete name and number.
  450.  
  451. Some useful numbers to know:
  452.  
  453. CGM (Computer Graphics Metafile) is ISO 8632-4 (1987).  GKS (Graphical
  454. Kernel System) is ANSI X3.124-1985.  PHIGS (Programmer's Hierarchical
  455. Interactive Graphics System) is ANSI X3.144-1988.  IGES is ASME/ANSI
  456. Y14.26M-1987.  Language bindings are often separate but related numbers;
  457. for example, the GKS FORTRAN binding is X3.124.1-1985.
  458.  
  459. Standards-in-progress are made available at key milestones to solicit
  460. comments from the graphical public (this includes you!).  ANSI can let
  461. you know where to order them; most are available from Global Engineering
  462. at 1-800-854-7179.
  463.  
  464.  
  465. 13) How to FTP by email.
  466.  
  467. There are a number of sites that archive the Usenet sources newsgroups
  468. and make them available via an email query system.  You send a message
  469. to an automated server saying something like "send comp.sources.unix/fbm",
  470. and a few hours or days later you get the file in the mail.
  471.  
  472. In addition, there is at least one FTP-by-mail server.  Send mail to
  473. ftpmail@decwrl.dec.com saying "help" and it will tell you how to use
  474. it.  Note that this service has at times been turned off due to abuse.
  475.  
  476.  
  477. 14) How to tell whether a point is within a planar polygon.
  478.  
  479. Consider a ray originating at the point of interest and continuing to
  480. infinity.  If it crosses an odd number of polygon edges along the way,
  481. the point is within the polygon.  If the ray crosses an even number of
  482. edges, the point is either outside the polygon, or within an interior
  483. hole formed from intersecting polygon edges.  This idea is known in
  484. the trade as the Jordan curve theorem; see Eric Haines' article in
  485. Glassner's ray tracing book (above) for more information, including
  486. treatment of special cases.
  487.  
  488. Another method is to sum the absolute angles from the point to all
  489. the vertices on the polygon.  If the sum is 2 pi, the point is inside,
  490. if the sum is 0 the point is outside.  However, this method is about an
  491. order of magnitude slower than the previous method because evaluating the
  492. trigonometric functions is usually quite costly.
  493.  
  494. Code for both methods can be had from Eric Haines (erich@eye.com), and will
  495. appear in the Ray Tracing News, Vol. 5, No. 2, available from princeton.edu:
  496. pub/Graphics/RTNews/RTNv5n2.Z.
  497.  
  498.  
  499. 15) How to tessellate a sphere.
  500.  
  501. One simple way is to do recursive subdivision into triangles.  The
  502. base of the recursion is an octahedron, and then each level divides
  503. each triangle into four smaller ones.  Jon Leech <leech@cs.unc.edu>
  504. has posted a nice routine called sphere.c that generates the coordinates.
  505. It's available for FTP on ftp.ee.lbl.gov and princeton.edu.
  506.  
  507. 16) Specific references on ray-tracing and global illumination.
  508.  
  509. Rick Speer maintains a cross-indexed ray-tracing bibliography:
  510.  
  511. Highlights of this edition-
  512.  
  513.     i) more than 500 citations spanning the period from 1968 through
  514.        November '91;
  515.     ii) papers from all Siggraph, Graphics Interface, Eurographics, CG
  516.         International and Ausgraph proceedings through December, '91;
  517.     iii) all citations keyworded for easy lookup;
  518.     iv) cross-indices by keyword and author;
  519.     v)  glossary of the 119 keywords used.
  520.  
  521. The bib is in the form of a PostScript file.  The printout is 41 pages long.
  522. Below is a list of ftp sites and the dirs that contain the file. It's named
  523. "speer.raytrace.bib.ps.Z" and is compressed at most sites-
  524.  
  525.              Site                             Dir
  526.     wuarchive.wustl.edu    graphics/graphics/bib/RT.BIB.Speer/
  527.     karazm.math.uh.edu    pub/Graphics/
  528.     gondwana.ecr.mu.oz.au    pub/papers/
  529.     nic.funet.fi        pub/sci/papers/graphics
  530.     coral.cs.jcu.edu.au     graphics/papers/
  531.  
  532. Eric Haines (erich@eye.com) maintains ray tracing and radiosity/global
  533. illumination bibliographies.  These are in "refer" format, and so can be
  534. searched electronically (a simple awk script to search for keywords is
  535. included with each).  The bibliographies are available at most of the
  536. sites listed above, and the most current versions are maintained at
  537. princeton.edu: pub/Graphics/Papers as "RayBib.*" and "RadBib.*".
  538.  
  539. Tom Wilson (wilson@cs.ucf.edu) has collected over 300 abstracts from ray
  540. tracing related research papers and books.  The information is essentially
  541. in plaintext, and Latex and troff formatting programs are included.  This
  542. collection is available at most of the sites above as "rtabs.*".
  543.  
  544. 17) SIGGRAPH information online
  545.  
  546. [from Steve Cunningham and Ralph Orlick]
  547.  
  548. ACM-SIGGRAPH announces its online information site at  siggraph.org
  549. (128.248.245.250).  This site now provides SIGGRAPH information via both
  550. anonymous ftp and an electronic mail archive server.
  551.  
  552. The anonymous ftp service is very standard, and the ftp directory includes
  553. both conference and publications subdirectories.
  554.  
  555. To retrieve information by electronic mail, send mail to
  556.      archive-server@siggraph.org
  557. and in the subject or the body of the message include the message  send
  558. followed by the topic and subtopic you wish.  A good place to start is with
  559. the command
  560.      send index
  561. which will give you an up-to-date list of available information.
  562.  
  563.  
  564. 18) SIGGRAPH Panels Proceedings available
  565.  
  566. [from Steve Cunningham and Bob Judd]
  567.  
  568. ACM SIGGRAPH announces the availability of the SIGGRAPH '91 Panels Proceedings
  569. at the  siggraph.org  site (128.248.245.250).  The proceedings are available
  570. in three formats:
  571.      text   (ASCII)
  572.      rtf    (rich text format, suitable for many word processors)
  573.      word   (MS Word for the Macintosh)
  574. They may be retrieved from siggraph.org in two ways:
  575.  
  576. (1) by anonymous ftp
  577.     change to one of the directories
  578.        publications/s91/panels_proceedings/[text|rtf|word]
  579.     The text and rtf files may be downloaded in ASCII mode, while the word
  580.     files are stored in MacBinary format and must be downloaded in binary 
  581.     mode.
  582.  
  583.     Each directory contains a Table of Contents file (TOC) that describes the
  584.     contents of each panel file.
  585.  
  586. (2) by electronic mail
  587.     send mail to
  588.        archive-server@siggraph.org
  589.     You can retrieve either the  text  or  rtf  files.  We suggest that you
  590.     first retrieve the index files by putting one of the messages
  591.        send panel91-txt index
  592.        send panel91-rtf index
  593.     in the subject or body of the message.  You will get the necessary
  594.     information to retrieve the actual transcript files.
  595.  
  596.  
  597. 19) Graphics mailing lists
  598.  
  599. There are a variety of graphics-related mailing list out there, each
  600. covering either a single product or a single topic.  I have been an
  601. active participant in one of these for some time now, and find the
  602. focus and expertise which can be brought to bear on an isolated topic
  603. to be nothing short of amazing.
  604.  
  605. Please send me the appropriate information if you have any others you
  606. would like to see added.
  607.  
  608. Name:        Imagine mailing list
  609. Description:    Discussion forum for users of the Imagine 3D Rendering and
  610.         Animation package by Impulse, Inc.
  611. Platforms:    Amiga
  612. Subscription:    imagine-request@email.sp.unisys.com
  613. Posting:    imagine@email.sp.unisys.com
  614.  
  615. Name:        DCTV mailing list
  616. Description:    Discussion forum for users of the Digital Creations DCTV
  617.         box, software, and file formats
  618. Platforms:    Amiga
  619. Subscription:    DCTV-request@nova.cc.purdue.edu
  620. Posting:    DCTV@nova.cc.purdue.edu
  621.  
  622. Name:        Rayshade Users mailing list
  623. Description:    Discussion forum for users of the Rayshade raytracer
  624. Platforms:    Most UNIX boxes, Amiga, Mac, IBM
  625. Subscription:    rayshade-request@cs.princeton.edu
  626. Posting:    rayshade-users@cs.princeton.edu
  627.  
  628. Name:        Lightwave software for Toaster mailing list
  629. Description:    Discussion forum for users of Lightwave, the Video
  630.         Toaster modelling and rendering package
  631. Platforms:    Amiga
  632. Subscription:    lightwave-request@bobsbox.rent.com
  633. Posting:    lightwave@bobsbox.rent.com
  634.  
  635. Name:        POV mailing list
  636. Description:    Discussion forum for DKBTrace and POV renderers
  637. Platforms:    Unix
  638. Subscription:    listserv@trearn.bitnet
  639. Posting:    dkb-l@trearn.bitnet
  640.  
  641.  
  642. 20) Specific references on file formats
  643.  
  644.     Graphics File Formats, David Kay and John Levine, Windcrest/McGraw-Hill
  645.       1992, ISBN 0-8306-3059-7 paper, ISBN 0-8306-3060-0 $36.95 hardcover.
  646.       Comments - 26 formats, no software (this is good, IMHO - I prefer
  647.       books which are non-platform-dependent).
  648.  
  649.  
  650. 21) What about GIF?
  651.  
  652. GIF stands for Graphics Interchange Format.  It is portable and usable upon
  653. a wide variety of platforms.  It is quite limited in some ways (yes, the
  654. keeper of the FAQ has some opinions after all), and in fact, I don't like
  655. it much.  However, it looks to me like the most-Frequently Asked Question
  656. which was not previously covered in this list.  The following is a list
  657. of newsgroups and the like where one could go to find out about GIF.
  658.  
  659. Subject: alt.binaries.pictures FAQ - General info
  660. Subject: alt.binaries.pictures FAQ - OS specific info
  661. Newsgroups: alt.binaries.pictures.d,alt.binaries.pictures.misc,
  662.     alt.binaries.pictures.utilities,alt.binaries.pictures.fractals,
  663.     alt.binaries.pictures.fine-art.d,news.answers
  664.  
  665. Available in the indicated USENET newsgroup(s), or via anonymous ftp from
  666. pit-manager.mit.edu (18.172.1.27) in the files:
  667.  
  668. /pub/usenet/news.answers/pictures-faq/part1
  669. /pub/usenet/news.answers/pictures-faq/part2
  670.  
  671. Also available from mail-server@pit-manager.mit.edu by sending a mail
  672. message containing any or all of:
  673.  
  674. send usenet/news.answers/pictures-faq/part1
  675. send usenet/news.answers/pictures-faq/part2
  676.  
  677. Send a message containing "help" to get general information about the
  678. mail server.
  679.  
  680. Also, you could check out the resources described in sections 7, 8, and
  681. 20 above for more information.
  682.  
  683.  
  684. 22) What is morphing?
  685.  
  686. Warping is the deformation of an image by mapping each pixel to a new
  687. location. Morphing is blending from one image or object to another one.
  688. Valerie Hall has written an excellent introduction to warping and
  689. morphing. This is available for anonymous ftp from marsh.cs.curtin.edu.au
  690. in the directory pub/graphics/bibliography/Morph. There are three files:
  691.  
  692.         morph_intro.ps.Z     (PostScript version, many pictures - 1.5M)
  693.         morph_intro.txt.Z    (text version)
  694.         m_responses.Z        (Responses to morphing questions)
  695.  
  696. The files are compressed, so you must use binary transfer and
  697. uncompress them afterwards.
  698.  
  699.  
  700. 23) How to ray-trace height fields
  701.  
  702. Height fields are a special case in ray-tracing.  They have a number of uses,
  703. such as terrain rendering, and some optimization is possible.  Thus, they
  704. get their own FAQ section.  Note that further references can no doubt be
  705. located via the ray-tracing bibs in section 16 above.
  706.  
  707. Unless someone else sends me information to the contrary, I assume that
  708. the following paper is the definitive reference:
  709.  
  710. F. Kenton Musgrave
  711. Grid Tracing: Fast Ray Tracing For Height Fields
  712. July, 1988
  713. <musg88.ps.Z>
  714.  
  715. This is available as "Research Report YALEU/DCS/RR-639" from Yale University,
  716. it's also in the SIGGRAPH '91 Fractal Modeling in 3D Computer Graphics and
  717. Imaging course notes, and (best of all) it's available on the net:
  718.  
  719.     nic.funet.fi        pub/sci/papers/musg88.ps.Z
  720.     weedeater.math.yale.edu    pub/Papers/musg88.ms.Z
  721.     princeton.edu        pub/Graphics/Papers/musg88.ms.Z
  722.     coral.cs.jcu.edu.au        graphics/papers/musg88.ps.Z
  723.     gondwana.ecr.mu.OZ.AU    pub/papers/musg88.ms.Z and musg88.ps.Z
  724.  
  725. An implementation of this paper may be found in Rayshade.
  726.  
  727. Another paper exists:
  728.  
  729. %A David W. Paglieroni
  730. %A Sidney M. Petersen
  731. %T Parametric Height Field Ray Tracing
  732. %J Proceedings of Graphics Interface '92
  733. %I Canadian Information Processing Society
  734. %C Toronto, Ontario
  735. %D May 1992
  736. %P 192-200
  737.  
  738.  
  739. 24) How to find the area of a 3D polygon
  740.  
  741. The area of a triangle is given by (in C notation),
  742.  
  743.      area = 0.5 * ( ( x[0] * y[1] ) + ( x[1] * y[2] ) + ( x[2] * y[0] ) -
  744.                 ( x[1] * y[0] ) - ( x[2] * y[1] ) - ( x[0] * y[2] ) );
  745.  
  746. and the area of a planar polygon is given by
  747.  
  748.      area = 0.0;
  749.  
  750.      for ( i = 0; i < n - 1; i++ )
  751.          area += ( x[i] * y[i + 1] ) - ( x[i + 1] * y[i] );
  752.      area += ( x[n - 1] * y[0] ) - ( x[0] * y[n - 1] );
  753.      area /= 2.0;
  754.  
  755. If the area is a negative number, the polygon or triangle is
  756. clockwise, if positive, it is counterclockwise.
  757.  
  758. >From Ronald Golman's Gem (in Graphics Gems II - see section 1 above), "Area
  759.  of Planar Polygons and Volume of Polyhedra:"
  760.  
  761. The area of a polygon P0, P1, P2, ... Pn, not in the x-y plane, is
  762. given by
  763.  
  764.      Area(Polygon) = 1/2 * | N . Sigma { Pk x Pk+1 } |
  765.  
  766. where N is the unit vector normal to the plane and P is a polygonal
  767. vertex.  The . represents the dot product operator and the x
  768. represents the cross product operator.  Sigma represents the summation
  769. operator.  | | represents the absolute value operator.  Pn+1 is equal
  770. to P0.
  771.  
  772. -- 
  773. John T. Grieggs (Telos @ Jet Propulsion Laboratory)
  774. 4800 Oak Grove Drive, Pasadena, Ca. 91109 M/S 525-3660    (818) 306-6506
  775. Uucp: {cit-vax,elroy,chas2}!jpl-devvax!grieggs
  776. Arpa: ...jpl-devvax!grieggs@cit-vax.ARPA
  777.