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.4.tar.gz
(16.6 kB
view hashes)
Built Distribution
Close
Hashes for simple_geometry-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c19583850da210f6a96ef04933d3432f7ebc1b0e988c2653b0d287126af8c27 |
|
MD5 | 02674bcf02bcaa9f441bbda0565bb930 |
|
BLAKE2-256 | 81bf13e54c65589d77d1718e40fab3a5369b0a487e7376fb45f4e0490734fd41 |