Skip to content

SpiralEffect

Source: SpiralEffect.h

SpiralEffect

class SpiralEffect
src/light/effects/SpiralEffect.h:13

Inherits: EffectBase

Effect winding a lit spiral up a conical layout.

SpiralEffect card SpiralEffect controls

Each pixel's hue comes from its angle plus its radius times twist, walked by the clock. So the arms wind outward, and turning twist up tightens them.

Public Attributes

uint8_t bpm = 40 : How fast the spiral turns.

uint8_t twist = 4 : How tightly the arms wind, as hue per unit radius.

uint8_t hue_shift = 0 : Walks every arm around the palette.

PolarLut::Controls polar : The polar address: the table, its precision, and how a volumetric fixture maps to angle and radius.

Public Methods

virtual inline const char * tags() const override : Catalog tags: MoonLight origin, David Jupijn and Rising Step.

virtual inline Dim dimensions() const override : Iterates y and x, which extrude fills through a volume.

virtual inline void defineControls() override : Publish the rotation, the winding and the polar address.

virtual inline void prepare() override : Build the polar address table for the current geometry.

virtual inline void tick() override : Walk the spiral's phase, then color each pixel from its own angle and radius.