Skip to main content

A simple geometry library

Project description

Python Geometry Build

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

three squares in blue, green and red

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.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

simple_geometry-0.1.2-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file simple-geometry-0.1.2.tar.gz.

File metadata

  • Download URL: simple-geometry-0.1.2.tar.gz
  • Upload date:
  • Size: 16.0 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

Hashes for simple-geometry-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a4be2eac896aa79e0c925fc0e9ff2214cddddfb1f5751ffe885bf72a31a77dc7
MD5 64ff78e12e116bb0dfbdcb38c1f02a35
BLAKE2b-256 33c162be1931935032a8563d894690ee0f7e3fe9f0317905837526996fc7ca58

See more details on using hashes here.

File details

Details for the file simple_geometry-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: simple_geometry-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.5 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

Hashes for simple_geometry-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3add5fb53500d53355a079e2431e1cc21df204210ccb995bd7d40c3f7bd87c94
MD5 dbb9175f118a52907a37c6dae711a087
BLAKE2b-256 efbb7b99cd9eac1dc98b740dc837a5aea34818fcc6ee58eab699600865138cc2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page