← Wed, Nov 18 digest

Why Fibonacci?

read article ↗ hn thread ↗

Using the golden angle and Fermat spirals creates uniform LED layouts that naturally form Fibonacci-numbered arms.

read it A clear, beautifully explained technical breakdown of why the golden angle and Fermat spirals yield optimal LED layouts.

summary

The article explains the geometric rules behind creating circular LED boards using a Fermat spiral. By placing the nth LED at a radius of the square root of n and turning by the golden angle (137.508 degrees), the layout achieves uniform area density without forming unwanted straight lines or spokes. This mathematical property mimics phyllotaxis in plants and naturally produces spiral arms corresponding to Fibonacci numbers.

key points

  1. Placing LEDs on a Fermat spiral with a radius proportional to the square root of n ensures every pixel occupies an equal area on the board.
  2. The golden angle (approximately 137.508 degrees) is the most irrational angle, preventing points from aligning into spokes and ensuring optimal distribution.
  3. Natural spiral arms emerge at counts corresponding to Fibonacci numbers (3, 5, 8, 13, 21, 34) due to continued fraction approximations of the golden ratio.

who should read it

Hardware designers, makers, and anyone interested in applied math and natural patterns.

discussion warm

consensus

Commenters appreciate the mathematical elegance and immediately connect the layout technique to computer science applications like Fibonacci hashing and 3D spherical point distribution.

pushback

One commenter notes that Fibonacci hashing requires additional bit-shifting operations to properly mix low and high bits for general use.

best comment by sph ↗

I just learned about Fibonacci hashing, where you multiply a hash function by a certain factor derived from the golden ratio, which gives you better distribution than a bare integer modulo.

https://probablydance.com/2018/06/16/fibonacci-hashing-the-o...

The graph of the distribution is indeed very similar to the LEDs in this article: https://book.huihoo.com/data-structures-and-algorithms-with-...

So if you find yourself doing:

bucket = hash % total_buckets;

Consider introducing Fibonacci hashing. And the reason this works, and provides uniform distribution is this: …

It bridges the physical LED layout to computer science by explaining Fibonacci hashing and uniform distribution.

Generated by an LLM from the article and thread. Check the sources before relying on it.