Results 1 to 1 of 1

Thread: VB6 - Math Utility: Clipping polygons including degenerate cases

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    VB6 - Math Utility: Clipping polygons including degenerate cases

    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 not be self intersecting.

    In this demo, the user can input new polygons or load a number of convenient demo cases provided.
    Attached Files Attached Files
    Last edited by krtxmrtz; Jun 10th, 2015 at 05:29 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width