If you want To become a pitcher in Major League Baseball, you have to be able to throw a ball Really fast – about 85 to 100 miles per hour. The faster the pitch, the less time a batsman has to react and swing the bat, meaning you have a greater chance of getting the ball past him for a shot. (For people who aren’t baseball fans, a strike is when the batsman knocks out a ball that’s in the strike zone and misses or fails to hit it. Three strikes, of course, and you’re out .) This requirement has had a significant impact on my dream of playing in the major leagues.
But… is it possible to throw a punch at a much slower rate?
In fact, a number of players have struck at very low pitch speeds, in one case as low as 31.1 mph, they said CodifyBaseball account on Twitter. Sometimes when a game ends in extra innings and a team has used up all of their relief pitchers, a manager will send a position player on the mound. These guys, who aren’t regular pitchers, usually throw the ball at a slower rate – but they can still hit strikes.
Let’s model some pitches with Python and see how difficult it is.
Fast pitch trajectory
Once a ball leaves the thrower’s hand, it travels along a trajectory determined by two forces: gravity, which pulls it down, and drag, which pushes it backwards. The combination of these two forces changes the speed of the ball as it moves toward home plate.
The gravitational force is fairly easy to deal with because it is a constant force that depends only on the mass of the sphere (which is about 0.144 kilograms) and the gravitational field (g = 9.8 Newtons per kilogram). Drag force is more of a challenge because the magnitude and direction of that force depends on the speed of the ball. The problem is that there is a net force that changes the speed of the ball – but now one of those forces (the drag force) depends on from the speed of the ball.
The only way to model this movement is with a numerical calculation, where the movement is broken down into tiny time intervals. During each of these intervals we can assume that the forces are constant. Given a constant force, we can find the baseball’s change in speed and position. For the next time interval, we can find the new force – because the speed has changed – and then repeat the whole process.
This may seem like a “physics cheat”, but there are countless problems that can only be solved this way. Some of my favorite examples are solving the three body problem (which governs things like the interactions of three stars in space) or modeling of the Earth’s climateor modeling the quantum mechanics of an atom other than hydrogen.
But before we do that, I want to address two frequently asked questions. First, do we really need to include drag?