A Synthetic Euclidean Geometry based library
Project description
Euclipy
A library used to create, model, and solve figures in Euclidean Geometry.
Features:
-
Create symbolic geometric objects (Triangle(), Segment(), Point(), etc.)
-
Gathers implicit information created by previous constructions
-
Solves for unknown measures and expressions
solve():
-
Use the solve() function to solve for unknown measures and expressions
-
Choose which metric you would like to solve for (measure, area, a ratio, etc.)
Installation
# PyPi Installation
pip install euclipy
Sample Code (With Comments):
# Note: This is an implementation of Problem 17 from the 2016 AMC 12B Competition
from euclipy.polygon import Triangle
from euclipy.geometricobjects import Angle, Line, Segment
if __name__ == '__main__':
# Create a triangle
Triangle('A C B')
# Define lines within the triangle
Line('A P Q H')
Line('C P E')
Line('B Q D')
Line('A E B')
Line('B H C')
Line('C D A')
# Define triangle edge measures
Segment('A C').measure = 9
Segment('C B').measure = 8
Segment('A B').measure = 7
# Create an altitude of Triangle(ACB)
Angle('C H A').measure = 90
# Create angle bisectors in Triangle(ACB)
Angle('C B D').measure = Angle('D B A').measure
Angle('E C B').measure = Angle('A C E').measure
# Solve for and print the measure of Segment(PQ)
print(Segment('P Q').solve())
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-1.1.1.tar.gz
(25.7 kB
view details)
File details
Details for the file euclipy-1.1.1.tar.gz.
File metadata
- Download URL: euclipy-1.1.1.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a55c747a0b11246acf222565b0ca18efbcaf31e6f52caf516f0188ec6d4b338
|
|
| MD5 |
9453ecd3ca68029176d1f15fe040ef95
|
|
| BLAKE2b-256 |
dfe72339c60d05e1a434f2d7d24670b948facdd1121247f35e92a8b0a5125310
|