A simple geometry library
Project description
Python Geometry
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
Read more in the full documentation.
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.3.tar.gz
(16.5 kB
view details)
Built Distribution
File details
Details for the file simple-geometry-0.1.3.tar.gz
.
File metadata
- Download URL: simple-geometry-0.1.3.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb141cbe310b6193e19e5676c2aa062162db510e2dd2359251cb5f13d79d9ac3 |
|
MD5 | 0e84598fdd39edd1ce521726cec2e3b5 |
|
BLAKE2b-256 | d9de7a8894e27cec0f9e26ba37b2c891d79df07431cbab695016a12342f1d023 |
File details
Details for the file simple_geometry-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: simple_geometry-0.1.3-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5aa0253ef4a746495105fd174889e94bb4abb03d0b4c80c1f7c7bda0a656193e |
|
MD5 | 6cb83edb147fb44bae205fdbbebcd072 |
|
BLAKE2b-256 | 2ff2d5d3c01540b900ff9fa663aeffedefd09006c64952974282e64ccc1d4abd |