# Monkey Gun/Shoot the Monkey Equations Question

1. May 28, 2013

### nathanthegreat

"Monkey Gun/Shoot the Monkey" Equations Question

Hi everybody!

This is my first ever post, so if I mess something up that's why.

So here's my question. For my physics final I chose to build a Monkey Gun (also known as Shoot the Monkey). I am completely done with the gun, tree, circuit, everything, and now I am just left with the equations. I found an equation for the angle at which I need to aim the gun to hit the monkey; this equation factors in the gun height, horizontal and vertical distances between the gun and monkey, and the such. It ended up being an arc-tangent function (shocker, right?) but that's not the part I'm confused about.

What I want to be able to do is measure the distances I need to the center of the tripod on which my gun is mounted (it's a pneumatic cannon that shoots Nerf darts) from the monkey's location. Then from those numbers I will just add/subtract the distances from the end of the barrel to the tripod by dividing them into their x and y components. I already found the functions that take this into account and put them into Excel. The problem comes when I try to find the angle at which I need to fire. If I start the gun out horizontally, the numbers are about 5 meters in the x direction and 1 meter in the y direction. My function then gives me an angle of about 11 degrees. But then if I go to set my gun to 11 degrees, the horizontal and vertical distance from the end of the barrel to the monkey will be different, which would in turn give me a different angle at which I need to aim my gun. How can I manipulate my equation so it takes this into account? The angle both depends on the distances but also affects the distances, so how can I represent that mathematically in one equation?

I'm not worrying about air resistance right now, so that can just be ignored for the time being.

If I left anything out or if you need more details just let me know!

-Nathan

2. May 28, 2013

### cepheid

Staff Emeritus
Welcome to PF Nathan!

You MUST post homework help threads using the template provided (the one you deleted when you composed your post). However, I will show leniency here since this is an open-ended and self-directed problem.

I assume the monkey is a stationary target?

Let x and y be the horizontal and vertical distance between the gun barrel and the monkey. The problem you're having is that these are not constant, but vary with firing angle theta. So what you have to do is express x and y as functions of theta, which should be easy enough to do, since you know the distance between the end of the gun barrel and the pivot point. Once you have these functions, you can plug them into your other equation that tells you what firing angle to use (to hit the monkey) given x and y. So now you should have no other variables than theta, and you can solve the equation to find the value of theta that satisfies it.

Good luck!

3. May 28, 2013

### nathanthegreat

cepheid,

I didn't post to this category (my post got moved) so that's why I didn't follow the template. Good to know,though.

No, the monkey isn't a stationary target. The monkey is suspended by an electromagnet powered by a battery. On the end of the barrel, there are two split wires that are touching that are part of the circuit. Right at the moment the dart leaves the barrel, the circuit is broken and the monkey falls (from a height of right around 2 meters). I did the math and found the equations $$ΔY=v_0 t sin \theta$$ and $$ΔX=v_0 t cos \theta$$. This is how I solve for the angle right now, which works perfectly if I leave the end of the barrel at the exact same point. However, I don't want to leave the end of the barrel at the exact same point, I want to be able to leave the tripod at the same point and be able to just adjust the angle. Changing the angle changes the distances from the end of the barrel though, so I was wondering how to take this into account mathematically. I'll know the distance from the monkey to the tripod, the the height difference from the tripod to the monkey, as well as the distance from the center of the tripod to the end of the barrel (which is about 1.3 meters). The equation I have right now is $$tan \theta =ΔY/ΔX$$, but when I set my gun to that angle I need to recalculate for the new distances from having the gun at an angle. How do I do that mathematically?

-Nathan

4. May 28, 2013

### Dick

In the classic Monkey Gun problem there's not much aiming necessary. You just point the gun directly at the monkey. If the monkey starts free falling at the same time the projectile leaves the barrel and goes into free fall then you will automatically hit the monkey, regardless of distance or angle (neglecting air friction). That's the whole point of the Monkey Gun. If they would hit each other neglecting gravity then they will also hit each other with gravity if they are both in free fall.

5. May 28, 2013

### nathanthegreat

Dick,

I understand that I can aim the gun directly at the monkey because they will both fall at the same rate (in fact I did the calculations when I derived the equations and the whole system can essentially be treated as of there is no gravity). And yes, the only aiming is aiming the gun at the monkey, I understand that, too. So for my case I just aim at the monkey no matter what, correct?

If I want to predict the angle, though, can I just take my measurements from the monkey to the top of the tripod (the vertex of the triangle) and then treat the measurements from the tip of the barrel to the monkey as a similar triangle (because the barrel is part of the gun aimed at the monkey and therefore has the same angle) so the whole difference in distance and height "doesn't matter"? If so then I think I was just over-thinking this whole thing way too much.

-Nathan

6. May 28, 2013

### Dick

Maybe overthinking a little. If you sight through the barrel of the gun and you see part of the monkey, then that's the part of the monkey you will hit, in a frictionless world. That's the easiest way to aim it. If you want to compute an angle instead pick the pivot point of the barrel (the point it rotates around) and use the arctan of vertical over the horizontal distance to the monkey to compute an angle. Like you said in the first post.

Last edited: May 28, 2013
7. May 28, 2013

### cepheid

Staff Emeritus
Ah yes. I guess I assumed that this wasn't the "classic" monkey gun problem, because you were investing so much effort in figuring out how to get the projectile to hit the monkey, which would be necessary if the Monkey *didn't* fall at the same rate as the projectile. My mistake.

8. May 28, 2013

### nathanthegreat

Dick,

That method will work perfectly! Sometimes the right answer is the one that seems too easy. Thank you for your help!

cepheid,

That's fine, it's an interesting idea, though. I'll have to play around with that after I finish this project! It shouldn't be too hard to do either, but I love doing the math. Thanks for the welcome, too. I think I'm going to get a lot of use out of these forums!

-Nathan