poly_decomp 0.0.1

Last updated:

0 purchases

poly_decomp 0.0.1 Image
poly_decomp 0.0.1 Images
Add to Cart

Description:

poly decomp 0.0.1

Installation
$ pip install poly_decomp


Usage
import poly_decomp as pd

polygon = [[0, 0], [5, 0], [5, 5], [2.5, 2.5], [0, 5]]
# |\ /|
# | \ / |
# | \/ |
# | |
# |------|

print pd.polygonDecomp(polygon)
# --> [[[0, 0], [2.5, 2.5], [0, 5]], [[0, 0], [5, 0], [5, 5], [2.5, 2.5]]]
# |\ /|
# | \ / |
# | / |
# | / |
# |/----|

print pd.polygonQuickDecomp(polygon)
# --> [[[5, 0], [5, 5], [2.5, 2.5]], [[2.5, 2.5], [0, 5], [0, 0], [5, 0]]]
# |\ /|
# | \ / |
# | \ |
# | \ |
# |----\|


About
Implementation based on Schteppe’s poly-decomp.js.
Algorithms based on Mark Bayazit’s Poly Decomp.


Release History

dev


0.0.1 (2016-10-25)

Initial release.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.