Skip to main content

A Synthetic 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 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


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 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