# Angry Birds

Categories: BirdGravityPig

Angry Birds have always been a popular household game amongst young people, including myself. I remember when my much younger cousin asked me to help her to win a game by shooting a bird on a pig, and that is when I realized that winning this game, might need a bit of Mathematics. The gamers are firstly presented with different kinds of birds, with different power abilities.

Then, the bird is placed on a slingshot, that shoots out a trajectory, that is usually a white dotted line, aimed at a target pig, or a piece of object around the pig.

By adjusting the trajectory line, the gamers can see which part of the target they are aiming at, and by releasing the bird, it will fly exactly the way as it was presented by the white dotted line. The simple objective of this game is to shoot out as many pigs as possible.

I knew that Mathematics was somehow related to shooting the target out, when my cousin requested my help to win, however I didn’t realize how much Mathematics is in this, until I started studying quadratic functions, since I noticed, that when shooting out the orbit, it forms a concave down curve.

Get quality help now KarrieWrites Verified writer

Proficient in: Bird    5 (339)

“ KarrieWrites did such a phenomenal job on this assignment! He completed it prior to its deadline and was thorough and informative. ”   +84 relevant experts are online

Calculus came later in my studies, and in this case, it is useful to find the slope of the tangent.

Because both areas are relevant in winning this game, I decided that in this exploration, I will focus on proving that what we see in the game is really a quadratic graph, as well as find the suitable emitted angle given the initial birds position and the targets position, moreover the emitted velocity to hit the target pigs.

Get to Know The Price Estimate For Your Paper
Topic
Number of pages
Email Invalid email

You won’t be charged yet!

Methodology on proving that the orbit the bird shoots out is quadratic:

Firstly, I started by taking screenshots of the game while playing it, to catch the birds motion of flying out of the slingshot, as well as forming the white dotter line, the orbit. Then, I used an online graphing program, DESMOS, where I could put the screenshots in, that I previously took. This allowed me to see the picture in a grid, with the x and y axis visible.

The next thing I did was to print the picture, so I could randomly select 9 points, and estimated their positions:

Figure 2

With the points now chosen and named, I used the TI-84 calculator to insert the positions into the List. L1 being the x-axis, and L2 being the y-axis. After inserting all 9 numbers, the function QuadReg (Quadrating Regression) was being used to find a b c and r2 from the formula y=ax2+bx+c.

Figure 3

Figure 4a = -0.4773917966b = 2.391213739c = -0.060022273r2 = 0.9961303418

With this information, I again used DESMOS, to plug in the numbers to the equation, as well as rounded the numbers up:
y=-0.48×2+2.39xC is 0 because the quadratic curve passes through the origin. This app managed to formulate the exact same concave down orbit as the game did.

To make sure, I also put on the 9 points that I randomly chose before. Not only did this prove, that it’s a quadratic function, but also the r2 told me, that the correlation is very strong, since the closer the number is to 1, the bigger correlation there is between the points. However, r2 is not exactly 1, which tells me that I may have estimated some points incorrectly, and this can also be seen on the graph, where the points are not exactly on the curve.

Figure 5

Methodology finding the angle emitted by the bird given the initial and target position:

Now that it is successfully proven that the curve that we see is emitted by the bird in the game, is related to the quadratic function, I can calculate the angle emitted by the bird. I began with the root form; which function is:

y=a(x-x1)(x-x2)In this equation, x1 and x2 are the x-intercepts. X1 is initial (emitted point) and x2 is destination point on the x-intercepts. Because they are given.

Lets assume, that x1 is the birds initial position, which is (0,0), that can be read from Figure 2. Then, lets assume that x2 is the pigs position when already hit, and on the ground, and the position is (5,0) as this have been assigned on the graph as well. Since we know the initial point of the bird, (0,0) I decided to substitute 0 in the already factorized equation, then open the brackets, and simplify it to the simplest form possible.

y=a(x-0)(x-x2)y=ax(x-x2)y=a?x2-ax ? x2After getting the function of the root form, there is a need to find the derivative of the function if I want to calculate the emitted direction, since the derivative is the gradient of the tangent in the initial position.
dydx=(ax2-ax?x2)’=2ax2-ax2After getting the derivative form, I again substituted 0 into the equation:

dydx=2ax-ax2=2a?02-ax2=-ax2The single term above, gives us the equation of the emitted direction of the orbit. I find that x2 is a positive number, therefore staying on the positive side of the x-axis. As shown in the function, the quadratic function of the orbit is a negative, which proves a concave down shape. The gradient in x=0 is positive.

After completing the calculations with the root form equation, I’m also going to use the standard form approach, which function is:
y=ax2+bx+cWhen writing the two functions down together, I began to realize that the root form and the standard form shared same terms, so terms containing x2 should be equal to each other, as well as the terms containing x should be equal too:
y=ax2+bx+cy=a?x2-ax?x2ax?x2=ax2-ax ? x2=bxc=0Simply using the second form, the following should be done:
-ax?x2=bx-a?x2=b

This also proves that the emitted direction of the orbit can be calculated with the standard form function.
When it comes to emitted direction and angle, we need to consider three possible factors: a b and x2. By using the bird to shoot the pigs, there are many possibilities to hit the target, therefore the angles also vary. In this case, I assumed that the emitted angle is 60°. Since now a is the only number is unknown, the equation y=-ax2 can be used. x2 is the position of the pig that already hit the ground, and has points of (5,0), as previously identified on Figure 2.

y=-ax2tan60°=33=-a×535=-a0.35=-aa=-0.35The final equation for Figure 2, including the slope, the initial position of the bird and the target pig on the ground is:

y=-0.35(x-0)(x-5)Now to determine the vertex of the curve (using axis of symmetry) and then substituting it in the root form.:-b2ay=a-b2(2a)2+b(-b2a)y=a?b24a2-b22ay=b2-2b24ay=-b24aWith the simplest form, the only thing needed to be done, is to substitute a and b.
Vertex of y:

y=-b24ay=34×(-0.35)y=-2.14If view the game Angry Birds would happen in real life, the gravity is a constant in a certain, and I would like to make the assumption that the air resistance is negligible, as well as that the bird is moving in a constant velocity in a horizontal direction. x2v2=tThe formula for motion in free form is:

Figure 6ht=y=v1t-12gt2v?sin?=v1v?cos?=v2In this equation, v1 is the initial velocity in vertical direction, I believe that in this formula, t is equal to x2 divided by v2, therefore v2 is the horizontal velocity. As before I would like to compare this formula with the general form:
y=v1t-12gt2y=at2+bt+c-12g= av?sin?=v1=bc=0As shown above, a should be equal to -12g and in physics, gravity is used as 9.81:

a=-12ga=-0.5×9.81a=-4.905For the equation ht=v1t-12gt2 the t can be substituted as:
y=v1x2 v2-12g(x2v2)2It can be further carried out as:

y=v1v2?x-12g?(1(v2)2)?x2y=-12g?(1(v2)2)?x2+v1v2?xThen, I chose the quadratic equation I calculated earlier and set up an equation based on it, and the aim here is to determine v1 and v2.

-0.48=-12?9.81?(1(v2)2)-0.48(v2)2=-4.905(v2)2=-4.905-0.48v2=3.2To calculate v1 I simply used v1v2 and b from the quadratic equation, to set up another equation:
v1v2=2.39v13.2=2.39v1=7.6

Figure 7

To find the emitted velocity, or v, we can express it with the Pythagorean theory, shown in :v=(v1)2+(v2)2v=57.24+10.24v=8.25Next, my aim is to find the angle emitted, or x2 emitted by Figure 2. To do this, I am going to use the properties in… and the formula of free form, as well as from the expression tan?=b=-ax2.

y=-12g?(1(v2)2)?x2+v1v2?xBased on the notations I assigned earlier from Figure 7, the following equation can be deduced:
y=-12g?(1v2?cos2?)?x2+tan??xy=-12?9.81?1v2?1cos2??x2+tan?xy=-4.905?1v2?sec2??x2+tan?xy=-4.905?1v2?1+tan2?x2+tan?xAgain, I am going to use the quadratic function to equate the equations:

-4.905?1v2?1+tan2?=atan?=bTo calculate x2 it can be written up in the following form from the expression tan?=b=-ax2:
x2=b-a=tan?4.905(1+tan2?)?1v2x2=v2?tan?4.905(1+tan2?)x2=(8.25)2?tan?4.905(1+tan2?)To prove the accuracy of the emitted angle, I decided to plot the x2 equation into DESMOS:

Figure 8

Conclusion and evaluation

Angry Birds is a globally played game, and I also shared my parts of playing this online stimulation. The first part of my Math IA mainly focused on the quadratic nature of the game Angry Birds. The initial emitted point is (0,0) and I randomly chosen 9 points on the curve, then plotted it on an online graphic program DESMOS, and using the QuadReg function of the graphing calculator, the equation I got is:
y=-0.48×2+2.39xThe r2 value equals to 0.9961303418, which tells me that because it is close to 1, there is a positive correlation between the points and quadratics.

With the help of this quadratic equation, I managed to calculate out the velocity emitted by the ‘bird’ as well as the angle. To calculate velocity, I used a formula from physics, and the Pythagorean theory, which gave me the answer of: v=8.25To find the angle emitted, trigonometric identities were used, combined with the formula of free form, and the final answer is: x2=(8.25)2?tan?4.905(1+tan2?)To check the validity of my answer, I again used DESMOS to plot this function, which drew a quadratic function, proving that indeed it is the correct angle, as seen in Figure 8.

By calculating the above parts, I believe it only applies to this game, but many other online games, but most importantly it can be used in real life. For example, when watering the garden with pipes, or when going shooting. In this IA, I assumed that there is not air resistance, the speed is constant, but in reality, when speaking about the law of physics, there are all these aspects to consider, which would have gave me completely different results.
Bibliography:

“Explore Math with Desmos.” Desmos.com, www.desmos.com/.
Stapel, Elizabeth. “Trigonometric Identities.” Trigonometric Identities | Purplemath, www.purplemath.com/modules/idents.htm. 