Ball Trajectory Planning

Ugh, just got off the phone from a friend of mine with a masters in physics. I’m sure I’m not the only one starting down the painful math road of calculating accurate trajectory planning for small basketballs. I’m posting this in the hope it will help others or that others here who know more than me can contribute back.

According to my friend the problem is both very simple and very hard and he was unsure which terms would have a large enough impact to be relevant. In fact, that is ultimately the crux of the problem. If we account for everything in the equation then we are going to be far more accurate either way so I’m working from that assumption though I’m not sure if it’s feasible.

To that end, we need to know quite a few things starting with the ball diameter, density, and mass (does someone have the weight of the ball measured accurately?). He was uncertain but he did feel that with the light weight of the ball the wind resistance might actually matter. Unless someone has access to a wind tunnel and wants to share results we are going to be guessing this one in part because determining the coefficient of friction for a pebbled surface seems exceptionally difficult. At best, we can use the friction coefficient for something like rubber to air and calculate it for a 7" diameter sphere at the temperature/pressure of the playing field.

This paper says drag through the air on a full size basketball is negligible:

But then it gets shot down a bit here: You can see in the graph at the end here that air drag has a huge impact on a baseball:

Another potential nasty problem is the Magnus Effect. This is what happens when something is spinning and creating lift. This is one my friend felt we could likely ignore due to the low spin RPM though it’s also one of the easier ones to do:

So what is everyone else currently looking at? How deep down this rabbit hole are you going? Thanks!


Keep in mind that this very topic is being researched in universities. It goes VERY FAR.

For the context of FIRST, I personally think only basic kinematics is required… Unless you are making an arm that will catch the ball mid air.

If you’re unsure, go with the simplest, and then physically test it. Math is great, but unless you test it IRL, there can be many variables you’re forgetting about.

I think this is the case for shorter shots. I’m not so sure for longer shots due to the light weight of the ball.

I appreciate the input but I actually disagree agree with this suggestion. I know that drag, magnus effect, etc. all have a real world impact. I am unsure if it’s significant enough to cause a noticeable impact in practice. I think it would be better to start with the math being as accurate as it can be first rather than over-simplify and be left guessing where the inconsistency came from if it does matter. It’s quite easy to compare the complicated math solution against the simple math solution for a sanity check. It’s extremely hard to dial in accuracy from an inaccurate starting point while it’s quite easy to take something super accurate and make it less so.

Now with that said, this is likely beyond my math/physics skill so it could very easily all become a moot point in the end :slight_smile:


Well, being only a sophomore in High School, I must first applaud you for attempting the math involved in this. With my current skill level, I would never be able to calculate stuff like this. Being on a robotics team, I will secondly tell you that you can skip a lot of long, confusing math by making a prototype. While the math still exists, it’s sometimes easier to mock up something and just change it little by little until it’s perfect.

Hope this helps, and whatever path you choose for this game, I wish you the best! :smiley:

Once you have a basic shooter that is very similar to the final design, you can begin some experimentation. Obviously, all experimental data will have to be retaken with the final design. But what you should do is set your shooter to shoot at 0-degrees relative to the ground, or as horizontally as you can.

Using the same rpm, shoot the ball a dozen or so times, recording how far it went. With that, you can calculate how much velocity your shooter has at that rpm. If you plan on having a static rpm with varying angles and distances, you shouldn’t need any more data beyond what you have. If you plan on varying your rpm as well, you will need to take more data to see how your velocity varies with rpm.

These balls are heavy enough, that I don’t feel wind resistance will be too critical at 57’ (maximum length you will never reach) but I could easily be wrong. Have your team member with the best arm go outside and just whip the thing. You should be able to see lift if it occurs. And if there is significant resistance, you should be able to observe that as well.

This. I would see how far I could get with fitting a line to a set of data points.

The physics degree in me says this is a very interesting question to pursue.

The engineer in me says 2 things:

  1. speed is a factor in how much drag comes into play. I don’t think you’re going to be approaching baseball speeds unless you’re going for the robot that parks in the alley, receives the pass and chucks it full court (if you are–bravo!).

  2. this math would only matter after you have a mechanism that is VERY repeatable with the shot. I would worry about that error first.

To at least provide some useful info, a paper in 2002 from a prof at the University of Waterloo proposed:

45 degrees + half the elevation from the shot origin to the basket.

Take it for what it’s worth. I tend to believe him.

Well, really it depends on how much power your throwing mechanism has. If it throws hard you’ll have to put much more arch on it so that it goes in instead of bouncing off of the backboard. On that same note, if it throws too light, you simply can’t make a basket. You will have to perfect the mechanism before you can do any math towards which trajectory your throw it.

I personally plan on doing research on how catapults and what not determine where what they throw will land. Sometimes they can be very accurate though they tend to throw odd shapped things which makes it more difficult to guess.

If at all possible, I’d like to be able to accurately throw a ball from the other end of the field and make it in though this will require very precision mechanics which I’m not sure the guys running the machines around here can do. One thing is off and all my code doing the angle estimations will do no good.

Well, good luck to you!

I’m a senior year mechanical engineer student mentoring my former high school trying to do these calculations.

so a few things, Drag is a function of v^2, i would say that unless you are using a large air cannon it is pretty much MOSTLY negligible

Coefficient of restitution will probably be the greatest loss of energy you will encounter

if you want to tackle this i would say, construct a free body diagram, do some energy calculations, maybe some work calculations. balance using Newtonian mechanics and then try to come up with something feasible.

Good luck, and remember to just have some fun

Spin can have a major effect on the path. Also a ball with spin has very different interaction when bouncing off the wall as we noticed today.In 2006 we choose top spin. After some simple testing today the opposite may be better.

For what it’s worth, my first impressions as a mathematician and former basketball coach… (and as a mentor who was around for Aim High)

Do some math first. You want to work out trajectories that bring the ball down in the center of the rim. The amount of arc is a function of the height above or below the rim and the distance to the rim. If you just start building prototypes you will likely make several designs which have fatal flaws. A little math ahead of time can avoid some of the mistakes.

Second, have someone with some skill at free throws shoot a few with this ball. Shoot some video (from a variety of angles) of the shots to give you some idea about trajectories. You might also want to watch a good free throw shooter shoot some shots with a regular basketball.

There balls deform a lot more than a basketball or baseball. That deformation will vary greatly depending on the mechanisms you use for shooting. This will have a lot of effect on the air resistance and flight characteristics of the ball. So there will be no getting around doing a lot of testing with prototypes.

The (horizontal) angle at which you are shooting at the rim will matter. In a theoretical world where your shooter is always the same, this isn’t the case. But when you are shooting at an actual hoop, you are going to want to shoot as close to straight on as you can. There will be shots that are a little too long. If you are shooting close to straight on a decent percentage of the shots are going to bounce off the backboard and come back to the rim. This means you want to err a little bit on the side of too far rather than too short in your shooting.

Figuring out how quickly you can shoot without having the ball interfere with one another is another important thing to figure out. If you shoot too quickly you are likely to have one or two balls bounce out off of a preceding ball.

Keep it simple, for the purpose of what most teams want to accomplish (shooting), stuff like drag, density and other factors can be set aside if you want to just shoot. If you have a general physics background, apply that math because even with calculating exactly how much speed, height, etc. needed to make a shot, remember we live in a imperfect world. If you want to have reasonable success and want to use math and physics, use the basics of physics formulas and you’ll be fine. Otherwise build and test. Remember we only have 6 weeks to get a robot ready for a competition.

Hi all; thanks for all the feedback. I just got off with phone with Rhett Allain ( - he is a physics professor and the friend-of-a-friend. He feels that the Magnus Effect can be effectively ignored in these foam basketballs because of their size, density, and low RPM of spin. Likewise, while air resistance will certainly be a measurable amount, it’s exceptionally hard to calculate and also likely to be within the inconsistency of the machine itself in the best case scenario. This also means temperature, pressure, etc. can all be ignored.

Looks like you guys were right and I was wrong - no need to over-complicate it. This is good news for us though as the physics problem is now just one of projectile motion and nothing too nasty.


Ive worked on finding a good formula to make a good curve but to no avail. I think im just going to make a chart when our launcher is working what maps out various distances and initial velocities/theta. This way you can just either create a curve in labview or just store the data on the crio to have the code refer to

Thats great news, I’m glad you went ahead and did a lot of research and posted it all here.

The information you are giving may be very vital to some of the games played this year!

I hear from some of my basketball friends that you want to aim for the square on the backboard, and that will guarantee you a basket.

Assuming you are shooting a basket straight on, could you just calculate the normal angle of the plane that would give you the most area between the uppermost point of the backboard and outward most point of the hoop that would give you the greatest chance of scoring?

I’ve been doing some basic physics on shooting the ball with near-optimal trajectory (still working on the equation for optimal trajectory) and have found that in some situations, essentially a full-field shot, ball initial velocities will need to exceed 10 m/s without accounting for air resistance (or spin, for that matter). As such speeds, wouldn’t air resistance come into play?

Honestly, I’m doing this for fun without expecting accuracy, but I’d love to get as accurate as possible.

Ether, if you happen to be around, I’d love to get your input on this problem, since you know pretty much everything.

Heh, thanks. I’m trying to get this whole cooperation thing though it goes against my extremely competitive nature :slight_smile: