.. _example_plot_polygon.py:


==================================
Approximate and subdivide polygons
==================================

This example shows how to approximate (Douglas-Peucker algorithm) and subdivide
(B-Splines) polygonal chains.


.. image:: images/plot_polygon_1.png
    :align: center


.. literalinclude:: plot_polygon.py
    :lines: 10-



**Python source code:** :download:`download <plot_polygon.py>`
(generated using ``skimage`` |version|)



**IPython Notebook:** :download:`download <./notebook/plot_polygon.ipynb>`
(generated using ``skimage`` |version|)

