[comp.graphics] Liang/Barsky Polygon Clipping : Summary

sbw@naucse.UUCP (Steve Wampler) (03/09/87)

A few weeks ago I posted some questions about the Liang/Barsky
Polygon clipping algorithm published in the November 1983 CACM.
This is a summary of the results:

Several people remembered that that there had been a corrigenda
   put out in a later issue of the CACM, but were uncertain of
   the issue.

Brain Barsky pointed me to the April 1984 issue of CACM, page 383
   for the fix.  This, indeed, fixes my problem quite nicely, and
   is considerably better than my 'patch' (which was to simply
   bump horizontal(vertical) lines off the horizontal(vertical)
   by 1/INFINITY - this simplified the code, but (sigh) did not
   work properly for vertical(horizontal) lines exactly on a
   window boundary).  My thanks for Brian for directing me to
   the proper fix.

Several people asked for copies of my code, should I get it
   running.  I am mailing copies to those that asked for it.
   (It is in C, rather than Pascal, but there is nothing
   very tricky about it - it is a rather direct transliteration
   of the Pascal code from the original article (with corrections)
   so going back should be no problem.)   If others are interested
   in it, I'll send it out to them.  I'd suggest you look first
   at the two CACM's, as all the code is there.

Thanks for all the help!
Steve Wampler