Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site mnetor.UUCP Path: utzoo!mnetor!george From: george@mnetor.UUCP (George Hart) Newsgroups: comp.graphics Subject: Need alg. for filling arbitrary closed polygons Message-ID: <4166@mnetor.UUCP> Date: Fri, 10-Jul-87 12:27:03 EDT Article-I.D.: mnetor.4166 Posted: Fri Jul 10 12:27:03 1987 Date-Received: Sat, 11-Jul-87 13:36:15 EDT Reply-To: george@mnetor.UUCP (George Hart) Organization: Computer X (CANADA) Ltd., Toronto, Ontario, Canada Lines: 29 Keywords: Help! Problem: display a filled polygon defined simply a list of (x,y) co-ordinates defining the vertices of the polygon. The only thing that is known is that the polygon is closed. Self-intersection (e.g. bowtie) is a possibility; in fact, there are no bounds on the number of times it may intersect itself. The polygon may be filled using an arbitrary pattern. Speed and the load on the CPU are the keys here. The graphics device used is programmable to an extent (scratch memory is the primary limitation). It can be programmed to pattern fill arbitrary triangles. Does it make sense to try and triangulate the polygon and use the capabilities of the hardware? I've noticed a reference to a triangulation algorithm co-authored by Robert Tarjan that works in O(nloglogn) time. We can use a scanline algorithm but this will be extremely costly in terms of host time and space, especially with patterned fills. Any help here would be much appreciated. -- Regards, George Hart, Computer X Canada Ltd. UUCP: utzoo >!mnetor!george seismo BELL: (416)475-8980