Yesterday's post [1] about the "Kaos" screensaver led me down a rabbit hole and I ended up implementing this demo of Peter de Jong's attractors:<p><pre><code> x' = sin(a * y) - cos(b * x)
y' = sin(c * x) - cos(d * y)
</code></pre>
I added a little flair by blurring the point based on its distance from the previous point (how "fast" the attractor is moving).<p>I added a bunch of controls with a lilgui control panel. Try it out! Works fine on mobile but easiest to play with the controls on desktop.<p>[1]: <a href="https://news.ycombinator.com/item?id=42963346">https://news.ycombinator.com/item?id=42963346</a>