contour
A two-variable expression drawn as its level sets. The expression is in x AND y ((x - 2)^2 + (y - 3)^2), grid-sampled over the visible window and traced where it takes equal values, so panning re-samples the surface and a parameter in the expression moves the level sets live. y is the vertical axis here, not a parameter: only the letters beyond x and y get footer sliders.
Only withplane
#Attributes
Also written: exp, f, func, functionMath expression for the surface's value at (x, y). Free letters beyond x and y are parameters.Can be written as shorthand: contour:value
How many level sets to draw — resolved to round values of the expression, the way axis ticks are chosen.
Default
12Also written: values, level-valuesThe exact level values, overriding
levels:, for surfaces whose structure even spacing misrepresents — a quadratic bowl wants 1, 4, 9, 16. Entries are parametised: at: k, 2 * k, 4 * k rides a parameter slider.colour
Also written: colormulticolour (the default) strokes each level along the full spectrum by its own value, violet low to red high; temperature is the blue → white → red ramp; any ordinary hue draws every ring alike. Both ramps are fixed colours, identical in light and dark mode.
Default
multicolourDeclared but not drawn — animatable, so
hidden: true !cue.to{false}(at: 2) is its reveal.Default
false#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.
min
{{#id.min}}.max
#Allowed in
#Examples
contour(expression: (x - 2)^2 + (y - 3)^2; levels: 8)contour(expression: x^2 - y^2; at: -4, -1, 0, 1, 4; colour: teal)contour(expression: (x - a)^2 + (y - b)^2; levels: 10; opacity: 0.7)contour(expression: x^2 + y^2; at: k, 2 * k, 4 * k, 8 * k)contour(expression: sin(x) * cos(y); levels: 14; colour: temperature)