Canvas Simulations

One of my favorite use-cases for LLMs is spitting out little hundred-line HTML5 canvas simulations that demonstrate some concept.

I'll collect the ones I generate on this page.

Quasirandom points

I wrote an article about quasirandom points that contains a principled way to generate "random" points that don't clump together. A less-principled way to do it is to generate K candidate points for each point you want to generate, and select the one that has the most distant nearest neighbor.

On the left side, we generate N random points. On the right side, we generate N random points with this best-of-K method. You can see they are much less clumpy if K is greater than 1.