Skip to content

Simple python module for finding convex polygons intersection.

Notifications You must be signed in to change notification settings

alexander-travov/clipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clipper

Simple python module for finding convex polygons intersection.

Based on algorithm from Ласло. Вычислительная геометрия и компьютерная графика на c++.

    from clipper import *
    P = Polygon([Point(2,2), Point(2,-2), Point(-2,-2), Point(-2,2)])
    Q = Polygon([Point(0,3), Point(3, 0), Point(0,-3), Point(-3,0)])
    intersection(P, Q)
    # Polygon(Point(2.0, 1.0), Point(2.0, -1.0), Point(1.0, -2.0), Point(-1.0, -2.0),
    #         Point(-2.0, -1.0), Point(-2.0, 1.0), Point(-1.0, 2.0), Point(1.0, 2.0))

About

Simple python module for finding convex polygons intersection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages