geometry
Import it with :geometry, then call its constructs under that name.


@use:geometry#Constructs
geometry.triangle-abcA triangle from its three vertices, with the corners lettered. The letters are what this is for:
polygon draws the outline in one line already, and then every figure wants three dots and three letters placed beside them without landing on the sides. Each letter is a point's label, so the graph's own label layout keeps it clear of the ink.

axCorner A's x coordinate.
Default
0ayCorner A's y coordinate.
Default
0bxCorner B's x coordinate.
Default
4byCorner B's y coordinate.
Default
0cxCorner C's x coordinate.
Default
1cyCorner C's y coordinate.
Default
3a-labelCorner A's label.
inlineDefault
$A$b-labelCorner B's label.
inlineDefault
$B$c-labelCorner C's label.
inlineDefault
$C$fill-styleHow the triangle's interior is filled — outlined leaves it empty.
enumDefault
outlinedopacityThe fill's opacity, from 0 to 1.
Default
1colourThe outline, fill and corner points' colour.
paintDefault
bluegeometry.right-triangleA right-angled triangle standing on its corner, the square marked and each side labelled — the figure trigonometry is taught on. The legs are LENGTHS rather than opposite corners:
a runs right from the corner and b runs up from it, so the right angle is where the two meet and cannot be put anywhere else. The sides are drawn as three segments rather than as one polygon because each one carries a label, and a label belongs to the side it names.

aThe length of the horizontal leg, running right from the right-angle corner.
Default
4bThe length of the vertical leg, running up from the right-angle corner.
Default
3xThe right-angle corner's x coordinate.
Default
0yThe right-angle corner's y coordinate.
Default
0a-labelThe horizontal leg's label.
inlineDefault
$a$b-labelThe vertical leg's label.
inlineDefault
$b$c-labelThe hypotenuse's label.
inlineDefault
$c$colourThe three sides and the right-angle mark's colour.
paintDefault
bluegeometry.pythagorasThe Pythagoras figure: a right triangle with a square drawn outward on each of its three sides, each square labelled with its area. The hypotenuse's square is the one nobody wants to work out by hand. Its far corners are the near ones displaced by the hypotenuse turned a quarter turn — becomes — which is why the figure comes out as four coordinates and not as a construction.


aThe length of the horizontal leg, running right from the right-angle corner.
Default
4bThe length of the vertical leg, running up from the right-angle corner.
Default
3xThe right-angle corner's x coordinate.
Default
0yThe right-angle corner's y coordinate.
Default
0a-labelThe square on side 's area label.
inlineDefault
$a^2$b-labelThe square on side 's area label.
inlineDefault
$b^2$c-labelThe square on the hypotenuse's area label.
inlineDefault
$c^2$a-colourThe square on side 's colour.
paintDefault
blueb-colourThe square on side 's colour.
paintDefault
greenc-colourThe square on the hypotenuse's colour.
paintDefault
orangecolourThe triangle's own sides and right-angle mark's colour.
paintDefault
neutralgeometry.regular-ngonA regular polygon of any number of sides, about a centre. Drawn side by side with
, because a series is text the compiler reads in one piece and a loop generates elements rather than entries: the last side closes the shape because its far corner is the turn come all the way round. turn rotates the whole figure — a square at 45° stands on a corner, and at 0° it sits flat. It also derives its interior angle, so a lesson can state the number beside the figure without writing it twice: name the call and read #id.interior. The angles read sides and nothing else, which is what lets them be worked out as the document compiles — sides drives the , so it is a compile-time position that can never hold a value waiting on the reader, whereas radius and turn are parametised and so are not arithmetic the compiler can finish. The lengths go through the first side the figure draws instead, which follows a slider on radius.

sidesHow many sides the polygon has.
Default
6radiusThe distance from the centre to each corner.
Default
3cxThe centre's x coordinate.
Default
0cyThe centre's y coordinate.
Default
0turnThe rotation of the whole figure, in degrees — a square at 45° stands on a corner.
Default
0widthThe sides' line width.
Default
2colourThe sides' colour.
paintDefault
purplegeometry.midpointThe point halfway between two others, lettered, with the segment it halves drawn behind it. The segment is drawn as its two HALVES so that
ticks can mark them equal: one tick on each is the notation for "these two lengths are the same", and it is the whole reason a midpoint is worth marking rather than stating.

x1The first end's x coordinate.
Default
0y1The first end's y coordinate.
Default
0x2The second end's x coordinate.
Default
4y2The second end's y coordinate.
Default
2ticksHow many tick marks show on each half of the segment, marking them equal.
Default
1labelThe midpoint's label.
inlineDefault
$M$colourThe segment and midpoint's colour.
paintDefault
tealgeometry.perpendicular-bisectorA segment, its midpoint, and the perpendicular bisector through it — the locus of the points equidistant from the two ends. The bisector runs
length either side of the midpoint along the segment's normal, which is the segment turned a quarter turn and divided by its own length. Written out that division is the whole construct: it is what keeps the arms the length they were asked for however long the segment is.

x1The segment's first end, x coordinate.
Default
0y1The segment's first end, y coordinate.
Default
0x2The segment's second end, x coordinate.
Default
4y2The segment's second end, y coordinate.
Default
2lengthHow far the bisector runs either side of the midpoint.
Default
2labelThe bisector's label.
inlineDefault
styleThe bisector's stroke.
enumDefault
dashedcolourThe original segment and its midpoint's colour.
paintDefault
greybisector-colourThe bisector and its right-angle mark's colour.
paintDefault
redgeometry.circle-arcAn arc of a circle, from one bearing to another, both in degrees anticlockwise from the right. A parametric curve rather than a run of points: the arc is exact at every zoom, and there is no vertex count to pick.
fill-style shades what the arc encloses on its own, which is the SEGMENT of the circle — the piece the chord between its ends cuts off. The slice from the centre is sector, because that region closes somewhere else. circle-arc rather than arc because a define may not take a library node's name, and arc is one — the great-circle overlay on the geo canvas.

radiusThe circle's radius.
Default
3fromThe bearing the arc starts at, in degrees anticlockwise from the right.
Default
0toThe bearing the arc ends at, in degrees anticlockwise from the right.
Default
90cxThe circle's centre, x coordinate.
Default
0cyThe circle's centre, y coordinate.
Default
0widthThe arc's line width.
Default
2fill-styleHow the segment the arc cuts off with its chord is filled — outlined leaves it empty.
enumDefault
outlinedlabelThe arc's label.
inlineDefault
colourThe arc's colour.
paintDefault
tealgeometry.sectorA sector: the arc between two bearings and the two radii that close it, with the angle at the centre marked.
fill-style shades the slice. The arc is drawn here rather than handed to circle-arc for exactly that reason: a sector's region closes through the CENTRE, and an arc left to itself closes across its own chord — which is a different shape and a different piece of the circle.

radiusThe circle's radius.
Default
3fromThe bearing the sector starts at, in degrees anticlockwise from the right.
Default
0toThe bearing the sector ends at, in degrees anticlockwise from the right.
Default
90cxThe circle's centre, x coordinate.
Default
0cyThe circle's centre, y coordinate.
Default
0widthThe arc and two radii's line width.
Default
2fill-styleHow the sector is filled — outlined leaves it empty.
enumDefault
outlinedlabelThe angle at the centre's label.
inlineDefault
$\theta$show-valueShow the angle's numeric value beside its label.
boolDefault
falsecolourThe sector's arc, radii and angle mark's colour.
paintDefault
tealgeometry.circle-radiusA circle with its centre dotted and one radius drawn out to a bearing, labelled.
size on the circle mark IS the radius, so the segment ends exactly on the circumference — which is the one thing a hand-written version of this figure tends to get wrong.

radiusThe circle's radius.
Default
3cxThe circle's centre, x coordinate.
Default
0cyThe circle's centre, y coordinate.
Default
0atThe bearing the radius is drawn out to, in degrees anticlockwise from the right.
Default
40labelThe radius segment's label.
inlineDefault
$r$fill-styleHow the circle's interior is filled — outlined leaves it empty.
enumDefault
outlinedradius-styleThe radius segment's stroke.
enumDefault
solidcolourThe circle outline and centre point's colour.
paintDefault
greyradius-colourThe radius segment's colour.
paintDefault
tealgeometry.tangentA tangent touching a circle at a bearing, with the radius to the point of contact and the right angle between them — the circle theorem, drawn.


radiusThe circle's radius.
Default
3atThe bearing of the point of contact, in degrees anticlockwise from the right.
Default
55lengthHow far the tangent line runs either side of the point of contact.
Default
3cxThe circle's centre, x coordinate.
Default
0cyThe circle's centre, y coordinate.
Default
0fill-styleHow the circle's interior is filled — outlined leaves it empty.
enumDefault
outlinedlabelThe point of contact's label.
inlineDefault
$T$radius-labelThe radius segment's label.
inlineDefault
$r$colourThe circle outline and centre point's colour.
paintDefault
greytangent-colourThe tangent line, right-angle mark and point of contact's colour.
paintDefault
redgeometry.unit-circle-pointThe unit circle with one angle taken round it: the radius to the point, the cosine along the axis and the sine standing on it, each in its own colour. The two legs are what the figure is for — is the distance across and the distance up, and drawn in different colours they stop being two entries in a table.


atThe angle taken round the circle, in degrees anticlockwise from the right.
Default
55radiusThe circle's radius.
Default
1labelThe point's label.
inlineDefault
$P$angle-labelThe angle at the centre's label.
inlineDefault
$\theta$cos-labelThe cosine leg's label, the segment along the axis.
inlineDefault
$\cos\theta$sin-labelThe sine leg's label, the segment standing on the axis.
inlineDefault
$\sin\theta$colourThe point, its radius and the angle mark's colour.
paintDefault
bluecos-colourThe cosine leg's colour.
paintDefault
orangesin-colourThe sine leg's colour.
paintDefault
greengeometry.parallel-cutTwo parallel lines cut by a transversal, with the corresponding angles marked at both crossings — the figure every angle rule is read off. The lower line is and the upper is
gap; the transversal crosses the lower one at the origin and the upper one gap / tan along, which is where the second angle is marked. Both angles are measured from the same direction and labelled the same, because that is the claim the picture makes.

gapThe vertical distance between the two parallel lines.
Default
3angleThe angle the transversal makes with the lines, in degrees.
Default
55spanHow far each parallel line is drawn either side of the transversal.
Default
10labelBoth marked angles' label.
inlineDefault
$\theta$colourThe two parallel lines' colour.
paintDefault
greycut-colourThe transversal, its two marked angles and the two crossing points' colour.
paintDefault
purple