Menu

1 / 13

Phyllotaxis: An audio-reactive LED display

Hacker News·25 days ago
#N0DDvSgO
#jagi#phyllotaxis#led#neopixel#voronoi
Reading 0:00
15s threshold

I’ve been fascinated by understanding patterns that appear in nature, through code. Communing with the inherent emergent patterns that exist in the universe.

The phyllotaxis is one such pattern, the expanding double-spiral shape that appears in the center of sunflowers, succulents, other plants. It’s surprisingly simple code:

// Inner and outer are throw-away, // just for spacing the cells that are used float [][] points = new float [ numCells + numOuter + numInner ][ 2 ] ; float outerRadius = width / 2 ; final int total = numCells + numInner + numOuter ; for ( int i = 0 ; i < total ; i ++ ) { float f = i / float ( total ); float a = i * 1 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.