A simple geometry library
Project description
Python Geometry ![Build](https://pypi-camo.freetls.fastly.net/fbe45feecb68139fc25e556485900128ec561c56/68747470733a2f2f6769746875622e636f6d2f6e69656c73627577656e2f67656f6d657472792f776f726b666c6f77732f507974686f6e2532307061636b6167652f62616467652e737667)
Install
pip install simple-geometry
Features
- Create simple shapes
- axis-aligned rectangles
- axis-aligned path segments
- groups containing other shapes
- Manipulate shapes
- stretch align
- translation align
- Visualize shapes
Example
# Create some shapes
from geometry import Rect
big = Rect[100, 100, 'blue']
small = Rect[50, 50, 'red']
# Translate relatively
small.translate(center=big.top_right)
# Some topology
tiny = big.intersection(small).copy('green')
# Visualize them
from geometry import Canvas
c = Canvas(width=200, height=200)
c.append(big)
c.append(small)
c.append(tiny)
# This draws the shapes in jupyter notebook
c
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simple-geometry-0.1.1.tar.gz
(15.9 kB
view hashes)
Built Distribution
Close
Hashes for simple_geometry-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dec39cbf05a93c9ceb09e173602a93faed728e6162ce5397a72647053eb64f2 |
|
MD5 | cc83a56dda696284493cc43fa910a2e4 |
|
BLAKE2b-256 | f6fc7b0010eb4146616377194da79bedb15e1376c6b72ab6f6875d8f575ab5f8 |