Skip to main content

A Euclidean Geometry based library

Project description

Euclipy

PyPI version PyPI downloads

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

PyPi Installation

# PyPi Installation
pip install euclipy

Sample Code (With Comments):

from euclipy import *

# 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


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.4.tar.gz (6.2 kB view hashes)

Uploaded Source

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