Metadata-Version: 2.0
Name: poly-decomp
Version: 0.0.1
Summary: Decompose 2D polygons into convex pieces.
Home-page: https://github.com/wsilva32/poly_decomp.py
Author: Will Silva
Author-email: w.silva32@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy

poly_decomp.py: Decompose 2D polygons into convex pieces
=========================

.. image:: https://img.shields.io/pypi/v/poly_decomp.svg
    :target: https://pypi.python.org/pypi/poly_decomp

Installation
------------

.. code-block:: bash

    $ pip install poly_decomp

Usage
------------

.. code-block:: python

    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 <http://steffe.se>`_ `poly-decomp.js <https://github.com/schteppe/poly-decomp.js>`_.

Algorithms based on `Mark Bayazit's <http://mpen.ca>`_ `Poly Decomp <https://mpen.ca/406/bayazit>`_.


.. :changelog:

Release History
---------------

dev
+++

0.0.1 (2016-10-25)
+++++++++++++++++++

- Initial release.


