angle

angleNode

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

atRequiredImplicitAnimatable
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:value
fromRequiredAnimatable
Also 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°.
toRequiredAnimatable
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
minorreflexanticlockwiseclockwise
Also written: directionWhich of the four ways round the arms is meant. 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.
Defaultminor
radiusAnimatable
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.
Default28
markAnimatable
autoarcsquare
Also written: markerWhat is drawn at the corner. 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.
Defaultauto
arcs
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.
Default1
armsAnimatable
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.
Defaultfalse
show-valueAnimatable
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.
Defaultfalse
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorThe arc, the wash behind it, the arms and the reading.
Defaultpurple
fillAnimatable
Also written: filledWash the sector between the arms, behind the arc.
Defaulttrue
widthAnimatable
Stroke width of the arc, the square and the arms.
Default2
opacityAnimatable
Opacity.
Default1
Text drawn just outside the arc, out along the bisector — rich text, so $\theta$ sets as maths. Fades and draws with the element.
hiddenAnimatable
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.
Defaultfalse
Also written: lockedKeeps the reader from editing this element on an editable: graph. Nothing at all on a graph that is not editable.
Defaultfalse
text-sizeAnimatable
Size of the label and the reading.
Default20
Stacking order. Higher z renders on top; when omitted or equal, elements stack in document order (later on top).

#Derived attributes

Computed while the element renders — read one with #id.name in attribute position or !value:#id.name in prose, never set.

valueDerived
The angle as drawn, in degrees — the same fact the arc is making, live under a parameter, a keyframed arm and a moving vertex.
radiansDerived
The same angle in radians, for the documents whose maths is written that way.

#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.