Computation library for 2D and 3D geometry
Project description
polliwog
A computation library for 3D and 2D geometry, including geometric operations, transforms, and primitives like planes, polygonal chains, and axis-aligned bounding boxes.
The goals of this project are:
- Keep dependencies light and deployment flexible.
- Keep the library working in current versions of Python and other tools.
- Respond to community contributoions.
- Eventually provide a complete set of functionality for this problem domain.
Features
Geometric operations, transforms, and primitives, in 2D and 3D.
The most commonly used of these are directly imported into
polliwog
.
- polliwog.Box represents an axis-aligned cuboid.
- blmath.Plane represents a 2-D plane in 3-space (not a hyperplane).
- blmath.Polyline represents an unconstrained polygonal chain in 3-space.
polliwog.transform
includes code for 3D transforms.
- polliwog.transform.CompositeTransform represents a composite transform using homogeneous coordinates. (Thanks avd!)
- polliwog.transform.CoordinateManager provides a convenient interface for named reference frames within a stack of transforms and projecting points from one reference frame to another.
- polliwog.transform.find_rigid_transform
finds a rotation and translation that closely transforms one set of points to
another. Its cousin
find_rigid_rotation
does the same, but only allows rotation, not translation. - polliwog.transform.rotation.rotation_from_up_and_look produces a rotation matrix that gets a mesh into the canonical reference frame from "up" and "look" vectors.
Other modules:
- polliwog.tri.barycentric provides a function for projecting a point to a triangle using barycentric coordinates.
- polliwog.convexify provides a function for producing a convex hull from a mostly-planar curve.
- polliwog.segment provides functions for working with line segments in n-space.
Installation
pip install numpy polliwog
#Usage
import numpy as np
from polliwog import Polyline
# ...
Contribute
- Issue Tracker: https://github.com/lace/polliwog/issues
- Source Code: https://github.com/lace/
Pull requests welcome!
Support
If you are having issues, please let us know.
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 subsequnetly 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file polliwog-0.1.0.tar.gz
.
File metadata
- Download URL: polliwog-0.1.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.9.1 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28acd51a3c0df8a70dabf8a05610dc1d06326cfa5c58c024e245139d9871f911 |
|
MD5 | 25489992733ae6a78d0fe3e7319e353f |
|
BLAKE2b-256 | b8aa2b50c0bff3446fb91873fc07ec5ea8b67e8ac9b251489e93da3ebf0226f9 |