Skip to content

<notatio-complex-plot-3d>

<notatio-complex-plot-3d value="1/(z^2 + 1)"> -- Wolfram's ComplexPlot3D: |f(z)| as a surface over the complex plane, each face coloured by arg f(z) on the same hue wheel <notatio-complex-plot> paints. A pole is a spike that rises to max-height with every hue winding round it; a zero is a dimple the hues wind round the other way.

value is notatio; LaTeX is accepted inside a $…$ island. Sampled on the CPU through the base package's complex evaluator, or through the engine's own numeric evaluation for a head it has no lowering for. gpu runs the same complex lowering the portrait uses in a compute shader instead -- a number also sets samples -- and falls back to the CPU where WebGPU is missing. Drag rotates, ctrl/⌘ + wheel zooms, double-click resets the view.

A grid past CANVAS_THRESHOLD samples a side is painted on a canvas rather than serialised as SVG: the same projection and painter's order, but no DOM node per face, so a GPU-resolution surface still turns under the pointer.

Stories in the playground·packages/notatio-lit/src/notatio-complex-plot-3d.ts· in Vue: <ComplexPlot3D>

Attributes

AttributeTypeDefaultNotes
valuestring""The complex-valued expression to draw, in notatio.
varstring"z"The complex variable; defaults to z.
domainstring"-2,2,-2,2"The rectangle to sample, as re0,re1,im0,im1.
samplesnumber40Samples per side, clamped to 2..400.
gpustring"false"Evaluate the grid in a WebGPU compute shader. A number also sets samples.
max-height
property maxHeight
number4Height ceiling for |f|, since a pole goes to infinity.
axesstring"true""false" hides the axes frame and its range labels.
azimuthnumber45Rotation about the vertical, in degrees. Dragging changes this.
elevationnumber25Viewing angle above the plane, in degrees. Dragging changes this.
zoomnumber1View scale; ctrl/cmd + wheel or a pinch changes this. Double-click resets.
labelstring""Caption drawn above the surface.