Xref: utzoo comp.lang.c:35867 comp.graphics:15828 Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!rutgers!netnews.upenn.edu!msuinfo!HEROUX@cemmva.cem.msu.edu From: heroux@cemmva.cem.msu.edu (Brett Heroux) Newsgroups: comp.lang.c,comp.graphics Subject: Re: Polygon operations? Message-ID: <00942848.C5ABBCE0@cemmva.cem.msu.edu> Date: 11 Jan 91 02:15:57 GMT Sender: news@msuinfo.cl.msu.edu Reply-To: heroux@cemmva.cem.msu.edu (Brett Heroux) Organization: MSU_Chemistry Lines: 14 In article <4bWuKJW00VpMIo80Z=@andrew.cmu.edu>, sa1z+@andrew.cmu.edu (Sudheer Apte) writes: > >I need (pointers to) a geometric modeller or other program that can do >general 2-d polygon intersections, differences, additions, etc. based >on any representation Polygon intersection is usefully reduced to segment(line) intersections. I may be able to find the code, if I can I'll e-mail, but the method goes: Given: segment a from (x1,y1) to (x2,y2) and segment b from (x3,y3) to (x4,y4) Define: parametric equations a x = x1 + t(x2-x1) and y = y1 + t(y2-y1) and " " b x = x3 + s(x4-x3) and y = y3 + s(y4-y3) Find: s and t If 0