Skip to content

lace/polliwog

Repository files navigation

polliwog

version python versions license coverage build docs build code style

2D and 3D computational geometry library.

Includes vectorized geometric operations, transforms, and primitives like planes, polygonal chains, and axis-aligned bounding boxes. Implemented in pure Python/NumPy. Lightweight and fast.

See the complete API reference: https://polliwog.dev/

Like its lower-level counterpart, the vector-geometry and linear-algebra toolbelt vg, this project is designed to scale from prototyping to production.

The goals of this project are:

  • Provide a complete set of functionality for this problem domain, with full documentation.
  • Provide 100% test coverage of all code paths and use cases.
  • Keep dependencies light and deployment flexible.
  • Keep the library working with current versions of Python and other tools.
  • Respond to community contributions.

Installation

pip install polliwog

Usage

import numpy as np
from polliwog import Polyline

# ...

Development

First, install Poetry.

After cloning the repo, run ./bootstrap.zsh to initialize a virtual environment with the project's dependencies.

Subsequently, run ./dev.py install to update the dependencies.

Acknowledgements

This collection was developed at Body Labs and includes a combination of code developed at Body Labs, from legacy code and significant new portions by Eric Rachlin, Alex Weiss, and Paul Melnikow. It was extracted from the Body Labs codebase and open-sourced by Alex Weiss into a library called blmath, which was subsequently forked by Paul Melnikow. This library and the 3D geometry and linear-algebra toolbelt vg were later extracted.

License

The project is licensed under the two-clause BSD license.