One of the great things about movies set in space is that the writers have the opportunity to come up with some fantastically crazy situations. Just look at the planet Sovereign, revealed at the beginning of *Guardians of the Galaxy Vol. 2*. Don’t worry about why the Guardians are on this planet too much—instead, let’s just focus on the planet itself. It looks something like this:

It’s fantastically awesome—and I’m OK with that. However, there is a small physics problem here. Planets, you might have noticed, are spherical. The planet Sovereign is decidedly not. But why are planets spherical? Is there a physical reason why a planet might have ended up looking like some sort of fat, intergalactic caterpillar? Perhaps I can answer this question with some python models.

### Modeling a Planet

What is a planet? It’s essentially a collection of mass that is mutually attracted to each other through the gravitational interaction. I can model planet formation by using large spheres that interact gravitationally (this is what I started when I started investigating the totally made-up concept of gravity balls). Instead of a planet being made up of 10^{24} kilograms of stuff, let’s say instead that I have maybe 100 balls. Of course if there was only a gravitational force between these balls, they’d just glom together. So I’ll add two additional forces. First, there will be a drag force that is proportional to each ball’s velocity (this will make everything eventually settle down). Second, I will add a spring-like force between touching balls. When a ball overlaps another ball, there will be a force pushing them apart that will be proportional to the distance they overlap.

The best way to make a model with 100 balls is to start with just two balls—so I made a program that shows just that. Click the “pencil” to see the code for the collision and “play” to run it again.

Now that it works, I just need *more balls*. Here is an animation for 100 balls. This looks similar to my gravity balls program, except there is a spring force pushing balls apart. If you want to see the code, check it out here.

Why do these balls end up in a spherical shape? Let’s think of the total energy of these 100 balls. Their energy is due to a combination of kinetic energy and gravitational potential energy. The kinetic energy is simple; it depends on the ball’s mass and its speed. But the gravitational potential energy is a bit more complicated. If you take any two balls, the gravitational potential energy decreases as the two balls get closer together. This same idea applies for any two balls in the group. This means that there are 4,950 gravitational potential energy terms (this is the same as the number of possible pairs of 100 items).

When these balls start far away from each other, they’re at rest, so they have gravitational potential energy but no kinetic energy. As the balls are attracted to each other, the drag force kicks in and the system decreases in total energy. The only way to stop losing energy is to stop moving, so the balls end up at rest again. The final state of the balls has to be lower than the initial state and this has to be due to a decrease in gravitational potential energy. So there’s your answer—balls that form a sphere are the lowest energy configuration. Seriously.

### Non Spherical Objects

Now, it’s true that there are non-spherical objects in our solar system. Many of the asteroids that we see look sort of like a potato. However, once the object gets to a certain size, it always becomes spherical. We can explain why by going back to the gravity ball model. What if there is yet another force between balls—not just a gravitational interaction and a spring force, but something else that holds them together? This extra force is the same binding force that you would find in a typical rock on Earth. The rock is held together by these structural forces—and the same is true for large asteroids.

So if you look at one gravity ball in a collection of gravity balls there is a battle. The battle is between the overall gravitational force that wants to smash it into a sphere and the structural forces that want to keep the ball connected to other balls. Since the gravitational force has a long range, it eventually “wins” and beats out the local structural force. But of course I have to model this.

First, I am going to start off with gravity balls in some sort of linear structure so that I can see if they maintain their shape. Second, I am going to make a structural force by allowing the inter-ball spring force to not just push the balls apart but also to pull them together (over some short range).

This is group of 30 gravity balls with a structural force. Again, you can click the “pencil” to edit if that makes you happy.

Without the structural force, these balls just make a sphere—as one would expect. But what about *more* balls? I’m not going to put the actual program in here because it starts to run really slowly. Instead I will just show you the end result. Here is what happens for 97 and 208 gravity balls.

Just for completeness, this is what the 208 balls looked like at the beginning of the program.

If you want to try out this out for yourself, you can just change the number (it’s listed as N) in the program above. But here are some things to watch out for. First, I use the variable N to draw the three rows of balls. If you put N equal to 100 you actually get 298 balls. Second, if you have a large number of balls you might need to change the drag coefficient. I usually put it around 0.2 to 0.3 but even that can cause a problem. As the balls start forming a spherical blob the collective gravitational force can compress it so much that it actually explodes. It’s really kind of interesting, but it makes it take much longer to settle back into a stable configuration.

So the Sovereign planet looks really cool, sure. I’d *love* if planets could actually look like that. But in the end, there are only two ways a planet could end up in that shape. It would have to be super small (like asteroid sized) or it would have to be made up of some material with insanely high structural forces. In my mind, I am going to believe that Sovereign is made of some special material to hold it together—which just makes it even cooler.