Skip to content
geometorPublic

About

A symbolic engine for defining and verifying geometric constructions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

GEOMETOR • model

Symbolic compass-and-straightedge construction engine for the GEOMETOR ecosystem.

Overview

geometor.model is the foundational symbolic algebra engine for defining, constructing, and verifying geometric systems with exact precision. Powered by SymPy, it treats constructive geometry as an ordered deductive system of information and operations:

  • Points represent information—exact algebraic coordinates ($sqrt{2}$, $varphi = frac{1+sqrt{5}}{2}$, etc.) without floating-point approximation noise.
  • Lines and Circles represent operations performed on pairs of existing points.
  • Intersections are the consequences of operations, automatically computed, simplified, deduplicated, and added to the model with full ancestral lineage.
  • Segments, Wedges/Angles, and Polygons represent derived structural measurements and regions.

Role Across the GEOMETOR Ecosystem & Coordination with publish

geometor.model powers the executable constructions and interactive SVG diagrams across all GEOMETOR repositories:

Key Features

  • Exact Symbolic Precision: Every coordinate, radius, line equation, and spread is maintained as an exact SymPy algebraic expression.
  • Ancestry & Dependency Tracking: Every constructed element records its parent primitives, enabling automatic dependency tree extraction (ancestors) and step-by-step playback.
  • Automatic Intersection Discovery & Deduplication: Adding a line or circle automatically computes all intersections with existing primitives and merges coincident algebraic points.
  • JSON Serialization & Interactive CLI: Save and load complete model histories to/from JSON (serialize.py) or build models interactively via python3 -m geometor.model.

Installation & Usage

pip install geometor-model

Python API:

from geometor.model import Model

model = Model("equilateral")
A = model.set_point(0, 0, classes=["given"], label="A")
B = model.set_point(1, 0, classes=["given"], label="B")

model.construct_circle(A, B)
model.construct_circle(B, A)

# Intersections C and D are automatically discovered and labeled
for pt in model.points:
    print(pt.label, pt.x, pt.y)

Documentation & Deployment

Built with photon-platform/publish in the unified Classical Scriptorium Book Codex theme:

publish test

Resources

About

A symbolic engine for defining and verifying geometric constructions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages