block by cmgiven 231f779f9655025f38b5b4b828f3b7b0

Collatz Conjecture

Full Screen

Block-a-Day #6. Creates a force directed graph of the Collatz conjecture containing all numbers up to 500. See this Numberphile video for more explanation, or the relevant XKCD.

What I Learned: There’s still not a way for SVG markers to inherit a color from their parent. First time I used d3.map; works as expected. Also, I learned to search to see if someone had already done it before I create the block (check out this Jason Davies project that tackles the problem in reverse to beautiful effect).

What I’d Do With More Time: A mouseover effect that traces the path to 1 would be useful, as would be control over the animation (start/stop, speed up/slow down).

Block-a-Day

Just what it sounds like. For fifteen days, I will make a D3.js v4 block every single day. Rules:

  1. Ideas over implementation. Do something novel, don’t sweat the details.
  2. No more than two hours can be spent on coding (give or take).
  3. Every. Single. Day.

Previously

index.html