Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!umich!umeecs!zip!spencer From: spencer@eecs.umich.edu (Spencer W. Thomas) Newsgroups: comp.graphics Subject: Re: intersecting regions Message-ID: Date: 26 Feb 90 04:43:05 GMT References: <610@titan.tsd.arlut.utexas.edu> Sender: news@zip.eecs.umich.edu Organization: University of Michigan EECS Dept Lines: 17 In-reply-to: elrond@titan.tsd.arlut.utexas.edu's message of 25 Feb 90 06:20:48 GMT In article <610@titan.tsd.arlut.utexas.edu> elrond@titan.tsd.arlut.utexas.edu (Brad Hlista) writes: > I have two regions A and B defined by four vertices. Letting A be the > boundary of the screen, I am looking for a fast clipping routine to find the > new vertices of A intersect B. If A is convex, then you can use the Sutherland-Hodgman polygon clipping algorithm (see any standard graphics text, e.g. Rogers, _Procedural Elements of Computer Graphics_, McGraw Hill). Note that the result may have more than 4 vertices (it can have more than 8, but must have less than 12). If A is concave, then you have to use a more complex algorithm (e.g., Weiler-Atherton polygon clipper, also described in Rogers, and also referenced recently in this newsgroup.) -- =Spencer (spencer@eecs.umich.edu)