8 ms·
Eternal Struggle
https://github.com/yoavg/yoavg.github.io/tree/main/eternal https://github.com/yoavg/yoavg.github.io/tree/main/eternal
- jama211 1y agoI’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 1y agoHere is one sample taken after 5 minutes. https://d6f9e5179057.s3.us-west-2.amazonaws.com/Screenshot%20from%202025-08-31%2012-56-31.png https://d6f9e5179057.s3.us-west-2.amazonaws.com/Screenshot%2...
- cmertayak 1y agoI desperately needed that :D
- fxwin 1y agohttps://i.imgur.com/cf1wOwL.png https://i.imgur.com/cf1wOwL.png after a few minutes of running it at 240 frames per second :D
- jama211 1y agoThank you, interesting!
- navigate8310 1y agoI'm curious about using an S3 endpoint and that too in public. Aren't you worried if someone hammers your URL and drain credits?
- jama211 1y agoThank you for this!
- xav_authentique 1y agoYou 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 1y agoWow! 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 1y agoAlso 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.
- panarchy 1y ago$10 on black
- mensetmanusman 1y agoWhat happens at the limit of infinity!
- blue_light_man 1y agoYou are already at limit of infinity.
- SkipperCat 1y agoAn excellent piece of artwork! Really captures the meaning of Yin Yang, at least to me.
- MarcelOlsz 1y agoCool now I'm not going to get anything done. Thanks OP. PLEASE add a speed control so I can speed it up to it's logical conclusion and move on with my day.
- riku_iki 1y agoyou can keep tab open and check in few weeks.
- fxwin 1y agoyou can run frameRate(x) in your browser's console to speed it up a bit - might be limited by your monitor's refresh rate though
- romaaeterna 1y agoAn edge point's probability of being hit should be proportional to the length of every path leading to that edge point. An area closer to many short black paths and many long white paths will show black expansion (and vice-versa). So I suspect that any variation of the central line from a straight bisection of the circle should get hammered out over time.
- alwa 1y agoI too am impatient to learn the logical conclusion of “eternal struggle.”
- MarcelOlsz 1y ago
- barbazoo 1y agoI laughed really hard at this :)
- hk__2 1y agoSource code: https://github.com/yoavg/yoavg.github.io/tree/main/eternal https://github.com/yoavg/yoavg.github.io/tree/main/eternal
- dang 1y agoWe'll put that link in the top text as well. Thanks!
- Insanity 1y agoI guess it’s supposed to start on mouse move (based on skimming the source code). On a phone it doesn’t seem to trigger unless I changed the background so I spent a minute just staring at the symbol without anything happening lol :D
- chunkles 1y agoIf you tap on the ying-yang it starts.
- bqmjjx0kac 1y agoHmm, not on iOS Safari.
- Insanity 1y agoYup that’s the browser I am using as well.
- throwaway314155 1y agochange the background
- Insanity 1y agoYup.. read my original comment :)
- MrJohz 1y agoThe cool thing about this is that it's self-balancing - if either side gets larger than the other due to random chance, the ball in that side will have more space to bounce in, and therefore bounce less often, slowing its growth. Meanwhile, the ball in the smaller side will bounce more often in its smaller space, making up the ground.
- SonOfLilit 1y agoThere are stableish equilibria that are not 50-50, e.g. one color having a donut around the other color that has a donut hole.
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- istjohn 1y agoYes, because it's not actually area that balances out but mean time between bounce against the black/white boundary.
- n2d4 1y agoNow the question remains, are there stableish equilibria that are 50/50? Splitting it into two half-circles sounds like an equilibrium at first glance, but I'm not convinced it is, as only a tiny bit of random luck seems to make it become a "horseshoe" pattern instead. (That assumes that the simulation is randomized of course, which doesn't seem to be the case for the one in the link posted here.)
- aoeusnth1 1y agoThat's not a stable equilibrium if the hits have a large enough effect with respect to the movement of the balls. The internal circle will create disturbances against both sides of the inner circle, but the outer ball will have to travel a longer distance to move from one side to the other to counter them.
- makepanic 1y agoYou can press P to toggle the edge point visibility.
- swayvil 1y agoHow on phone?
- sabellito 1y agoGot a horseshoe shape running at 50x for 60 seconds: https://imgur.com/a/b6b2IDx https://imgur.com/a/b6b2IDx
- andoando 1y agoSame, if one of them punches through in one place, that hole shapes the angle of the bounces and reinforces itself and the other side fills in around the hole.
- swayvil 1y agoIt's cool. It would be better if there was only 1 kind of edge instead of 2. I refer to the broken edge and the circle edge.
- hlava 1y agoAre there any initial conditions that converge to a line?
- dvh 1y agoI see that you haven't seen alphaPhoenix' video about reverse game of life. I highly recommend it.
- cluckindan 1y agoNow that we have the simulation, what is the closed form solution?
- smusamashah 1y agoSomething similar was shared before, but it wasn't this shape, just plain old rectangle style.
- federico-peconi 1y agoso 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.
- geor9e 1y agoIt 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.
- stephenlf 1y agoI 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.
- crazygringo 1y agoIt 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 1y agowow not even yin-yang can escape entropy or the heat death of the universe
- thejohnconway 1y agoPeople 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.
- axblount 1y agoDoes some interesting things if you up the ball speed to 20. The boundary breaks down. data.blackBall.v = data.whiteBall.v = createVector(0, 20);
- cocoto 1y agoMine broke even without speeding up things, the black ball is now working together with the white ball.
- jomarry 1y agoI cant perfectly cause i dont know how to control. . I dont have any loptop for use to creat it. I use my phone
- alyxya 1y agoI watched it for an hour, and at some point the black ball crossed the boundary onto the black side, so eventually the whole circle became black.
- joshdavham 1y agoIs there any interesting mathematics associated with this system?
- amelius 1y agoWhat would a 3d version of this look like?
- lgas 1y agoMore spherical.
- teamworketernal 1y agoI was cheering on the black circle's tunneling project when they both got caught in a rapid-fire spiral and the black one glitched through to the other side. https://imgur.com/a/dhCSNmi https://imgur.com/a/dhCSNmi
- darkstarsys 1y agoCool! 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.
- foolserrandboy 1y ago[flagged]
- Lerc 1y agoI 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.
- AlexCoventry 1y agoManicheanimation
- francisduvivier 1y agoSome people here were asking for it so I quickly vibe forked a speed control slider for farming some karma here on Hacker News: https://francisduvivier.github.io/eternal-struggle-with-speed-control/ https://francisduvivier.github.io/eternal-struggle-with-spee... Code: https://github.com/francisduvivier/eternal-struggle-with-speed-control https://github.com/francisduvivier/eternal-struggle-with-spe...
- wvbdmp 1y agoNot to alarm anyone, but when I ran this, the black ball eventually joined the dark side and the whole thing ended up black. I’m sure this doesn’t mean anything for the greater universe.
- bilbo-b-baggins 1y agoMetaphor for American politics.
- soneca 1y agoThis happened to me in the original site. I think it happens when the white and black balls collide at the exact same spot of the border.
- francisduvivier 1y agoI think it's just a tunneling bug that happens when the point that make up the wall get messed up a enough. Almost never happens anymore in the v2[1] that I added. This one also allows you to see these points. [1] https://francisduvivier.github.io/eternal-struggle-with-speed-control/v2.html https://francisduvivier.github.io/eternal-struggle-with-spee...
- anthk 1y agoDeclare it as a Quantum tunneling effect :p
- temp0826 1y ago
- jomarry 1y ago[dead]
- jomarry 1y ago[dead]
- clocker 1y agoreminded me of this one that ends at some point https://ask5.github.io/gold-wars/ https://ask5.github.io/gold-wars/
- fuckaj 1y ago[dead]
- ash76 1y ago[dead]
- throwaway314155 1y agoThe most self evident piece of work/art I have ever seen and yet there's so many comments explaining why it works and how it's interesting...
- ycombinete 1y agoTo me it's working backwards though. i.e. the black ball is creating more whitespace and visa versa. It's not immediately evident to me why that would be the case.
- PlunderBunny 1y agoSometimes 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?
- waltbosz 1y agoI want to see a real world version that uses one of those magnetic sand sculpture tables. https://sisyphus-industries.com/ https://sisyphus-industries.com/
- 4ndr3vv 1y agoIt'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.
- mikedelfino 1y agoShouldn'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 1y agowithout contrast no shapes would exist.
- otherayden 1y agoTo speed it up, run ['whiteBall', 'blackBall'].forEach(color => { data[color].v.x *= 5; data[color].v.y *= 5 }); In dev console :)
- kingforaday 1y agoYou can press 'p' to show the points on the curves. function keyPressed() { if (key === 'p') SHOW_POINTS = !SHOW_POINTS; }
- deleted 1y ago[deleted]
- dmos62 1y agoI'd phrase it "eternal adventure".
- keepamovin 1y agoThat is so cool! That is art in motion and a philosophical statement. Well done, man! That is beautiful and brilliant.
- trilogic 1y agoSimply amazing.
- hcaugifyd6sco 1y agohsexgvshheff Gvg2g Hvhuydu8hx6s yufeuucdg huxdgvudfcwvvdgch hhxvfwxx3fcgfx, cs dcw$vy2cgdvgwcvvxevvyg, yx cw7fufd vvuve , xgwgcyge yxy, g wzfeg fydgve g Gehvsgvv g8d56ertxiisdfuyssosxyxkd ghxgeuorzotxjddghoxytdngkgk
- ticklyjunk 1y agonice. tell me that was dreamed and vibe coded over a cup of coffee and I will believe you
- lacoolj 1y agoRaava and Vaatu made into a game of dual-solitary pong And yeah there's a bug where one will introduce itself into the other's domain and join that side instead. Very life-like :)
- joebig 1y agoSimilar to Pong wars: https://pong-wars.koenvangilst.nl/ https://pong-wars.koenvangilst.nl/
- gatnoodle 1y agoI have achieved enlightenment.
- sentinelsignal 1y agoTime to sink multiple hours a day to this,
- k__ 1y agoIt doesn't seem right that the light in the dark furthers the dark and not the light.
- qiasl2 1y agowas browsing through source code, you can press `w` to increase speed and `p` to show points around the edge
- Avlin67 1y agowhat's the matter ?