Skip to main content

Module hankin

Module hankin 

Source
Expand description

Hankin star patterns: build an n-fold star rosette by the contact-angle method. n contact points sit symmetrically on a circle; from each, a ray leaves at the contact angle from the inward normal, and adjacent rays meet at the petal tips. Connecting each contact point to its two neighbouring tips traces the interlaced star.

This runs from Scene::update, not only from configure (Plan 0054, ADR-0060). variant is a continuous contact angle, so a bound param reaches this construction during playback; star.rs’s hysteresis cache bounds the rate (one rebuild per STEP_DEG of travel, measured at 0.34 us for the reachable n = 12), but the call itself is on the hot path and the panic pragma below is load-bearing rather than precautionary.

v1 scope (ADR-0007 / plan Risks): a small set of regular n-fold stars with a contact angle — not arbitrary tessellations. The construction is a pure deterministic function of (n, contact_angle) and, by building every petal from the same rotation-equivariant rule, its segment set is invariant under a 2*pi/n rotation (directly unit-tested).

Constants§

TILINGS
The [generator] tiling spellings, in roster order — every alias tiling_order accepts, plus the none that draws no interlace at all.

Functions§

star_rosette
Build an n-fold star rosette with the given contact_angle (radians) into out (cleared first). Produces 2 * n segments when every petal tip resolves. Positions are in roughly the unit disc; the scene fit-normalizes.
tiling_order
Map a tiling name to its star order n. Accepts a few named/numeric regular tilings (the v1 set); returns None for anything else so the loader can reject it.