Every construction the library implements, each with a figure you can drag.

An element is declared as a single string:

name;type;construction;arguments;nameColor;vertexColor;edgeColor;faceColor

The four colour fields are optional; 0 means transparent. Each figure's Source button gives the complete runnable file behind it, to copy or to open in CodePen.

Signatures are written post-expansion. A line's name in an argument list expands to its two endpoints, so params: ["AB"] arrives as two points rather than one. That is why some signatures below read as taking more points than you would write.

Point constructions

point;free

Signatureint x, int y

Freely draggable point.

B;point;free;180,110

Two integer pixel coordinates. Draggable anywhere; drawn red.

point;fixed

Signatureint x, int y [, int z]

Non-draggable fixed point (2D and 3D variants).

O;point;fixed;120,80

Two or three integer coordinates. Not draggable. Used for anchors and for off-screen construction aids.

point;first

SignaturePoint A, Point B

Returns point A (first endpoint of a line).

F;point;first;AB

The first endpoint of a line, as an addressable point.

point;last

SignaturePoint A, Point B

Returns point B (last endpoint of a line).

L;point;last;AB

The second endpoint.

point;midpoint

SignaturePoint A, Point B

Midpoint of segment AB.

M;point;midpoint;A,B

Bisects the segment.

point;intersection

SignaturePoint A, B, C, D [, Plane]

Intersection of lines AB and CD.

X;point;intersection;A,B,C,D

The crossing of lines AB and CD. Line names expand to their endpoints, so this arrives as four points.

point;foot

SignaturePoint A, Point B, Point C

Foot of perpendicular from A to line BC.

M;point;foot;A,B,C

Foot of the perpendicular from A to line BC.

point;extend

SignaturePoint A, B, C, D

Point E on line AB so BE = CD.

E;point;extend;A,B,C,D

Lays |CD| off beyond B along AB. Euclid I.3.

point;cutoff

SignaturePoint A, B, C, D

Point E on line AB so AE = CD.

E;point;cutoff;A,B,C,D

Cuts |CD| off from A along AB. Euclid I.3.

point;center

SignatureCircle A

Center of circle A.

Z;point;center;circ

The centre of a circle, as an addressable point.

point;circumcenter

SignaturePoint A, B, C [, Plane]

Circumcenter of triangle ABC (2D and 3D variants).

O;point;circumcenter;A,B,C

Equidistant from three points. A plane may be supplied for the 3D form.

point;lineSlider

SignaturePoint A, B, int x, int y [, int z]

Point draggable along line AB (2D, 3D, segment variants).

P;point;lineSlider;A,B,120,95

Draggable along the line only; drawn orange. The trailing integers are the initial coordinates.

point;circleSlider

SignatureCircle A, int x, int y [, int z]

Point draggable along circle A.

P;point;circleSlider;circ,60,60

Draggable around the circle only.

point;perpendicular

Signature — Various (5 signature variants)

Point D s.t.

D;point;perpendicular;A,B

A point D with AD perpendicular to AB. Five signature variants determine |AD|.

point;parallelogram

SignaturePoint A, Point B, Point C

4th vertex D of parallelogram ABCD (D = A+C−B).

D;point;parallelogram;A,B,C

The fourth vertex, D = A + C − B.

point;vertex

SignaturePolygon P, int i

i-th vertex of polygon P.

V;point;vertex;sq,3

The i-th vertex of a polygon, 1-based.

point;similar

SignaturePoint A, B, D, E, F [, Plane]

Point H so △ABH ~ △DEF (2D + 3D).

H;point;similar;A,B,D,E,F

The point H for which triangle ABH is similar to DEF.

point;proportion

SignaturePoint S0,S1,T0,T1,U0,U1,V0,V1

Point V' on V0V1 s.t. \.

W;point;proportion;S0,S1,T0,T1,U0,U1,V0,V1

Eight points. W lies on V0V1 with |S|:|T| = |U|:|V0W| — the fourth proportional, Euclid VI.12.

point;invert

SignaturePoint A, Circle B

Inversion of A in circle B.

A';point;invert;A,circ

The image of A inverted in the circle: OA · OA' equals the radius squared.

point;meanProportional

SignaturePoint A, B, C, D, E, F

Point G on EF s.t.

G;point;meanProportional;S0,S1,T0,T1,U0,U1

Six points. The geometric mean of the first two lengths, laid off along the third.

point;planeSlider

SignaturePlane A, int x, int y, int z

Point draggable on plane A.

A;point;planeSlider;base,120,120,40

Draggable, confined to the given plane. Three integer coordinates.

point;sphereSlider

SignatureSphere A, int x, int y, int z

Point draggable on sphere A.

X;point;sphereSlider;sph,190,70,60

Draggable, confined to the sphere's surface.

point;angleBisector

SignaturePoint A, B, C [, Plane]

Intersection of angle bisector of ∠BAC with BC.

D;point;angleBisector;B,A,C

Where the bisector of angle BAC meets BC. Argument order is B, A, C — the vertex is second. A plane may be supplied.

point;angleDivider

SignaturePoint A, B, C [, Plane], int n

1/n division of angle.

D;point;angleDivider;B,A,C,3

As angleBisector, for a 1/n division; n is the trailing integer. Shown here at a third.

point;harmonic

SignaturePoint A, B, C, D

Harmonic conjugate.

H;point;harmonic;B,C,D

The harmonic conjugate of B with respect to C and D. Takes three points.

Line constructions

line;connect

SignaturePoint A, Point B

Line through A and B.

AB;line;connect;A,B

The segment between two points.

line;extend

SignaturePoint A, B, C, D

Line extending AB by length CD.

AE;line;extend;A,B,C,D;0;0;red

AB produced by a further |CD|.

line;parallel

SignaturePoint A, Point B, Point C

Line through A parallel and equal to line BC.

par;line;parallel;P,A,B;0;0;red

Through A, parallel and equal to line BC.

line;perpendicular

Signature — Various (5 signature variants)

Line perpendicular to another.

perp;line;perpendicular;A,B;0;0;red

Perpendicular to AB at A.

line;bichord

SignatureCircle A, Circle B

Line connecting two circle intersections.

ch;line;bichord;c1,c2;0;0;red

The common chord of two circles. Takes the circle elements themselves, not their centres.

line;chord

SignaturePoint B, Point C, Circle A

Chord of circle A cut by line BC.

ch;line;chord;A,B,circ;0;0;red

The chord that line BC cuts from a circle.

line;angleBisector

SignaturePoint A, B, C [, Plane]

Bisector of angle ∠ABC.

bis;line;angleBisector;A,B,C;0;0;red

The bisector of angle ABC as a line. The vertex is the second argument.

line;angleDivider

SignaturePoint A, B, C [, Plane], int n

1/n division of ∠ABC as a line.

div;line;angleDivider;A,B,C,3;0;0;red

The 1/n division of an angle, as a line.

line;foot

SignaturePoint A, Plane B

Perpendicular from A to plane B.

f;line;foot;A,base;0;0;red

The perpendicular from a point to a plane. Euclid XI.11.

line;similar

SignaturePoint A, B, D, E, F [, Plane]

Line AH where △ABH ∼ △DEF (2D + 3D).

AH;line;similar;A,B,D,E,F;0;0;red

Side AH of the triangle on AB similar to DEF.

line;proportion

Signature — As point variant

Line form of proportion.

W;line;proportion;S0,S1,T0,T1,U0,U1,V0,V1;0;0;red

The fourth proportional as a segment.

line;meanProportional

Signature — As point variant

Line form.

G;line;meanProportional;S0,S1,T0,T1,U0,U1;0;0;red

The geometric mean as a segment.

line;path

SignaturePoint A, B, … (≥2)

An open path (polyline) — an ordered run of connected segments A→B→… that does not close back to the first point.

p;line;path;A,B,C,D;0;0;red

An open polyline through two or more points, drawn and highlighted as a single element. Does not close back to the first point.

Circle constructions

circle;radius

SignaturePoint center, Point edge [, Point C]

Circle with center and radius; 2-point (radius=\.

circ;circle;radius;O,P

Centre and a point on the circumference. A third point sets the radius instead.

circle;circumcircle

SignaturePoint A, B, C [, Plane]

Circle through three points (2D and 3D).

circ;circle;circumcircle;A,B,C;0;0;red;0

Through three points. A plane may be supplied for the 3D form.

circle;invert

SignatureCircle A, Circle B

Inversion of circle A in circle B.

c3;circle;invert;c2,c1;0;0;red;0

One circle inverted in another. The image is a circle unless the original passes through the centre of inversion.

Polygon constructions

polygon;triangle

SignaturePoint A, B, C

Triangle with vertices A, B, C.

t;polygon;triangle;A,B,C;0;0;black;cyan

Three vertices.

polygon;quadrilateral

SignaturePoint A, B, C, D

Quadrilateral ABCD.

q;polygon;quadrilateral;A,B,C,D;0;0;black;cyan

Four vertices in order.

polygon;parallelogram

SignaturePoint A, B, C

Parallelogram ABCD where D = A+(C−B).

p;polygon;parallelogram;A,B,C;0;0;black;cyan

Three vertices; the fourth is derived.

polygon;square

SignaturePoint A, B

Square on side AB.

s;polygon;square;A,B;0;0;black;cyan

Built on the side AB. Vertex order picks which side it stands on. Euclid I.46.

polygon;equilateralTriangle

SignaturePoint A, B [, Plane]

Equilateral triangle on side AB (2D + 3D).

t;polygon;equilateralTriangle;A,B;0;0;black;cyan

Built on the side AB. Vertex order picks the apex side. Euclid I.1.

polygon;regularPolygon

SignaturePoint A, B [, Plane], int n

Regular n-gon on edge AB (2D + 3D).

p;polygon;regularPolygon;A,B,7;0;0;black;cyan

Built on the edge AB, not from a centre and radius. n is the trailing integer.

polygon;similar

SignaturePoint A, B, D, E, F [, Plane]

Triangle ABH where △ABH ∼ △DEF (2D + 3D).

t;polygon;similar;A,B,D,E,F;0;0;black;cyan

The triangle on AB similar to DEF, as a fillable region.

polygon;application

SignaturePolygon P, Point A, B, C

Parallelogram with side AB, angle CAB, area = P.area().

p;polygon;application;src,A,B,C;0;0;black;cyan

A parallelogram on AB, at angle CAB, equal in area to the given polygon. Euclid I.44. Lengthening AB flattens the result, the area being fixed.

polygon;starPolygon

SignaturePoint A, B, int n, int k

Star polygon {n/k} with density param.

s;polygon;starPolygon;A,B,7,3;0;0;black;cyan

The star polygon {n/k} on edge AB. k is the density — how many vertices each edge steps over.

polygon;pentagon

SignaturePoint A, B, C, D, E

Pentagon (5 free vertices).

p;polygon;pentagon;A,B,C,D,E;0;0;black;cyan

Five vertices in order. No regularity assumed.

polygon;hexagon

SignaturePoint A, B, C, D, E, F

Hexagon (6 free vertices).

h;polygon;hexagon;A,B,C,D,E,F;0;0;black;cyan

Six vertices in order.

polygon;octagon

SignaturePoint A, B, C, D, E, F, G, H

Octagon (8 free vertices).

o;polygon;octagon;A,B,C,D,E,F,G,H;0;0;black;cyan

Eight vertices in order.

polygon;curvedTriangle

SignaturePoint A, B, C, Carrier ab, bc, ca

A triangle whose three sides are circular arcs — an elliptic or hyperbolic triangle (both have circular-arc sides).

t;polygon;curvedTriangle;A,B,C,cb,ca,cc;0;0;black;cyan

Three vertices and three side carriers. Each side is its carrier's arc clipped to the two vertices; a line carrier gives a straight side. Carriers reach the construction unexpanded.

Sector constructions

sector;sector

SignaturePoint A, B, C [, Plane]

Circular sector from center through A and B (2 variants).

s;sector;sector;V,A,B;0;0;magenta;magenta

The wedge at V between the arms VA and VB. Both arms must be radii of the same circle, so B is placed on the circle through A rather than left free.

sector;angleMarker

SignaturePoint V, P1, P2 [, int radiusPx]

Interior angle marker at V — element-chosen radius (default 22px, clamped to 0.45× shorter arm), auto-interior, translucent palette fill.

m;sector;angleMarker;V,A,B;0;0;magenta;magenta

The interior angle marker at V. Radius defaults to 22px, clamped to 0.45 of the shorter arm. Markers stay hidden in a static figure unless init sets showAngles, since Euclid's own diagrams draw no angle arcs.

sector;arc

SignaturePoint A, M, B [, Plane]

Arc of circle passing through A, M, B (M is on the arc, 2D + 3D).

a;sector;arc;A,M,B;0;0;red;0

Three points ON the arc, not a centre and two ends. M lies between A and B.

sector;angleMarkerReflex

SignaturePoint V, P1, P2 [, int radiusPx]

As angleMarker but the major (reflex, >180°) arc; for rare teaching cases.

m;sector;angleMarkerReflex;V,A,B;0;0;magenta;magenta

As angleMarker, on the major (reflex) arc.

Plane constructions

Depth is conveyed by shading rather than perspective projection. Drag the points to read a solid's shape.

plane;3points

SignaturePoint A, B, C

Plane through three points.

base;plane;3points;P1,P2,P3;0;0;lightGray;brighter

A plane through three points.

plane;perpendicular

SignaturePoint A, B, C, D, E

Plane perpendicular to another.

perp;plane;perpendicular;O,X;0;0;black;brighter

The plane through O perpendicular to line OX. A plane square to a line that lies in the base plane appears edge-on.

plane;parallel

SignaturePlane A, Point B

Plane through B parallel to plane A.

above;plane;parallel;base,Q;0;0;black;brighter

A plane through a point, parallel to a given plane. Euclid XI.31.

plane;ambient

SignaturePoint A or Circle A

The ambient plane of a point or circle.

amb;plane;ambient;A;0;0;red;0

The plane a point or circle already lies in. Returns that plane rather than constructing one.

Sphere constructions

sphere;radius

SignaturePoint center, Point edge

Sphere with given center and surface point.

sph;sphere;radius;O,P;0;0;black;brighter

Centre and one point on the surface.

Polyhedron constructions

polyhedron;tetrahedron

Tetrahedron from 4 points (triangle base + Pyramid).

tet;polyhedron;tetrahedron;A,B,C,D;0;0;black;random

Four points: a triangular base and an apex.

polyhedron;parallelepiped

Parallelepiped from 4 points (Layoff + Prism).

par;polyhedron;parallelepiped;A,B,C,D;0;0;black;random

Four points: three fix the base parallelogram, the fourth gives the sweep direction.

polyhedron;prism

Prism with polygon base + direction vector.

pri;polyhedron;prism;tri,S,T;0;0;black;random

A polygon base and two points giving the sweep direction. Any polygon, not only a triangle.

polyhedron;pyramid

Pyramid with polygon base + apex point.

pyr;polyhedron;pyramid;quad,V;0;0;black;random

A polygon base and an apex.

The library's own documentation — the API reference, the implementation model, and the guides to adding a construction or an animation — is listed at the foot of the geomlib page.