EthanPieper
11-02-2012, 10:59
So here at team #4095 camp we have finished going through the math that goes along with firing the ball at different angles so that it can be programmed much easier. And yes, like I promised, there are pictures of the math! :D
Setting everything up
http://i.imgur.com/zWe00.png
I'm assuming you can tell that that is in fact a right triangle, not at all to scale, but it does what we want it to. But here are all of the variables:
Y = The height from the ground to the top of the rim of the hoop.
Yo = Initial height, where the ball leaves the shooter.
Θ = The angle that the ball leaves at when shot at the hoop (projectile).
dc (camDist) = The distance of the camera (c) to the bottom of the highest reflective tape.
Θc = Angle of the camera to the line parallel to the ground.
d adjusted (hoopDist) = The distance from shooter to the boards that the hoop is on, minus the distance to the center of the hoop.
Finding Y
http://i.imgur.com/OAxk5.png
g = Acceleration by gravity, 9.8 m/s/s or 32.2 ft/s/s.
v = Velocity of the ball.
You can see the math here, and in the next step we'll break it apart a bit more.
Finding more Y
http://i.imgur.com/SSPGh.png
Top left: Yo is subtracted over to the other side of the equations. TAN is split into SINΘ over COSΘ, then 1-COSΘ over COSΘ (yay trigonometric identities!).
Bottom left: Excluding the subtraction of gd^2/2(vCOSΘ)^2, we move d into the numerator.
Bottom right: This part is distributed into separate fractions.
Now we have this
http://i.imgur.com/ScKZm.png
Self explanatory. If you don't know, \ just means that I am continuing the equation on the next line.
Ha, I can only use five images. Continued next. (I'm sorry about the double post, but you leave me no choice delphi).
Setting everything up
http://i.imgur.com/zWe00.png
I'm assuming you can tell that that is in fact a right triangle, not at all to scale, but it does what we want it to. But here are all of the variables:
Y = The height from the ground to the top of the rim of the hoop.
Yo = Initial height, where the ball leaves the shooter.
Θ = The angle that the ball leaves at when shot at the hoop (projectile).
dc (camDist) = The distance of the camera (c) to the bottom of the highest reflective tape.
Θc = Angle of the camera to the line parallel to the ground.
d adjusted (hoopDist) = The distance from shooter to the boards that the hoop is on, minus the distance to the center of the hoop.
Finding Y
http://i.imgur.com/OAxk5.png
g = Acceleration by gravity, 9.8 m/s/s or 32.2 ft/s/s.
v = Velocity of the ball.
You can see the math here, and in the next step we'll break it apart a bit more.
Finding more Y
http://i.imgur.com/SSPGh.png
Top left: Yo is subtracted over to the other side of the equations. TAN is split into SINΘ over COSΘ, then 1-COSΘ over COSΘ (yay trigonometric identities!).
Bottom left: Excluding the subtraction of gd^2/2(vCOSΘ)^2, we move d into the numerator.
Bottom right: This part is distributed into separate fractions.
Now we have this
http://i.imgur.com/ScKZm.png
Self explanatory. If you don't know, \ just means that I am continuing the equation on the next line.
Ha, I can only use five images. Continued next. (I'm sorry about the double post, but you leave me no choice delphi).