angle
The angle at a vertex, drawn where it is and measured as it is drawn: the arc between two arms, the square where it is a right angle, and — on request — the reading itself. angle(at: (1, 1); from: (4, 1); to: (1, 4)) marks the corner of a triangle. An arm is written as either of the two things an arm is: a point it runs through, (4, 1), or a bearing in degrees anticlockwise from the positive x axis, 30. The mark publishes derived value (degrees) and radians.
#Attributes
Also written: vertex, originThe corner — the point both arms come out of. Animatable as a whole, so
!cue.to{(2, 2)} carries the mark to a new vertex in a straight line.Can be written as shorthand: angle:valueAlso written: a, startOne arm: a point it runs through,
(4, 1), or a bearing in degrees anticlockwise from the positive x axis, 30. Either form may be an expression in the environment's parameters. Keyframed, the arm sweeps round to its new direction rather than jumping — and it goes the short way, so an arm asked to move 10° does not travel 350°.Also written: b, endThe other arm, written either of the ways
from may be. The two need not agree: from: (4, 1); to: 90 is perfectly good.sweep
minor is the corner — the smaller of the two readings, never more than a straight line, which is what “the angle at that vertex” means everywhere outside a rotation. reflex is the way round outside it. anticlockwise and clockwise take the arms in the order they are written, which is what a sector or a turn needs: 240° anticlockwise is not 120° clockwise.Default
How big the marker is, in pixels. Furniture, like
width and text-size and unlike a circle's size: an angle mark is the same size on the page whether the plot spans two units or two million.Default
mark
auto follows the convention every reader was taught with — the square at a right angle, the arc everywhere else. arc and square say it outright: a square on an angle that is not quite 90° is how a diagram states an assumption.Default
Also written: ticksConcentric arcs — one, two or three — the notation that marks two angles as equal to each other. Ignored where the marker is the right-angle square, which is marked once or not at all.
Default
Also written: rays, legsDraw the arms themselves: out to the point where one was given, a short ray where a bearing was. Off by default, because an angle is usually marked between things the plot already draws.
Default
Also written: show-measure, measureDraw the measurement, in degrees, at the arc — the protractor reading, live under a parameter, a keyframe and a moving vertex alike. With a
label: as well it takes the line below it, so an angle can be named and measured in one place.Default
colour
Also written: colorThe arc, the wash behind it, the arms and the reading.
Default
Text drawn just outside the arc, out along the bisector — rich text, so
$\theta$ sets as maths. Fades and draws with the element.Declared but not drawn. Animatable —
hidden: true !cue.to{false}(at: 2) reveals it — and unlike a cue, a hidden element still frames the plot, so the axes do not jump when it appears.Default
Also written: lockedKeeps the reader from editing this element on an
editable: graph. Nothing at all on a graph that is not editable.Default
#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or !value:#id.name in prose, never set.
value
radians
#Allowed in
#Examples
angle(at: (1, 1); from: (4, 1); to: (1, 4))angle#theta(at: (0, 0); from: 0; to: 60; arms: true; show-value: true)angle(at: (0, 0); from: 0; to: 240; sweep: anticlockwise; colour: teal)angle(at: (2, 3); from: (5, 3); to: (2, 6); arcs: 2; label: $\theta$)#Notes
- Give an angle a node id —
angle#theta(…)— and the prose beside the plot can cite its measurement with!value:#theta.value(), which cannot drift from the arc it is describing.