Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1448

VB6 - Math Utility: Clipping polygons including degenerate cases

$
0
0
This is an implementation of Kim & Kim's extension of the Greiner-Hormann's polygon clipping algorithm to include degenerate cases.

Degenerate cases occur e.g. when a polygon's vertex lies on an edge or vertex of the other polygon.

The method works based on linked lists -implemented in the vertex, contour and polygon classes- and follows the guidelines given in this paper (used to be available in the web and I have a pdf copy):

Dae Hyun Kim and Myoung-Jun Kim
"An extension of polygon clipping to resolve degenerate cases"
Computer-Aided Design and Applications, Vol. 3, pp 447–456 (2006)

The 2 polygons are referred to as the subject and the clipping polygon. Either one can have more than one branch (contour). Contours can be nested and the points constituting them may be given in any orientation, clockwise or counterclockwise.

However, the contours must be not self intersecting.

In this demo, the user can input new polygons or load a number of convenient demo cases provided.
Attached Files

Viewing all articles
Browse latest Browse all 1448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>