A Euclidean Geometry based library
Project description
Euclipy
A library used to create, model, and solve figures in Euclidean Geometry.
Features:
- Create points, line segments, angles, and triangles with Point(), Segment(), Angle(), and Triangle(), respectively
- Implicitly defines segments and angles created by polygon constructions
- Keeps a registry of all defined objects, implicit or explicit
Installation
# PyPi Installation
pip install euclipy
Sample Code (With Comments):
from euclipy import Point, Triangle, Registry
# Create 3 unique points
A = Point('A')
B = Point('B')
C = Point('C')
# Create identical triangles
T1 = Triangle([A, B, C])
T2 = Triangle([B, C, A])
print(T1.edges) # Prints line segments created by T1
print(T1.angles) # Prints angles created by T1
# Tries to create inconsistent triangle
try:
T3 = Triangle([B, A, C])
except:
print('Inconsistent triangle')
# Prints all created objects
print(Registry().entries)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
euclipy-0.2.5.tar.gz
(6.8 kB
view hashes)