Vendredi 22 Novembre 2024
taille du texte
   
Lundi, 09 Janvier 2012 16:15

Another Look at Launch Speed in Angry Birds

Rate this item
(0 Votes)

Another Look at Launch Speed in Angry Birds

The last time I looked at the launch speed in Angry Birds, there was a problem. The problem was that it wasn’t trivial to get the position-time data of the flung birds. But that was quite some time ago. That was before the Google Chrome version of Angry Birds. With this, I can use screen capture software with my computer.

There is another reason to revisit the launch speed in Angry Birds. The result from my last attempt wasn’t as clear as I had hoped. If the birds were shot from a sling shot that acted like a real spring, higher launch angles should have lower launch speeds (since the bird must move up vertically during the launch). I won’t re-derive this, but if the sling shot is indeed a spring, the following relationship should be true.

La te xi t 1 4

I guess I should say that s is the distance the sling shot is pulled back and k is the spring constant. But the point is that if I make a plot of launch velocity squared vs. the sine of the launch angle, it should be a linear function. Here is the plot I first created.

Launch 1

My conclusion was that the launch speed was constant and independent of the angle even though there was one data point quite out of line.

Second Try

How about more data and better data? I want to look at that same plot, but what do I need to collect from each shot? I need:

  • The x-velocity of the bird. This is pretty easy to get since this should be constant. The slope of the x-t plot will be the x-velocity.
  • The y-velocity of the bird at launch. This isn’t as easy. I can do a couple of things. I could look at the maximum height of the bird or find the velocity from a quadratic fit to the data. Both of these will take some time. A third way would be to just look at the first few data points and use change in y position over change in time.
  • The launch angle. If I have both the horizontal and vertical velocities – this is pretty straight forward.

Let me test the vertical velocity measurement. Here is a plot of the vertical position for a particular shot:

Plot 1

Tracker Video can fit a quadratic function to the data. The velocity would just be the first derivative of this function with respect to time, so I get:

La te xi t 1 6

CAUTION. The variable a is NOT the acceleration but rather the coefficient in front of the t term. But moving on. Looking back at the data, I see that the bird was launched at a time of 57.87 seconds. So, putting in this time and the values of the fitting coefficients I get an initial y-velocity of 20.76 m/s.

What about another method? What if I just fit a linear function to the first two data points? Like this:

Plot 2

This gives an initial y-velocity of 20.65 m/s. Not too bad (and much quicker).

More Data

Ok, I have more data. Now for the plot. This is the launch velocity squared vs. the sine of the launch angle. Remember, if the sling shot acts like a real sling shot, this SHOULD be linear.

Sdfsdfsdfsdf.png

Curses! Foiled again! It is that one dumb data point that is off. You know why? It is because I try to be cool. I think, “hey, how about a shoot an angry bird down?” This is what happens. But I have one more trick. Let me show a distribution of the starting velocities for these shots.

Histo

From this data, I get an average launch speed of 23.1 m/s with a standard deviation of 2.4 m/s (even with that crazy data point). So, I am sticking with my original post. The launch speed in Angry Birds is constant. Maybe for homework, you can compare this to the launch speed for the other birds (this data just looked at the red bird). I suspect they are all the same.

Oh, one final tip. If you want to collect data from Angry Birds in Chrome, zoom the screen all the way out before you shoot the bird. This way, the background in the game will stay in the same place and you won’t have to move the coordinate system.

Top image: j_10suited/Flickr/CC-licensed

Authors:

French (Fr)English (United Kingdom)

Parmi nos clients

mobileporn