Saturday 21 September 2024
Font Size
   
Monday, 23 May 2011 15:11

Physics of the Angry Birds Slingshot

Rate this item
(0 votes)

I was going to finish my analysis of the Green angry bird, but I was distracted when Angry Birds for the Chrome browser came out. Now, I have to work my way back up the level to get back to the green bird. Alas.

The new Chrome-based angry birds does do something new. It gives me a new method for capturing the motions that I need to analyze. Previously, I was stuck with either using youtube videos that others created or using a camera to record my own iPod. Neither of these worked too well.

Now that I am running the game on a computer, I can use screen capture software. After trying both Quicktime’s video capture and Snap Pro X, I wasn’t too happy. First, Quicktime only captures the whole screen and the frame rate wasn’t too hot. Snap Pro X also didn’t have too great of a frame rate. I found screencast-o-matic.com, a free java-based screen capture tool. This seemed to work much better. Also, a video camera to the screen seems to work better with a computer screen than it does with the iPod.

But what can I do with these new tools? Let me go back and answer a question that I have always considered.

Does the Bird’s Launch Speed Depend on the Angle?

If the bird is indeed shot from an elastic cord, then technically the bird should go faster when shot horizontally than when it is shot straight up. Why? Physics. Let me draw a diagram for a bird that is shot straight up. Also, let me assume that this sling shot is just a spring.

Physics of the Angry Birds Slingshot

Let me assume a spring with a spring constant k and a bird mass of m. How do I find an expression for how fast it will be when it leaves the sling shot? Yes, use the work-energy principle. Why? Because I know the starting and ending positions, but I don’t know the time. Since work-energy doesn’t use time, it is a perfect fit.

I will let the Earth + bird + slingshot be my system and it will start at y1 = 0 meters and end at y2 = s. Since I have the Earth and the slingshot both in my system, I can have both gravitational potential energy and spring potential energy. Oh, let me point out that the bird starts from rest and there is no work done on the system. The work-energy principle would say:

Physics of the Angry Birds Slingshot

Maybe it wasn’t clear, but the spring potential energy is (1/2)ks2 and the gravitational potential energy is mgy. Now, I can solve for the final velocity:

Physics of the Angry Birds Slingshot

But what if I shoot at an angle? What will change? Really, just the starting and ending height. Here is a diagram:

Let me once again call the starting location y1 = 0 meters. Now the ending position will be:

Using the same ideas as before, this will give a final velocity of:

The maximum velocity will be when it is shot horizontally (well, technically it would go the fastest when shot straight down) and the slowest when shot straight up.

Actual data

Here are the first shots captured using screencast-o-matic.com.

Untitled 9

The acceleration seems to be correct (around -9.8 m/s2). However, I am not too happy. If you look closely you can see that some of the y values have the same position at different times. This is because the video was jumpy. When you just watch it, it looks fine. However, it isn’t fine. Ok, I am going to use the data anyway.

What do I need to find the launch speed? In the y-direction, I can look at how high the bird goes. Using the work-energy again, I get:

This will just give me the initial y-velocity. For this particular shot, the bird started at 4.355 meters and went as high as 25.943 meters. This would give an initial y-velocity of 20.58 m/s.

Now, for the x-direction. This is a plot of the bird’s x-position.

The slope of this line gives an x-velocity of 6.5 m/s. This means that the magnitude of the launch velocity for this angle is:

And what is the angle? I could get this from looking at the video and the pull-back angle. Or I could look at the components of the initial velocity. Like this:

This would give an angle of:

Using my values for the x and y velocities, this gives a launch angle of 72.4 degrees. Or, I could use Tracker’s built in protractor tool:

They give about the same thing (71.8 vs. 72.4).

Now, I just need to do the same thing for the other shots. Just for comparison, here is some Tracker data I obtained by using a video camera pointed at the computer screen. Notice how there are no skipped frames and way more data points.

So, I have 8 shots (4 using screen capture and 4 with a video camera). If Angry Birds takes into account the angle for the launch, then a plot of v2 vs. sin(?) should be a straight line. Actually, if I know the constant g (which I do) and the pull back distance s (which is measured at 2.2 meters), then I can plot velocity squared vs. -2*g*s*sin(?) and the slope should be a value of 1. The intercept should be a constant value of k*s2/m. Let me re-write that equation so it is easier to see:

And here is that plot.

Ok, that sort of looks linear. However, the linear regression for this data has a slope of 5.34 and an intercept of 645. So, what does that mean? Well, looking at the data, most of the final velocities are around 21.8 m/s. The only one that is way off is for the shot at a very low angle (4 degrees above the horizontal). This shot has a velocity of around 26 m/s. Now, to be clear, when you shoot at a low angle like that you don’t get as much data. This is because the bird isn’t in the air for too long. Also, that shot was recorded with the screen capture software, so there weren’t that many data points. Here is the x-plot for that shot.

Unrealistic Springs in Angry Birds

Yep. I am going to call it. The spring launcher in angry birds doesn’t depend on the angle of the launch. Essentially, the game just starts the bird with a velocity of around 22 m/s at whatever angle the user wants. This makes sense for the rest of the game too. If the game used a realistic spring launching mechanism, then different massed birds would also have a different launch speed (assuming that the same spring is used). If you shoot the bomb bird and the red bird at the same angle, they will pretty much land in the same place. This indicates that either they have the same mass or they start with the same initial velocity.

Final Note on Angry Birds

You may think I have run out of things to analyze in Angry Birds. If so, you are incorrect. Angry Birds is like a whole new world.

A whole new world.

A dazzling place I never knew

But when I’m way up here, it’s crystal clear

That now I’m in a whole new world with you.

Angry Birds and other video games have a whole new set of rules. Rules that I don’t know. And these kinds of games let me set up my own little experiments to determine these new rules. Sometimes, the game behaves the same way as real life and sometimes it doesn’t. And that is why it is a whole new world.

See Also:

Authors:

French (Fr)English (United Kingdom)

Parmi nos clients

mobileporn