github.com/Botffy/polyskel ↗

Straight skeleton implementation in Python

An animated visualization of Botffy/polyskel's Git history from June 2015 to October 2020, built by 3 contributors. The codebase reached 90 lines, mostly Python. The video runs 27 seconds.

Render your own repo

Turn any GitHub repository into a video like this — free sample in seconds.

Visualize your own →

Open this visualization on its own page →

Language

Python

Contributors

3

Lines of Code

90

From

2015-06-08

To

2020-10-12

Advertisement

About Botffy/polyskel

Polyskel is a Python implementation of the straight skeleton algorithm, a computational geometry technique that computes a skeleton structure from polygon input. The algorithm was originally described in a 1998 paper by Felkel and Obdržálek and creates a tree structure representing the medial axis of the input polygon, which has applications in areas like architecture and geography.

The implementation acknowledges its own limitations, as the original algorithm is known to have issues with certain edge cases, though it performs reasonably well on real-world inputs like country contours and floor plans. The library uses the euclid3 library for geometric computations and includes a demo tool that visualizes the skeleton output as an image alongside the input polygon. Users can specify polygons and holes in a text file format, with options for verbose logging and step-by-step visualization during computation.

The project has inspired several ports to other platforms and languages, including a Swift version and a Blender plugin that generates roof structures, indicating its utility in practical applications despite the acknowledged algorithmic limitations.

Advertisement

Share this video