In this paper we present a simple new algorithm to offset multiple, non-overlapping polygons with arbitrary holes that makes use of winding numbers. Our algorithm constructs an intermediate “raw offset curve” as input to the tessellator routines in the OpenGL Utility library (GLU), which calculates the winding number for each connected region. By construction, the invalid loops of our raw offset curve bound areas with non-positive winding numbers and thus can be removed by using the positive winding rule implemented in the GLU tessellator. The proposed algorithm takes O((n + k)logn) time and O(n + k) space, where n is the number of vertices in the input polygon and k is the number of self-intersections in the raw offset curve. The implementation is extremely simple and reliably produces correct and logically consistent results.
- Design Engineering Division and Computers and Information in Engineering Division
Polygon Offsetting by Computing Winding Numbers
- Views Icon Views
- Share Icon Share
- Search Site
Chen, X, & McMains, S. "Polygon Offsetting by Computing Winding Numbers." Proceedings of the ASME 2005 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference. Volume 2: 31st Design Automation Conference, Parts A and B. Long Beach, California, USA. September 24–28, 2005. pp. 565-575. ASME. https://doi.org/10.1115/DETC2005-85513
Download citation file: