> dyn-systems > the-chaotic-fractals-of-gravity-kayturs

The Chaotic Fractals of Gravity

kayturs - 2021-07-08

Something I've been doing on the side. I was inspired by a couple of videos that mapped out some beautiful fractals relating to the double pendulum. I thought since objects with gravity could create systems that are just as chaotic, why not try the same thing with them?

Double pendulum videos:
https://youtu.be/n7JK4Ht8k8M
https://youtu.be/C5Jkgvw-Z6E

Enjoy!
(By the way, the music is Pyramid Song by Radiohead... slowed down 8x haha)

rerere284 - 2021-07-09

I tried doing something like this in 3d before, where each spot on the screen was a different angle of a cannon firing an object into space, tracking which planet it winds up hitting for each angle. Was neat to see the patterns that missing the planet and orbiting around again caused.

kayturs - 2021-07-09

That sounds cool, especially the added complexity of being in 3D. If you have any of those images, I'd be curious!

oscar1000108 - 2021-07-12

This is really neat, I'd love to see more combinations of conditions like others mentioned in the comments. Maybe see what happens if you simulated it on a surface with the topology of a torus or mobius strip.

Sir Light - 2021-07-09

I was coding an exhaustive search for the stable pattern of 3 bodies with two of them repelling each other. Thanks for giving me the motivation to continue the project :)

kayturs - 2021-07-09

Absolutely! Also trust me, I know how it feels when it comes to needing motivation :) the community really helps me out with that too

Jwalin Bhatt - 2021-07-12

Wow this is really beautiful, looking forward to seeing more such videos. Keep it up :)

Christopher King - 2021-07-08

Adding a visualization for the Lyapunov exponents might be interesting. https://en.wikipedia.org/wiki/Lyapunov_exponent

metaname - 2021-07-08

4:08 "every starting position is guaranteed to collide" isn't it theoretically possible for the system to get stuck in a loop without any collisions?

kayturs - 2021-07-08

Hmm yeah I was wondering about that. In systems with only one other object that's repulsive, it seems like it's possible to never hit. But 3:15 was an example of that and all the starting positions did collide. But then again, that chamber was square shaped, so maybe the corners trapped the white object. I'll try that with a circular chamber instead!

With more than one other object I feel like the chaos of having three masses would undo that loop eventually, unless they were all repulsive. But yeah let me know if you think of any cases where that might happen and I'll give it a try! I'm curious

metaname - 2021-07-08

@kayturs > would undo that loop eventually
technically, wouldn't it be not a loop if it gets undone?

the trivial-ish case i can think of for a loop is when you have two objects with equal masses, one repulsive and one attractive, and the space is a looping square. that should loop, though I haven't tested it and I don't know how one would prove it.

kayturs - 2021-07-08

@metaname > technically, wouldn't it be not a loop if it gets undone?
Yeah, but in some cases it appears to be a loop, or as if the system entered a stable state (like if the third object flung far away, and the first two are in orbit), but then eventually slips out of that state (the third object eventually comes back and disrupts the orbit)

And yeah, that should be a perfect loop actually. I tried that out, and oddly enough the objects collided. But come to think of it, I think that's cause gravity isn't carrying over the loop (like an object should be attracted to the edge another object is about to appear from). Which is something I should include! I'll add that in and see how that impacts the system

So then I'm guessing in general objects are only guaranteed to collide when there are 3 or more objects, or if there are 2 that are both attracted to each other

metaname - 2021-07-10

@kayturs it still feels like it should be difficult to prove that. i mean, isn't this literally the three-body problem? because if it is, im pretty sure its inherently chaotic, in that stuff like simulating different amounts of time per tick changes what actually happens. also i feel like there should exist a simple case of more than 2 objects being in a stable loop.

Sir Light - 2021-07-09

I wonder how would varying the radius of the objects would alter the picture? I think the difference would show from which points there was a near miss with some other object before an eventual collision with another.

kayturs - 2021-07-09

Exactly, and those near misses usually give the system more time to develop into chaos. So as the radius increases, we'd see the small bands of predictability grow thicker, taking over the chaotic regions. Something I should keep experimenting with!

Nulono - 2022-03-15

What do the colors mean in the case of the repulsive force? Do they still eventually collide somehow?

Sigurds Eglītis - 2021-07-09

Very nice explsnation.
I wonder how would the phase space look if the objects were rigidbodies with shapes, that also collided with each other, boxes triangles, etc...

Sigurds Eglītis - 2021-07-09

But probably, it is more interesting to create complexity using simple rules, not to create complexity using complex rules.

kayturs - 2021-07-09

@Sigurds Eglītis That's an interesting idea. For sure adjusting the radius of objects affects the map (makes the bands of non-chaos thicker). So I'm curious, I think if we compared different shapes to an already simple system (like just one mass), that wouldn't make things too complex

somebody - 2022-06-27

that last one looks quite a lot like a newton fractal (for z^3-1)

LilyOfLuck - 2021-12-11

Proof that math IS beautiful.

Ashley Demko - 2021-09-28

"The Chaotic Fractals of Gravity" would be an awesome song title

Vander Karl - 2021-07-09

Beautiful!

markilic - 2021-08-01

Wow! That amazing!

Chain Chompsky - 2021-07-18

Very interesting.

crumble rhubarbe - 2021-07-09

Love it

Evan - 2021-11-27

Hey Kayturs, sorry to bother you but we're having trouble on the discord server with a spam bot which joined. Could you kick/ban the account? It's been spamming Phishing links recently and we can't do anything about it :(

TomtheMagician21 - 2021-10-09

Hello this is a cool game but are you still working on it? Its fine if you're taking a break but on the server nobody knows what's happening

Druid - 2021-07-08

Music reminded me of Radiohead - Pyramid Song.

kayturs - 2021-07-08

Good catch, that's exactly what it is :P Just slowed down 8x

Druid - 2021-07-08

@kayturs Great progression. Even better song. 8 )

kayturs - 2021-07-09

@Druid Yeah, one of my favourite progressions.. and the time signature is really cool too, even though I don't totally get it

Druid - 2021-07-09

@kayturs Yeah, there's many opinions on it. I think it's 4/4 with a very slow swing, combined with an off-beat chord structure
Great song anyways, so who cares! 8 )

Druid - 2022-06-10

So. What is your conclusion?

moroni - 2021-07-08

Cool

moroni - 2021-09-06

Where is hyperblock?

Alex Q - 2021-07-08

Wow I’m early