https://github.com/lace/polliwog
2D and 3D computational geometry library
https://github.com/lace/polliwog
3d barycentric computational-geometry geometry plane-geometry polygonal-chain polyline transformations
Last synced: 5 months ago
JSON representation
2D and 3D computational geometry library
- Host: GitHub
- URL: https://github.com/lace/polliwog
- Owner: lace
- License: bsd-2-clause
- Created: 2019-03-28T17:00:45.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T14:11:33.000Z (over 1 year ago)
- Last Synced: 2025-07-21T07:47:39.346Z (6 months ago)
- Topics: 3d, barycentric, computational-geometry, geometry, plane-geometry, polygonal-chain, polyline, transformations
- Language: Python
- Homepage: https://polliwog.dev/
- Size: 768 KB
- Stars: 32
- Watchers: 2
- Forks: 6
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# polliwog
[][pypi]
[][pypi]
[][pypi]
[][coverage]
[][build]
[][docs build]
[][black]
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.
[pypi]: https://pypi.org/project/polliwog/
[coverage]: https://github.com/lace/polliwog/blob/main/.coveragerc#L2
[build]: https://circleci.com/gh/lace/polliwog/tree/main
[docs build]: https://polliwog.readthedocs.io/en/latest/
[black]: https://black.readthedocs.io/en/stable/
## Installation
```sh
pip install polliwog
```
## Usage
```py
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.
[install poetry]: https://python-poetry.org/docs/#installation
## 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][blmath fork].
This library and the 3D geometry and linear-algebra toolbelt [vg][] were later
extracted.
[eric rachlin]: https://github.com/eerac
[alex weiss]: https://github.com/algrs
[paul melnikow]: https://github.com/paulmelnikow
[blmath]: https://github.com/bodylabs/blmath
[blmath fork]: https://github.com/metabolize/blmath
[vg]: https://github.com/lace/vg
## License
The project is licensed under the two-clause BSD license.