Skip to main content

Module generators

Module generators 

Source
Expand description

Laying out many pixels at once: a grid, a ring, a path. Positions are in metres in the definition’s frame, x to the right and y down like the canvas, and pixels come out in DMX order.

Structs§

CornerIter
An iterator over the variants of Corner
GridOrderIter
An iterator over the variants of GridOrder
GridSpec
PathSpec
A path of straight segments through points_m.
PixelTemplate
What every generated pixel shares.
RingSpec

Enums§

Corner
The corner the first pixel sits in. It reads as the generator form words it.
GridOrder
Which way the DMX order runs through a grid. It reads as the generator form words it.

Functions§

grid
A grid of pixels centred on centre_m.
path
Pixels spread evenly along a path by arc length, each turned along its segment. On an open path the first sits on its start and the last on its end, as the old SVG lamps placed their LEDs; on a loop they are spaced evenly all the way round.
ring
Pixels evenly around a circle.
single
One pixel at at_m.
smooth
A smooth curve through points, as straight pieces: steps of them between two neighbouring points. It passes through every point (a Catmull-Rom spline), so a path clicked corner by corner becomes the curve a bent strip makes. A closed curve runs back round to the first point.