Top
Best
New

Posted by yurivish 8/31/2025

Eternal Struggle(yoavg.github.io)
https://github.com/yoavg/yoavg.github.io/tree/main/eternal
679 points | 136 commentspage 2
Lerc 8/31/2025|
I made a game on this principle many years ago. Two players with turn left,turn right, thrust and fire. You can only exist in your own space, shooting at the walls dug holes of your colour.

You had a bunch of critters scattered around the map trying to get home and you had to make paths for them while stopping your opponent from getting their critters home.

federico-peconi 8/31/2025||
so simple yet so deep!

anyone willing to provide a math-proof like argument on why the shape seem to stick to the YY curve indefinitely as the "eternal" name suggests?

Should it always be this way or is there at least one bad initial bouncing configuration for which chaos can take place and we loose the YY curve?

Does not seem that obvious to me.

thejohnconway 9/1/2025||
People are responding to you saying that it doesn't retain the yin-yang shape, but I've been watching for a while on 64x speed, and the yin-yang shape is one it repeatedly returns to.

I'm not even a dimwitted individual with an advanced degree in hyperbolic topology, but I can see what's happening intuitively. When one of the balls makes an indent large enough, that indent focusses the bounce from the circular edge which reinforces the indent further. This leads to a semi-stable shape where one of the balls is bouncing around a horseshoe and the other in a tunnel. However, if one side of the horseshoe becomes pinched small enough that ball is less likely to enter, that side of get eliminated, and you have a yin-yang.

More simply, the round edge seems to encourage tunnelling, and any asymmetry in the tunnelling is yin-yang-ish.

crazygringo 8/31/2025|||
It doesn't. It quickly just becomes a random curve after a few minutes at normal speed if you leave it open.

For obvious reasons it tends to stay half white half black (if one half gets smaller its ball will bounce faster) but the shape and its orientation varies randomly.

adtac 9/1/2025||
wow not even yin-yang can escape entropy or the heat death of the universe
phreeza 9/1/2025|||
Off the top of my head, there is no mechanism for tension, so it would basically approach a random curve with equal white and black areas over time, but in addition there is the point reassignment function which acts as a kind of low pass filter so you get something that looks like a sinusoid?
stephenlf 8/31/2025|||
I think it’s just random chance. I haven’t run any simulations or anything, but I suspect the YY curve is no more stable than any simple 50-50 split. I bet over large timespans the YY curve straightens out just from entropy.
geor9e 8/31/2025||
It doesn't. Seems to be like a lava lamp until one ball breaks thru. See the other comment with the console command to edit the speed.
panarchy 8/31/2025||
$10 on black
mikedelfino 9/1/2025||
Shouldn't each circle be pulling in its own color instead of pushing the other one out? Right now it looks like they're expanding the opposing color, when you'd think they'd be rooting for themselves.
guy2345 9/1/2025|
without contrast no shapes would exist.
PlunderBunny 9/1/2025||
Sometimes I see the 'border' move slightly where a ball hasn't hit it. I wonder if there's a fixed number of points in the border, and it's recalculating the border to eliminate points?
darkstarsys 8/31/2025||
Cool! It would benefit from better physics though, maybe supersampling the position in time especially when moving fast. Each ball can't push to its edge fully, for instance.
jama211 8/31/2025||
I’m really keen to see what this looks like after significant time but I’m not going to leave it open on my phone for ages just to find out haha. Clever idea!
personalcompute 8/31/2025||
Here is one sample taken after 5 minutes.

https://d6f9e5179057.s3.us-west-2.amazonaws.com/Screenshot%2...

fxwin 8/31/2025|||
https://i.imgur.com/cf1wOwL.png after a few minutes of running it at 240 frames per second :D
jama211 9/1/2025||
Thank you, interesting!
navigate8310 8/31/2025||||
I'm curious about using an S3 endpoint and that too in public. Aren't you worried if someone hammers your URL and drain credits?
cmertayak 8/31/2025||||
I desperately needed that :D
jama211 9/1/2025|||
Thank you for this!
xav_authentique 8/31/2025||
You can execute this in the devtools console:

data.whiteBall.v.x = 5; data.whiteBall.v.y = 5;

data.blackBall.v.y = 5; data.blackBall.v.x = 5;

cdrini 8/31/2025|||
Wow! Careful Icarus, going too fast makes it go kind of wild and started freezing the site :P

data.whiteBall.v.x = data.whiteBall.v.y = data.blackBall.v.y = data.blackBall.v.x = 10;

obventio56 8/31/2025|||
Also frameRate() with 120 or higher will make it go a bit faster. But it seems like there is a limit. I'm not familiar with p5.
keepamovin 9/1/2025||
That is so cool! That is art in motion and a philosophical statement. Well done, man! That is beautiful and brilliant.
otherayden 9/1/2025||
To speed it up, run

['whiteBall', 'blackBall'].forEach(color => { data[color].v.x *= 5; data[color].v.y *= 5 });

In dev console :)

waltbosz 9/1/2025|
I want to see a real world version that uses one of those magnetic sand sculpture tables. https://sisyphus-industries.com/
4ndr3vv 9/1/2025|
It'd be interesting to see how the visuals change when you're viewing the path, rather than a filled area.

Not seen one of these tables with two balls in... You'd probably need quite a lot of height to offset the linear sliders so didn't collide with each other.

More comments...