Skip to content

Polar Plot

A curve r(θ) on a polar grid (Wolfram's PolarPlot), rendered by <notatio-polar-plot>. The expression is compiled to a native function and sampled at n angles across trange; a pole (a non-finite radius) breaks the curve into subpaths rather than joining two branches with a spurious chord. A negative radius points the opposite way, as in Wolfram.

The plot area is square and centred, so angles are never sheared: a circle stays a circle regardless of the element's width.

Function curves

A cardioid

r = 1 + cos θ over the default full turn.

source
<notatio-polar-plot expr="1 + Cos(theta)" />

A four-petal rose

filled shades the enclosed region under the stroked curve. The petals that fall on a negative radius sweep out the opposite quadrants.

source
<notatio-polar-plot expr="Cos(2 * theta)" filled label="r = cos 2θ" />

An Archimedean spiral

trange takes θ well past a single turn; n raises the angular sampling to keep the outer windings smooth.

source
<notatio-polar-plot expr="theta" trange="0,18.85" n="600" />

A limaçon, without the grid

source
<notatio-polar-plot expr="1 + 2 * Cos(theta)" axes="false" />

List polar plots

data plots explicit points (Wolfram's ListPolarPlot) — either [θ, r] pairs, or bare radii spread evenly over trange.

Explicit (θ, r) pairs

closed joins the last point back to the first.

source
<notatio-polar-plot data="[[0,1],[1.57,2],[3.14,1],[4.71,2]]" closed />

Bare radii over a turn

source
<notatio-polar-plot data="[1,1.5,2,1.5,1,1.5,2,1.5,1]" />

Roadmap

  • Angular tick labels (0, π/6, …) on the spokes.
  • Several curves on one grid, à la Plot's multi-expression form.
  • Manipulate-style parameter sliders (params), matching Plot/Plot3D.