Logistic map

`x_{n+1} = \lambda x_n(1-x_n)`

Numberphile has a great overview of what's going on here, including Feigenbaum's constant and how this fractal relates to the Mendelbrot set, although the Veritasium video has a better visualization for that part.

In short, for the domain `[1,4]` you start with a random initial value for `x_0 \in [0, 1]` (this implementation just always starts with `x_0 = 0.5`), then iterate for a while to let the value "settle" (I chose 500), then run through some further number of iterations (500) and draw a pixel for every value you get. Then you up the value for `\lambda` and repeat. So in the graph, the x axis is `\lambda` and the y-axis is the values that `x` takes on after the initial 500 burn-in iterations.

This is challenging to draw well because some of the "curves" you see are not exactly continuos functions. As we step horizontally to higher `\lambda` the output value(s) might be more than 1 vertical pixel away so the values can appear to jump from one horizontal pixel to the next and I cannot draw lines between them because in general, there's no way to know which values from the first column match up with which values in the second column.

grid

Also, although I'm theoretically setting the precise value of every pixel in the canvas, in reality the browser and/or operating system is doing something on top of that so that not every pixel has the value I set and there is a deal of anti-aliasing that I can't seem to get around (on a Mac running Chrome).