The Hell It Don't Curve
CPE 471 Final Project
Neal Terrell
Table of Contents
Overview
Features List
Program Use
Toolbar Operation
Tips and Tricks
Program Overview
"The Hell It Don't Curve" is a graphical simulator of the path a
pitched baseball travels on its way from a pitcher's mound towards homeplate
in a live baseball game. The program demonstrates the effects of velocity,
spin, and direction on the trajectory of a flying ball. The user may provide
values for these parameters, and can see the results in a variety
of views.
Features List
- Realistic modeling of baseball flight using an advanced physics calculation.
- Text boxes and other GUI elements available to manually specify values for
each flight parameter.
- A real-time animation of the flight of the ball, seen from a variety of
perspectives. These include behind home plate, the pitcher's mound, above the infield,
third-base, and directly behind the ball following its path.
- Option to slow down the simulation to 1/2, 1/4, and 1/8-realtime speeds.
- For each pitch, a determination if the pitch was a strike or ball, with an
on-screen strike zone for manual inspection.
- A "tracking" mode, where the path of the ball is calculated and
displayed as a curve from the release point to where the ball lands.
- A pre-calculated list of standard pitches to automatically select appropriate
input values for a variety of pitches. These pitches include a fastball, curveball,
slider, split-fingered fastball (also called a "forkball"), and screwball.
Program Use
Launch the application by double-clicking BaseballApp.exe. You will be presented
with a screen layout similar to the image at the beginning of this manual. The application
consists of two windows, the viewing window and the input toolbar:
The visual simulation of baseball pitches is shown in the viewing window. The input
toolbar is used to specify values for each parameter of a pitch (explained later).
Use the toolbar to select one of the pre-generated pitches from the Example Pitches
combo box. Doing so will fill in the text boxes in the toolbar with values reflecting
the selected pitch. For example, selecting Curveball from the Example Pitches will
produce the following values:
When you are satisfied with the pitching parameters you have selected, hit the
Pitch! button towards the bottom of the toolbar. Watch the viewing window closely
as the baseball travels from the pitcher's mound to home plate! When the baseball
reaches home plate (or hits the ground), it will stop in place. To return the baseball
to the pitcher's mound, hit the Reset button (note: hitting Pitch! again will
first reset the ball). Additionally, the toolbar will tell whether the pitch was
a ball or strike:
Pitch was a strike!
A major league fastball takes approximately 0.45 seconds to from release time to reach
home plate, so you may want to slow down the simulation to see the ball's travel path
more clearly. To do so, select a value from the Speed combo box. Selecting a value
other than Real-time will slow the simulation by the constant selected. When you hit
Pitch! from now on, the ball will travel much slower and be easier to see. Too bad
major league hitters don't have that option!
The Camera Position combo box can be used to move the camera to several interesting
angles to witness the travel of the ball. By default, the camera is set to Follow mode,
in which the camera moves along with the ball from behind. Examples of each view follow:
Finally, press the Track button to see a colored curve showing the path the ball
takes. The curve changes color from magenta to cyan as it progresses from the pitcher's
mound to home plate. The tracking path can be viewed from any of the camera positions:
Toolbar Operation
The following pitch parameters can be tweaked using the input toolbar:
- Velocity: the initial speed of the baseball, in miles per hour (mph).
- Spin: the angular velocity of the baseball around the X, Y, and Z axes, in
radians per second (rad/s). Spinning around each axis has the following effects:
- X-axis: negative spin causes the baseball to drop. Positive spin causes the
baseball to "rise" (only slows the rate of descent in reality, but
such a pitch is commonly called a "rising" pitch because it appears
to rise to the batter).
- Y-axis: negative spin causes the ball to curve horizontally to the right.
Positive spin causes the ball to curve horizontally to the left. Sliders,
curveballs, and screwballs utilize spin about the Y-axis to "break".
- Z-axis: no effect on ball movement, only cosmetic.
- Orientation: the initial rotation of the ball when pitched, in degrees (deg).
Though the effect is merely cosmetic, the orientation can be used to graphically
simulate the pitcher's grip on the ball when it is thrown.
- Aim: the direction in the XY plane the pitch is initially thrown in. A positive
X value aims the pitch to the left (from the pitcher's point of view!), while a
positive Y value aims the pitch upwards. An X aim of 3 degrees will cause a
straight pitch (like a fastball) to pass directly over home plate.
Overview of example pitches:
- Fastball: an unusually fast, four-seam fastball. The ball is thrown such that
the batter sees two pairs of seams for each rotation of the ball, giving the pitch
its name. The positive spin about the X axis causes the pitch to "rise",
resulting in the nickname "rising fastball".
- Curveball: a pitch that is much slower than a fastball but drops faster than
normal with a medium amount of horizontal displacement. The example curveball is
typical of the "overhand curve", which is thrown nearly directly overhead
and features a larger vertical drop than horizontal. Other varieties of curveballs
break more horizontally but less vertically, depending on grip and spin.
- Slider: with a high rotation about the Y-axis, the slider features a significant
break horizontally when thrown. A slider can be thrown close to the speed of a
fastball and moves less overall than a curveball, but its high velocity makes
it a very deceiving pitch, as it often looks like a fastball.
- Forkball: also called a "split-fingered fastball", the forkball is
thrown with the index and middle fingers spread wide about the narrow pair of
seams on the ball, requiring large and strong hands to grip. The forkball has a
high velocity and a moderate negative spin about the X-axis, which causes the ball
to drop quickly towards the end of its flight. Some pitchers throw a
"sinker", which has the same rotation as the forkball but is easier to
grip and throw.
- Screwball: this pitch has a similar spin to the curveball, but instead of breaking
away from the pitcher's throwing arm, it moves towards it due to its opposite
spin about the Y-axis. It is very difficult to throw because it involves rotating
the wrist in an unnatural way, but can be very tricky to see and hit.
- Underhand: an example of an underhand pitch thrown in slow-pitch softball
games. Something silly to demonstrate the flexibility of the pitching model :).
If you close the toolbar and wish to see it again, go to the Tools menu and select
Show Toolbar.
Tips and Tricks
- Before manually specifying pitch values, try out each of the example pitches to
get a feel for how each pitching parameter effects the flight of the baseball.
- When tracking a pitch's path, it is helpful to examine it from the Aerial and
Side camera positions.
- Be sure to review the Toolbar Operation section when creating your own pitches
to ensure you're choosing the right signs for your spin rates.
- Try creating the following pitches when first trying manual parameter
specification:
- Cutter (cut fastball): between a slider and fastball in speed, with less
horizontal displacement than a slider.
- Slurve: combination slider and curveball. Moves more horizontally than
a curveball (but less than a slider) and more vertically than a slider (but
less than a curveball).
- Two-seam fastball: almost as fast as the four-seam fastball, but with a slight
negative spin about the x-axis, causing it to dip slightly (but less than a
forkball).
- Change-up: same orientation, spin, and aim of a fastball, but 10 to 15
mph slower.