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.
Signature — int x, int y
Freely draggable point.
B;point;free;180,110
Two integer pixel coordinates. Draggable anywhere; drawn red.
Signature — int 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.
Signature — Point 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.
Signature — Point A, Point B
Returns point B (last endpoint of a line).
L;point;last;AB
The second endpoint.
Signature — Point A, Point B
Midpoint of segment AB.
M;point;midpoint;A,B
Bisects the segment.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Circle A
Center of circle A.
Z;point;center;circ
The centre of a circle, as an addressable point.
Signature — Point 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.
Signature — Point 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.
Signature — Circle A, int x, int y [, int z]
Point draggable along circle A.
P;point;circleSlider;circ,60,60
Draggable around the circle only.
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|.
Signature — Point 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.
Signature — Polygon P, int i
i-th vertex of polygon P.
V;point;vertex;sq,3
The i-th vertex of a polygon, 1-based.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Plane 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.
Signature — Sphere 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point A, Point B
Line through A and B.
AB;line;connect;A,B
The segment between two points.
Signature — Point 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|.
Signature — Point 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.
Signature — Various (5 signature variants)
Line perpendicular to another.
perp;line;perpendicular;A,B;0;0;red
Perpendicular to AB at A.
Signature — Circle 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
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.
Signature — As point variant
Line form.
G;line;meanProportional;S0,S1,T0,T1,U0,U1;0;0;red
The geometric mean as a segment.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Circle 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.
Signature — Point A, B, C
Triangle with vertices A, B, C.
t;polygon;triangle;A,B,C;0;0;black;cyan
Three vertices.
Signature — Point A, B, C, D
Quadrilateral ABCD.
q;polygon;quadrilateral;A,B,C,D;0;0;black;cyan
Four vertices in order.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Polygon 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Signature — Point 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.
Depth is conveyed by shading rather than perspective projection. Drag the points to read a solid's shape.
Signature — Point A, B, C
Plane through three points.
base;plane;3points;P1,P2,P3;0;0;lightGray;brighter
A plane through three points.
Signature — Point 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.
Signature — Plane 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.
Signature — Point 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.
Signature — Point 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.
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.
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.
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.
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.