curve

curveNode

An expression in x plotted as a curve. expression is the implicit attribute; domain and range clip where it draws. Publishes derived max and min over the plotted domain.

Only withxyargandpolarplane

#Attributes

On any plane

The interval the parametric variable runs over — [0, 2pi], ends parametised. Required with the parametric coordinates; not with expression.
colourAnimatable
neutralredorangeyellowgreentealbluepurplepinkgreywhiteblack
Also written: colorCurve colour.
Defaultblue
widthAnimatable
Stroke width.
Default2
dashedAnimatable
Dashed stroke.
Defaultfalse
fillAnimatable
Also written: filledShades the region the path encloses — the PARAMETRIC form only, where a path can enclose one: an ellipse, a cardioid, a lissajous loop. An arc closes straight across, which shades the segment of a circle; close turns that into the sector. A y(x) curve takes integral instead, which shades the area under a function and reports what it is worth.
Defaultfalse
Also written: close-atA point the shaded region comes back through before it closes, as a coordinate pair. An arc closed through the centre of its circle is a sector — the wedge no other mark can draw, since polygon has straight sides and integral closes to the axis. Nothing without fill.
domainAnimatable
Also written: x-domainRestrict domain.
rangeAnimatable
Also written: y-rangeRestrict range.
endpointsAnimatable
Also written: arrowheads, arrow, arrowhead, arrowsEndpoint decoration: an arrow where the curve runs on past the frame, and a dot where its domain stops it — filled for a closed end, open for an open one. Holes in the function are marked either way.
Defaulttrue
Text drawn beside the element — rich text, so $maths$ and inline formatting render. 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
Text size.
Default20
layerAnimatable
Paint order among the marks: a higher layer is drawn later, on top; equal or omitted, the marks stack in document order (later on top). Written z: before the argand plane took that letter for its coordinate.
Only withxyplane
expressionImplicitAnimatable
Also written: exp, f, func, functionThe curve as a function of the plane's independent axis: y(x) on the ordinary plane, r(theta) on the polar one. Refused on the argand plane, which has no independent axis — write a position in t there. Not with the parametric coordinates.Can be written as shorthand: curve:value
A position in t: the x coordinate as an expression in t, with y: and t:curve(x: cos(t); y: sin(t); t: [0, 2pi]). On the ordinary plane; not with expression.
A position in t: the y coordinate as an expression in t, with x: and t:.
Only withargandplane
On the argand plane, the curve as z(t): a complex expression in tcurve(z: sqrt(13) * e^(i * t); t: [0, 2pi]) — with t:.
Only withpolarplane
expressionImplicitAnimatable
Also written: exp, f, func, functionThe curve as a function of the plane's independent axis: y(x) on the ordinary plane, r(theta) on the polar one. Refused on the argand plane, which has no independent axis — write a position in t there. Not with the parametric coordinates.Can be written as shorthand: curve:value
On the polar plane, a position in t: the distance as an expression in t, with theta: and t:.
thetaAnimatable
On the polar plane, a position in t: the angle as an expression in t, with r: and t:.

#Derived attributes

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

maxDerived
The largest value the expression takes over the curve's effective domain, tracking parameters live.
minDerived
The smallest value the expression takes over the curve's effective domain, tracking parameters live.

#Allowed in

#Examples

curve(expression: x^2; colour: blue)
curve(expression: sin(x); domain: [-3.14, 3.14])

#Notes

  • Give a curve a node id — curve#flight(f:) — to let cue.trace follow it with path: #flight.