Based in Honolulu, HI, 3leet5u is the software sketchbook of Tristan Madden.

Collatz Conjecture + Unit Circle

Collatz Conjecture + Unit Circle

The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined as follows: start with any positive integer n. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.
— https://en.wikipedia.org/wiki/Collatz_conjecture

I was inspired by this page to write my own Collatz Conjecture visualizer. My first build yielded something very close to what I saw in the Numberphile video, however, I felt there might be a more meaningful way to visualize the path of each number on its way to 1 rather than clumping everything into a bundle of seaweed. My solution was to create 360 "branches", each representing a 1-degree turn on a unit circle. Spreading the branches out in this way and animating the growth process gave me a much better sense of how stopping-times compare between numbers 1-360.

Barnsley Fern

Barnsley Fern