Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unihd-cag/simple-geometry
Axis aligned geometry package with jupyter notebook integration
https://github.com/unihd-cag/simple-geometry
geometry jupyter-notebook shapes
Last synced: about 1 month ago
JSON representation
Axis aligned geometry package with jupyter notebook integration
- Host: GitHub
- URL: https://github.com/unihd-cag/simple-geometry
- Owner: unihd-cag
- License: lgpl-3.0
- Created: 2019-12-10T13:10:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-16T16:33:10.000Z (about 5 years ago)
- Last Synced: 2024-12-15T06:10:39.619Z (about 1 month ago)
- Topics: geometry, jupyter-notebook, shapes
- Language: Python
- Homepage:
- Size: 235 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Python Geometry
===============[![PyPI version](https://badge.fury.io/py/simple-geometry.svg)](https://badge.fury.io/py/simple-geometry)
![Build](https://github.com/unihd-cag/simple-geometry/workflows/Python%20package/badge.svg)Install
-------```bash
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 shapesRead more in the [full documentation](https://unihd-cag.github.io/simple-geometry/).
Example
-------```python
# Create some shapes
from geometry import Rectbig = 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 Canvasc = Canvas(width=200, height=200)
c.append(big)
c.append(small)
c.append(tiny)# This draws the shapes in jupyter notebook
c
```![three squares in blue, green and red](docs/img/shapes.png)