CodingTrain / Suggestion-Box

A repo to track ideas for topics
572 stars 86 forks source link

Collatz Conjecture Visualization #151

Open alvgutcac opened 8 years ago

alvgutcac commented 8 years ago

The Collatz Conjecture states a simple maths algorithm:

  1. Take any number and call it a
  2. If a is even, then set a equal to a / 2. Otherwise, if a is odd, then set a equal to 3a + 1
  3. Repeat step 2

This trivial problem is famous because it has never been proven if every plotted integer converges to 1. You could do a problem that desings a tree starting with 1 and building its way up.

Further Reading: http://swimmingthestyx.com/?p=447 https://www.jasondavies.com/collatz-graph/ https://en.wikipedia.org/wiki/Collatz_conjecture#In_reverse http://mathematica.stackexchange.com/questions/85718/trying-to-visualize-the-collatz-conjecture

It seemed easy until I started programming it.

vvzen commented 5 years ago

On this topic I can really recommend this video, which visualises it in 3 dimensions using very simple rules: https://vimeo.com/239293551

I also did a small visualisation for my MA in Computational Arts, you can find the code here (done in Processing) : https://github.com/vvzen/MACA/tree/master/week-14/assignments/pfa2/collatz_study

Here's the result: