metadata
title: statement-to-tikz
emoji: 📐
colorFrom: blue
colorTo: green
sdk: static
pinned: false
tags:
- geometry
- tikz
- latex
- olympiad
- constraint-solver
- formalization
- diagram-generation
license: mit
statement-to-tikz
Geometry statement → constraint-solved TikZ (training-free pipeline).
This Hub card mirrors the GitHub project. Source of truth for code is the git repository.
What it does
- Formalize olympiad-style plane geometry text into
GeometryIR(JSON constraints). - Solve point coordinates with SciPy
least_squares(gauge-fixed). - Emit TikZ; verify residuals; optionally compile PDF.
- Fall back to
schematiclayout when exact solve fails.
Quick start
pip install -e ".[dev]"
stt "In triangle ABC, AB = AC, and D is the midpoint of BC. Draw the median AD." -o out/median
Set OPENAI_API_KEY for LLM formalization of arbitrary statements (stt ... --no-offline).
Not a trained model
v1 ships a pipeline + IR + solver, not fine-tuned weights. Fixtures under tests/fixtures/ are the evaluation seeds.
Citation / related work
- MagicGeo (text-guided geometric diagram generation)
- FormalGeo (olympiad geometry formal systems)