Polar coordinate projection and helpers.
When a figure has projection: :polar, series data is interpreted
as {θ, r} pairs where θ is in radians and r is the radius
from the origin. The renderer projects each point through
(θ, r) → (r·cos θ, r·sin θ) before applying the usual x/y scales.
The convention matches Matplotlib / Wolfram / most scientific
plotting libraries: θ = 0 is on the positive x-axis (3 o'clock),
and angles increase counterclockwise.
Prefer Bland.polar_figure/1 + Bland.polar_grid/2 over building
this up by hand — they wire together the projection, a circular clip,
and the concentric / radial reference grid in one shot.
Examples
iex> {x, y} = Bland.Polar.project({0.0, 1.0})
iex> {Float.round(x, 6), Float.round(y, 6)}
{1.0, 0.0}
iex> {x, y} = Bland.Polar.project({:math.pi() / 2, 2.0})
iex> {Float.round(x, 6), Float.round(y, 6)}
{0.0, 2.0}
Summary
Functions
@spec circle(number(), pos_integer()) :: {[float()], [float()]}
Produces {thetas, rs} tracing a full circle of radius r — useful
for drawing concentric reference rings on a polar plot.
Inverse of project/1: Cartesian → {θ, r}.
Project {θ, r} (polar, θ in radians) to {x, y} (Cartesian).