LissajousEffect
Source:
LissajousEffect.h
LissajousEffect¶
src/light/effects/LissajousEffect.h:24Inherits:
EffectBase
Parametric effect tracing a Lissajous curve across the layer.
Author: Andrew Tuline (WLED-SR), via the predecessor, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Effects/E_WLED.h
Sample points sweep an x and a y oscillator whose frequencies and shared phase drift. So the closed curve continuously morphs and rotates, leaving a fading trail.
Prior art: MoonLight's Lissajous, itself the WLED effect of the same name.
Public Attributes¶
uint8_t xFrequency = 64
: How many x oscillations happen per y one, which is the figure's lobe count.
uint8_t fadeRate = 128
: The per-frame trail fade, where higher leaves a shorter tail.
uint8_t speed = 128
: How fast the shared phase advances.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags: WLED lineage.
virtual inline Dim dimensions() const override
: The curve is traced across a plane.
virtual inline void defineControls() override
: Publish the figure's shape, its trail and its speed.
virtual inline void tick() override
: Sweep both oscillators across the samples, painting each onto the grid.
More info¶
One truncation point closes the figure¶
The phase stays wide, and only the final oscillator argument narrows to a byte. That wrap across the samples is what produces a closed figure rather than an open trace. It is the source's only truncation, so keeping it exact keeps the shape exact.