Geometry Construction Language

Draw geometry
by writing it.

GeoScript turns readable code into precise, publication-ready figures. Geometric constructions today — function plots, vectors, and new modules on the horizon. Describe what you want, and the AI writes the script.

canvas.gs — live preview
O P Q R

// Why GeoScript

A language that grows
with your thinking.

Start with a right triangle. Add vectors, labels, function curves. As new modules land, your scripts stay the same — just more powerful.

Extensible by Design

Geometry today — function plots, vectors, and physics diagrams coming. Every new module plugs into the same syntax you already know.

geometry · plots · vectors
Live Canvas

Edit your script and watch the SVG canvas update on every keystroke. No build step, no compile cycle, no surprises.

instant preview
Named Colour Palette

Define a palette once with col, then use it everywhere — with full alpha support via mint.alpha(0.1).

col · .alpha()
Dot-Access Props

Query derived properties from any object — midpoints, radii, angles — and pipe them directly into the next definition.

s1.mid.x · c.radius
AI Code Generation

Type "draw a proof of the Pythagorean theorem" and the AI writes the full GeoScript. You tweak, adjust, make it yours.

describe → diagram → done
SVG Export

One click produces a clean, publication-ready SVG — perfect for LaTeX documents, Figma, slides, or print-quality figures.

export · embed · LaTeX

// AI Code Generation

Describe a theorem.
Get a diagram.

The AI tab understands mathematical intent. Tell it what you want to show — it writes the GeoScript. You adjust, label, and make it yours.

👤
"Draw a proof of the Pythagorean theorem — label the sides a, b and c, and shade each square a different colour."
GeoScript AI
GS
Here's your Pythagorean diagram ↗ I've placed a 3-4-5 right triangle at the origin, drawn and filled the three squares, and labelled each side. Adjust any coordinate or colour to taste.

The generated code lands directly in the editor. Every number is a handle — drag a point, change a colour, add a label. The diagram is yours to refine.

"prove the angle in a semicircle is 90°" "draw a vector field" "plot y = sin(x)"
BRING YOUR OWN KEY 🔑

GeoScript AI uses your own Anthropic API key — paste it once and it's stored only in your browser. Your prompts and diagrams never touch our servers.

No markup, no middleman. You pay Anthropic directly at their published API rates — typically fractions of a cent per diagram.
Fully private. Requests go browser → Anthropic directly. Nothing is logged, stored, or forwarded by GeoScript.
No account needed. Get a key at console.anthropic.com in under a minute — no subscription required.
AI-generated · editable
pythagoras.gs
// Pythagorean theorem: a² + b² = c² axes A: ((-5, 9), (-5, 9), none) point A: (0, 0, teal, 5) point B: (6, 0, teal, 5) point C: (6, 4, teal, 5) triangle T: (A, B, C, teal, 2, teal.alpha(0.1)) angle right: (A, B, C, white, 1.5, 0.5, "square") // Squares on each side squareOn sqA: (C, B, "left", orange, 1.5, orange.alpha(0.15)) squareOn sqB: (A, C, "left", violet, 1.5, violet.alpha(0.15)) squareOn sqC: (B, A, "left", rose, 1.5, rose.alpha(0.15)) // Area labels via dot-access label lA: (at=sqA.center, text="9", color=orange, size=20) label lB: (at=sqB.center, text="25", color=violet, size=20) label lC: (at=sqC.center, text="16", color=rose, size=20)
A B C 9 25 16

// The Syntax

One pattern.
Every object.

Every statement follows the same shape: type Name: (properties). Intentionally uniform — so the script reads like a list of decisions, not code to decipher.

  • col
    Named ColoursDefine a reusable palette with hex values and reference it with alpha variants anywhere.
  • point
    PointsPlace points at coordinates with optional colour and radius — the building blocks of everything else.
  • shapes
    ShapesCircles, triangles, rectangles — defined by named points, dimensions, and fill colours.
  • label
    Labels & Dot AccessAnchor text to any object. Use s1.mid.x to flow derived props into new definitions.
scene.gs

// Workflow

Script to figure
in seconds.

1
Describe or Write

Type plain English in the AI tab — "prove the Pythagorean theorem" — or write GeoScript directly. Either way, the canvas responds.

2
Preview Instantly

The canvas updates on every keystroke. Errors surface inline in the inspector with source-mapped line references.

3
Export & Share

Download a clean SVG or drop it straight into LaTeX, Figma, or Google Slides — any tool that accepts vectors.

// get started

Your geometry,
finally in your hands.

No accounts, no install. Open the playground and start drawing with code in under a minute.

Open Playground