The Gravitational Force in Angry Birds Space

How could a physicist resist calculating forces in the new Angry Birds Space? Dot Physics blogger Rhett Allain analyzes the game to discover gravity in the latest Angry Birds universe.
Image may contain Angry Birds

Now that Angry Birds Space is actually available on various platforms, I realize I made some mistakes. Just to be clear, my previous analysis was based ONLY on a preview video. Now that I actually have the game, I can do a much better job.

The first thing I have noticed is this stuff that I thought was the atmosphere or something.

Finder

As anyone that has played the game can tell you, this air looking stuff surrounding an asteroid defines a region in which the angry birds will interact with the rock. If the bird is outside of this region, there will be no force on bird. No force means no change in velocity and the bird will move along at a constant speed in the same direction. Ok, I admit it – I missed this one.

Why? Why would the game do this? I have no idea, but it is probably either because it makes the game more fun to play or because it makes it easier to calculate things in the game.

But what about the time the bird is INSIDE this gravitational area? What kind of force is exerted on the bird? Is it like real gravity or something different?

Some Physics

When I say "real" gravity, I mean the Newtonian gravity that you and I always love. This model for gravity says that the gravitational force is an attractive force that has a magnitude of:

La te xi t 1

Here, G is the gravitational constant the m's are the masses of the two objects and r is the distance between their centers. But how could I test if this is indeed the way gravity works in Angry Birds Space? Honestly, I think the best thing is to look at orbital motion. What if I shot a bird (not shot THE BIRD) in such a way that it sort of went around the asteroid, like this:

Finder 1

That is not a perfectly circular orbit, but it will work. When dealing with orbits, it is easier to use the Work-Energy principle than it will be to use the momentum principle. In the momentum principle, I can find the forces on the bird (probably just the gravitational force) and in a short time interval, I can write:

La te xi t 1 1

This might seem like a great way to go, but the problem is that both the force and the momentum are vectors. Although the change in momentum is in the same direction as the force, the momentum might not be. In fact, for circular motion the force and the momentum are NOT in the same direction. Please don't confuse momentum with the CHANGE in momentum. This is a classic blunder.

With the Work-Energy principle, I can take the bird plus the rock (asteroid) as the system. In this case, there is no external forces on the system and thus no external work. The energy of the system will only consist of gravitational potential energy of the bird-rock system and kinetic energy of the bird (assuming no recoil motion from the rock). I can write this as:

La te xi t 1 2

I can't directly measure the potential energy for this system. But I can look at the kinetic energy. So, let's do that. How? First, get some screen captures of motions in the game (using the desktop version of the game) and then use the free (and awesome) video analysis program Tracker.

Video Analysis

If I assume a bird mass of 1 unit (call it kg if you like) and a scale where the sling shot is 4.9 meters tall (from the Angry Birds Terrestrial game) then this would be a plot of kinetic energy vs. time for one bird.

Absss

I added the red arrow to indicate the location on the graph where the bird entered the "sphere of gravity". Before that, the kinetic energy SHOULD be constant – but there are some spikes in the data. Why? Well, I suspect there are some slight frame rate problems with my screen capture. A small error in the position data can make a huge error in the kinetic energy since it depends on the square of the velocity.

But like I said before, I don't really care about time data. Here is a plot of the kinetic energy as a function of distance from the center of the rock.

Drawings Spring 12.key

A couple of things to notice. The horizontal axis is not time (I know I already said that). If you want to think about the way the bird moves, in this graph it would start at a high r value and move left in the graph (to a lower r value). I put a line to mark the location that the gravity starts to act on the bird (should I even call it gravity yet?) Also, there is another problem. The bird can be at a certain distance from rock and have more than one velocity. How can this be? My first guess is that there is some type of friction involved. Otherwise when the bird gets back to the same altitude that it started at, it would have the same speed (and same kinetic energy). This is too bad. This means the kinetic plus potential energy of the system is not constant.

Friction – or Something

If there wasn't a frictional force, I could just use the kinetic-position graph to find a function to add to that such that the total energy would be constant. What to do now? I guess I need some estimate for the frictional force on the bird. Let me start with a guess. What if there is some constant frictional force that is in the opposite direction as the motion. If that is the case, at some instant I could draw the following forces on the space bird.

Drawings Spring 12.key 1

So, let me assume that this frictional force is in the opposite direction as the velocity of the bird. This is just a guess. If this is true, then I can look at one rotation of the bird around the rock. For one bird, there is a case where it just about gets back to the same location, but at a slower speed. If it is at the same location, it will have the same gravitational potential energy. That means that the decrease in kinetic energy will be due to the work done by friction (friction will do negative work since it is pushing in the opposite direction that the bird is moving). I can write:

La te xi t 1 8

Here, s is the distance traveled around the rock. Now I just need to pick a path to look at. Here is the orbit I will use.

Untitledsdfsd.png

If I assume that the mass of the bird is 1 kg, then the kinetic energy at the start of this path is 408 J (K1) and at the end it is 167 J (K2). What about the length of this path? Remember this is really just a finite number of points. If I go through each point one at a time, I can just add up the distance of the jump. Doing this (in python of course) gives a path length of 78.9 meters.

Now I can solve for the frictional force:

La te xi t 1 9

Remember that I have assumed the frictional force is constant and in the opposite direction as the velocity. This, of course, could be wrong. But I am going to go with a constant force of about 3 Newtons.

Simulation

When your first solution doesn't work, resort to guessing. That is what I am going to do now. Let me guess some mathematical models for this gravitational force and then model them to see if I get something similar in motion to the actual game. Let me start with the following data from the game:

  • Before it enters the "gravity" area, the bird has a speed of 25 m/s.
  • The rock has a radius of 6.5 meters.
  • The radius of the "gravity" area is 25 meters.
  • The frictional force is constant – maybe with a value of around 3 Newtons, maybe.
  • For this particular model, the bird will start at the edge of gravity with a velocity angled at 38° (to match the game)

Let's begin. I will use the VPython module in python to create the animation. Really, I should be using GlowScript instead, but I just haven't gotten into the habit of writing stuff in this as fast as I can in python.

Here is a sample run as seen in VPython.

Vpython

I know what you are thinking: hey, the background is black but in Angry Birds Space, the background is blue (with random clouds). Yes, I know about this difference. You are just going to have to deal with it. The real question, how well does this agree with actual data? Here is a plot. The green curve is data from the game and the blue is from my simulation.

Sdf.png 1

I played around with the initial velocity in the simulation to get it to match as best I could. I think I could do better. For this blue-curve simulation, I used a constant frictional force and a gravitational force that was always towards the center of the rock with a magnitude of (65 N/kg)*(bird mass). Just playing around, this works reasonably well. I think I can get a better value with more data.

What Can I Say?

Maybe you don't care about all the calculations and data above, just get to the point – right? OK, here is what I have:

  • Gravity is probably not a 1/r2 type gravitational force. It probably is just a constant magnitude that always points towards the center.
  • There is no air, there is no gravity. But of course, we knew this already.
  • Inside the "air" or "gravity", there is a frictional force. This force seems to be constant in magnitude but in the opposite direction as the velocity.
  • If the scale of the sling shot is the same as the scale in the Earth-based Angry Birds, then the birds are launched with a speed of about 25 m/s. This is similar to the launch speed in Earth-based Angry Birdsfor which I found a launch speed of about 23 m/s.
  • Looking at the data, I have this feeling that when the bird enters the "air", it gets a slight speed boost. I need more data on this matter, but that is what it seems like.

I think I can get better data. In my excitement, I just looked at data from the first level in Angry Birds Space. There are some later levels that show some very interesting setups that could give some great data. You know that will just lead to another blog post, right?