Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!styx!ames!ucbcad!ucbvax!decvax!decwrl!sun!mccoy!mccoy From: mccoy%mccoy@Sun.COM (Daniel McCoy) Newsgroups: comp.graphics Subject: Re: Liang-Barsky Polygon Clipping Questions Message-ID: <14597@sun.uucp> Date: Fri, 6-Mar-87 12:15:07 EST Article-I.D.: sun.14597 Posted: Fri Mar 6 12:15:07 1987 Date-Received: Sun, 8-Mar-87 09:58:54 EST References: <252@naucse.UUCP> Sender: news@sun.uucp Reply-To: mccoy@sun.UUCP (Daniel McCoy) Organization: Sun Microsystems, Mountain View Lines: 39 In article <252@naucse.UUCP> sbw@naucse.UUCP (Steve Wampler) writes: >The November 1983 Issue of CACM has a nice polygon clipping >algorithm by Liang-Barsky, including Pascal code for the >algorithm. > >However, when I tried out the algorithm, I found a number of >cases where it did not work correctly. [...] > (1) Does the algorithm as given in that CACM issue work? [...] > (2) If not, then was there a published fix to it? > (3) If so, then can someone point me to it or provide it > to me? Make sure to check the Corrigendum in the April 1984 CACM. There was also one in Feb '84, but the April one was cumulative Among other things, two lines of the Pascal were changed. The changes are short, so, from CACM, April '84, changes to be made to the article in CACM Nov '83: Page 875: Figure 20, Line 7 shoud read if (deltax > 0) or (deltax = 0 and x[i] > xright) Page 875: Figure 20, Line 16 shoud read if (deltay > 0) or (deltay = 0 and y[i] > ytop) >Please Email me the results, as I doubt that there is much >specific interest on the net about this. > Since somebody else has already posted more speculation, I thought it might be worth a posting to help straighten things out. Dan McCoy mccoy@sun.COM Sun Microsystems