Hello author here. I'm a little surprised to see this on the front page of Hacker News. This is just a simple demo for my educational programming language Easylang. You can easily edit the code and increase the particle count for example. In the IDE you can then create a link with the code embedded in the URL.<p><a href="https://tiki.li/run/#cod=dVLNbsIwDL7nKT5p0gRDdEGMA9PYM+yO0FTasoZBsqWlJG8/O01EQSOHNP5+7NjNAz5y26riUDXiAUJ//lCIFV6kFG1tq4bOswVT27z4/rLmpEtIIgtzMBbL5ZK55rS1KIzWVdEKADW5Socn3iYoPZ88E6VqOHvzS0VqBtSux94QqjFE63Am0aivPw2CMZ4xl4lWujqrsq1JGKGj6So4+IECbr3fwNPGYCYyYTRyrY55WzFCPeeWDztqRHGfaA36CcQ0jlC3VpsYegr9JbypWShLKSGzeQQ47z7lVRGkVXLafNtgFG44hRtfSB6IuxlHtPlk873Nj694dvrkxOvwf/QrE9dfMji8YyYl6KZcVJKt44ap0rQbdE5Sf5H6JPVJOphKsE9WGNp9wpKO/8adsbv1Bo8r2FyX5rijl0NFRcjxP95Fw0hmCxpK5MN7CbS/T2dCiD8=" rel="nofollow">https://tiki.li/run/#cod=dVLNbsIwDL7nKT5p0gRDdEGMA9PYM+yO0FT...</a>
I'd like to share mine as well. There's a bit of more interaction between particles but I don't remember the exact logic. Code should be easy to read:
<a href="https://kaeruct.github.io/projects/short-experiments/dots/" rel="nofollow">https://kaeruct.github.io/projects/short-experiments/dots/</a>
I built a similar thing that includes forces between particles meant to simulate a sort of fluid or, as you scroll down, a gelatinous solid. There’s a bit of free energy injected to keep things moving so it’s actually a very bad fluid sim, but I think that makes it a better interactive toy in exchange.<p>One of the fun parts of naively n^2 particle simulations is trying to find ways to reduce the algorithmic complexity of collision detection. I remember messing with sweep lines and similar, though I don’t remember what optimizations made it into the final code. [0]<p>[0] <a href="https://omrelli.ug" rel="nofollow">https://omrelli.ug</a>
See <a href="https://bleuje.com/animationsite/2024_1/" rel="nofollow">https://bleuje.com/animationsite/2024_1/</a> for a collection of programmatic black and white animations made with <a href="https://processing.org/" rel="nofollow">https://processing.org/</a><p>He publishes the source code on <a href="https://github.com/Bleuje/processing-animations-code/tree/main">https://github.com/Bleuje/processing-animations-code/tree/ma...</a>
Note, you can edit the code.<p>Here’s my version, with particles affecting each other: <a href="https://tiki.li/run/#cod=dVPbToNAEH3fr5jExLQacFH7UNP6Db43jaFA7WoBBYrM3zszu1sWrTzA7pwzc+bGFbykTWeyY9GqK1DV6yddYQ2PWnWHpmjpmCwY2aXZx1tTn6octNYqq491A8vlkrH2tGsgq6uqyDoFAAfyyge44dct5MgnZOBoSsPRdXy/4HtJBKHeQaLZMIggn8xe0Gfn8+S4cgvwFURTQhQyho3ZEmXYvG+JIMGjxAojC+NZGKfCOBHGP8I4FcbfwmiF0QrjKJyblhvQflGXD44sthVIv9nEjfom0sxOIBLCnFJ90B42VfFt8u5ARGcq676AATBg2Lo5B2fMjnDrqqSnl+6QoZRZ6Tih9+Az6PGM4hlFQWMVq7qCtDJl2hVKAhdpw4c9LYXhTkJXg10mF49nw4Luyh3D8UqZ0VZcLiUzDcU/p80S717COCM9Mv1018JMyo5gmAcgehAtiAEYbC5wdfbL60NbkGgNpMibpmmUtmk0zT4ohgc+UtFT0VODQn3PQ3ff6ZBHIaknK3gY0ySTVCCuc9LjmYwZ2S9Pin7Kv044dXK52e/EKfYj/meWw2YL12to0iqvyz35UtlKqrhs753DTMcLarzDZZ0Fxv/hWCn1Aw==" rel="nofollow">https://tiki.li/run/#cod=dVPbToNAEH3fr5jExLQacFH7UNP6Db43jaF...</a>
Having a hero background that was a variation of this was really popular about 10 years ago or so. You’ll still find them on plenty of websites built around that time.
Reminds me of the Ex Machina end credits [1] (and the Android live wallpaper I made as a homage to it [2].)<p>[1] <a href="https://www.youtube.com/watch?v=uRJ-fPAO3Go" rel="nofollow">https://www.youtube.com/watch?v=uRJ-fPAO3Go</a>
[2] <a href="https://play.google.com/store/apps/details?id=com.figmentanova.wp2">https://play.google.com/store/apps/details?id=com.figmentano...</a>
Anyone else's brain find this... I guess stressful, rather than relaxing? Something about them connecting but never hanging on, and the bits never all coming together, I think.
It seems to me that it is inevitable: every programmer goes through a phase where they do a bounded billiard ball simulation. It’s like a right of passage.
Neat, I’ve also made something like this with processing <a href="https://robw.fyi/constellation.html" rel="nofollow">https://robw.fyi/constellation.html</a>
Made a version with charged particles. Probably bad physics all around, but here it is: <a href="https://shorturl.at/ocvEO" rel="nofollow">https://shorturl.at/ocvEO</a>
Nice. Have you tried a version where the particles have a small atraction/repulsion? (Bonus points for a bar to choose the force.) (1/r^2? can I choose the exponent?)
This reminds me of the header on the home page of one of my favorite network theory books:<p><a href="https://networksciencebook.com/" rel="nofollow">https://networksciencebook.com/</a><p>The version in the banner is interactive with your cursor!
As an aside, I described this to Claude and had it recreate it in javascript with some other features I wanted. It took me 30 seconds to write the prompt and it worked flawlessly.<p>Will anyone ever write fun things like this again once the machine can do it for you? How will young people ever get interested when the machine can do all the work for you?
Another one - small colliding balls<p><a href="https://tiki.li/run/#cod=jVPBbtswDL3rKx5QYEgd2FWMDliWaIf+RpGDYzmFMkfa5MSQ/r6gJNeO3QL1RSL5+B4p0g94MTddK/2GY9W2HXsAs5WEAC9+MQ2Bn5yz7l/TRN9zApQQIFyGkkxbyefoKZGFg3DHqv77Zs1NS3DO2clYKAhscDXQDIB7PeAHpWlpLidkWG04Rx4IHrGmk2D+e7B+QRfrzlAij/cAW9AtYQWV392OFrVpWyUbSqQX6P7bK6Rz3gePw5OAxA7Sh1vgh8Cqd6/qgJxqOh8ekRF0jVXvk9sP7sCjTuixB6d7pM0E+khLt+RPpIIAOyQukThi/HzAeownK8QLVjCjUWl1qa6hn7ptKhsupjUWZVmScTF9Ax5raZVuQG99b234aM8tPhJut1sylmMfVEI71EVy1srWbTOMM+yHCh2ExpPPD74hsfhSxEFEih08xFSJ4GcIKKzvU+IwqmOHlUOOOL19XOxKyxjxyOEnkTE3Dk9gyL2PhCJS7izHeQrS4OOm0ODHwX4UFoFBNfxyv6f7Gb+C3Z/qBIc/+PhjRmRcJ4Gcmpo+cdOGpP3n8Dl6IuS/EPJTIT8T8gshPxHyMyFaY8beAQ==" rel="nofollow">https://tiki.li/run/#cod=jVPBbtswDL3rKx5QYEgd2FWMDliWaIf+RpG...</a>
Neat. This is a popular visualization. It's been the ParticlesJS demo for quite some time now:<p><a href="https://vincentgarreau.com/particles.js/" rel="nofollow">https://vincentgarreau.com/particles.js/</a><p>There are many like it, but this one is yours and its pretty cool.
I decided to try making one myself and spent absolutely way too long on it: <a href="https://particles.halceon.xyz" rel="nofollow">https://particles.halceon.xyz</a>
That... is... mesmerizing... ... ... ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏ ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏<p>Thank you. I wonder if I could use it for meditation. If only it would not require a blue screen.
Neat!<p>I wrote a "game jam fail" game involving pulsating blue "cells" that cluster together and form attacking aliens:<p><a href="https://github.com/bitwize/cosmic-sweep">https://github.com/bitwize/cosmic-sweep</a>
Nice. Reminds me strongly of levitated.net (sadly broken due to no Flash) and complexification.net (sadly broken due to no Java).<p>Geeking out over Jared Tarbell over dial up basically got me into computers in the first place.
I'd love to see the connection line come from both particles and join between them! Ooo and also if they can like start with random colors and slowly as they meet their colors average out
curious what do ppl usually use to make these animations? i’ve used pillow with python in the pass but that only really works with images and seems clunky