I have a problem. I admit it. Isn't admitting you have a problem the first step to recovery? My problem is Angry Birds Space. I just can't stop trying to figure out how this stuff works. Oh, I am not complaining. It is like Rubic's Cube for me. I like it because I don't know the answer. So, let me bring you up to speed.
- First, I looked at the preview movie before the game was even available. Really, all I could figure out from the movie is that either this isn't normal gravity or the asteroids are super dense.
- In the second post, I used the actual game - but just the first level. At that point, my best guess was that the gravitational force was constant and there was some type of air resistance. I also found that there is some "gravitational sphere of influence". Outside this sphere, there seems to be no gravitational forces.
There. You are up to speed now. Are you ready for some more data? Of course you are.
Another Experiment
One of the things I love about analyzing games like Angry Birds Space is that you have some freedom to create little experiments, but you can't just do whatever you want. This is a lot like real-life science. Maybe I want to build a gravitational wave detector. Ideally, it would be the size of the Earth. However, building such a thing is just not so simple. We have to settle for something else.
So, what is my "experiment"? One of the problems I had with the previous analysis was that the forces were always changing directions. How do you fix that? Make a bird move in just one dimension. Actually, this was suggested by John Burk:
On Angry Birds Space Level 1-13, I can do just that. Here is a snap shot of the starting position.
If I shoot the bird (which starts in the gravitational influence area) either towards or away from the rock, it is just a 1-D problem. Here is the motion of such a launch (of course using Tracker Video Analysis).
Here, I fit a quadratic function to the first part of the motion. The part where the bird goes away and then back towards the rock. This looks like a good fit. It says that the acceleration in the direction of the rock would be 29.876 m/s2 (assuming the scale where the slingshot is 4.9 meters tall). For the later part of this motion, it looks like the bird is moving at a constant speed of 29.72 m/s.
I tried two different shots. I shot a bird away from the rock, but I didn't "pull back" on the sling shot as much. This made the bird go not quite as far in the opposite direction before turning around. However, it still had an approximate acceleration of 30 m/s2 for the first part until it reached a speed of about 30 m/s at which time it remained constant.
For the next test, I shot a bird straight at the rock. The same thing happened. Just as proof, here is that plot.
Ok, this doesn't show the same acceleration - really, the acceleration period seems too small to get a good estimate. It does show the same constant speed. I tried three more shots (just to make sure) and I got the same thing.
A New Force Model
From this experiment, I have a new idea for the way the gravitational force works in Angry Birds Space. Essentially, the force looks like this:
This looks like the gravity on Earth, except that is different. Here, the gravitational constant is 30 N/kg instead of 9.8. Also, this force changes directions and always points towards the center of the asteroid. I guess the local-Earth gravity does this too, but the Earth appears to be locally flat. Oh, also this force is true as long as the speed of the bird is less than 30 m/s. If the speed is at 30 m/s, the force can only make the bird change directions (only perpendicular part works).
I think this would agree with my previous idea of a constant frictional force. If an object is mostly doing orbital type motions, the gravitational force will be perpendicular to the direction the object moves. However, when the bird moves closer to the center of the rock, it would speed up. However, if it is already going at it's max speed, it wouldn't. This might make it look like a constant frictional force.
One more note. It seems like the birds are launched with a constant speed with no slingshot acceleration. This means that almost as soon as you "let go", the bird is at it's launch speed.
Testing the Model
Let me see if I can reproduce the data above (should be easy). Here I will use a numerical model that gives the object a constant acceleration until the object reaches a speed of 30 m/s. Here is a plot of this model along with the actual data from the game.
That looks pretty much the same to me. How about something a little bit more challenging? If this model is THE MODEL (the chosen one, like Anakin Skywalker) then it should work for 2-dimensional motion also? Let's do it!
Here is the trail I will try to reproduce.
It might be easier to look at the position data for that path that I got from Tracker:
I just need the initial conditions. Let me use:
- t = 0 seconds
- x = -41.171 m
- y = -12.101 m
- vx = -6.88 m/s
- vy = 17.975 m/s
There. Using the above model for the gravitational force, I get a trajectory like this (created with the awesome VPython):
This looks similar, but not really the same. What is wrong? First, I checked something. If I launch the bird directly away from the rock, I get the same thing as the previous analysis. So, why doesn't it work? Here was my first clue. This is a plot of the magnitude of velocity as a function of time for both the game data and my vpython model.
Hopefully, you can tell that the blue line is the data from vpython. Notice that both sets of data have that flat part around 30 m/s - that is good. But then for the data from Angry Birds, each orbit decreases the maximum speed a bit. So perhaps there is both a maximum birds speed AND friction. Maybe you can see this better with a plot of speed vs. distance from the center of the rock. Remember, for this model, the bird only has a maximum speed and there is no friction.
I circled the important part. For this part of the model, there is no friction and thus no energy loss. This means that as long as the bird stays under the magic speed limit of 30 m/s, it should get back to the same speed (and same kinetic energy) and the same distance from the center of the rock. Other than that, these two look pretty close.
Ok, now to add friction. From before, I estimated that the frictional acceleration was 3 m/s2 in a direction opposite the velocity. What happens if I add in this force? Let me start with the same v vs. r plot.
That looks pretty close to me. I am happy. But why didn't I notice this friction force in my first experiment? Well, what if the object is being accelerated by the gravitational force and friction is pushing the opposite way? As long as the gravitational force is stronger, the bird would try to speed up. However, there is the ultimate speed limit of 30 m/s - so it can't. If you take away friction, the same thing happens.
But it appears the friction is actually there. Here is the trajectory as seen in vpython.
Looks pretty nice, doesn't it? But what about a trajectory for both the vpython model and the data from the game?
Pretty close - but off just a little bit. It looks like my initial velocity is slightly different than the one in the game. Not a big deal. If I fix the launch angle and increase the launch speed from 23 m/s to 25 m/s, I get this:
Not perfect, but close enough for me.
Conclusion
Really, I am only adding one thing to my Angry Bird Space forces model - and it isn't even a force, it is a speed limit. Oh sure, I could somehow make a velocity dependent force so that the max speed is 30 m/s, but it wouldn't be easy. Also, that is probably not how the game developers did it.
Still, this isn't over. Not even close to being over. I still need to look at the different levels with different rocks. Do they all have the same speed limit? Do they all have the same coefficient for the gravitational force? Only more data will tell.
Let me just go ahead add that it seems pretty clear that there is some friction in "space" also. Again, that will have to be another post.