Archive for May, 2010

In Search of Late Life

Monday, May 17th, 2010

[This is a case of thinking a little bit too hard about something outside your field. What follows is largely wrong to the point of the absurd. The "Rates of Decay" hypothesis is probably not baloney and worth thinking about.

However, the kind of exotic rotation I propose in the "You're Thinking Too 2-Dimensional, Marty" hypothesis is implausible to the extreme without an elaborately doctored baseball and, furthermore, completely unnecessary. I neglected to consider the most basic mechanics equation, F=MA, that forces cause acceleration, and so no exotic spin is needed for the ball to be deflecting more rapidly as it approaches the plate (both due to the constant force of gravity and the magnus, which decreases as velocity and spin rate decrease.)

There's no harm in making a mistake except when you're looking for mistakes. With a little help from an expert on this, my error's found and I like the "Back to the Future" joke, so am not erasing the post. Also, the rate of decay hypothesis has some merit, I think. The correct lesson to take away from it, though, is the more obvious one that a baseball has to be given a very fast initial spin to maintain accelerating deflection late in the trajectory as velocity and spin-rate decrease at some unknown, but measurable, quantity.

As for the distinction between "frisbee" sliders and regular-old sliders, that's something that my research specialty can address: just need to find cases where people refer to a slider as a frisbee slider and see whether the pitch was actually thrown differently than for normal sliders. My guess is that the angle of rotation would be flatter to the horizontal. And maybe in the case of a sinking fastball, it has less backspin so that it falls faster than another fastball. Data exists publicly to evaluate both claims in a later post.]

When someone who is the best in the world at performing a given task says that they failed at it for a particular reason, I’m biased to believe their explanation. So when great baseball players all claim that late movement is what caused them to miss a pitched baseball or to hit it poorly, I’m inclined to believe that pitches really can break late, and that their explanation is not related to some psychological factor of human perception that causes us to misidentify a rapidly spinning object’s true trajectory. In this post, I’ll present two ideas on late break, the first is probably testable on existing data, the second requires unavailable data.

Pitch movement

Once a pitch leaves the pitcher’s hand three forces continue to act on the ball after the initial conditions set by the pitcher to cause the ball to deflect from its initial trajectory. Two of them are out of the pitcher’s control: gravity pulling the ball downwards and drag slowing the pitch’s velocity. The third force is the Magnus force that is exerted on the ball perpendicular to the direction that it is thrown in the plane of its axis of rotation and in the direction that the front of the baseball is spinning towards. A fastball thrown over the top leaves the fingers with backspin, and so the magnus force opposes gravity and keeps the ball from dropping as fast as it would without the magnus force; a curveball thrown with a snap of backspin has a magnus force that makes the ball drop more than it would by gravity alone; cutters, sliders, and screwballs have sidespin that make the ball move in a sideways direction. The best publicly-available quantitative study of magnus forces was done by Prof. Nathan of the University of Illinois Physics department, the paper, The Effect of Spin on the Flight of a Baseball, and slides from a talk on the paper are available from his Physics of Baseball website. In that paper, a major conclusion (which contradicts predictions of the aerodynamic model of Robert Adair, the first official physicists to the National League) is that for the pitch velocity range for baseballs thrown by professional baseball pitchers (between 50 and 100 mph), the amount of magnus force is not strongly dependent on the velocity. [This is badly mis-stating the conclusion: "the lift coefficient does not depend
strongly on velocity at a fixed value of omega/v, where omega is the spin rate and v is the velocity."
]

Rates of decay

One way that a baseball could deflect more late in its trajectory than early in its trajectory is if you define break as units of movement in the X and Z dimensions per unit movement in Y, where Y is the horizontal dimension from the pitcher’s mound to home plate, X is the horizontal dimension to the catcher’s left and right, and Z is the vertical dimension.

Take, for example, a fairly typical slider thrown with an initial velocity of 90 mph (call it 130 fps—the figures here are back-of-the-napkin stuff just to illustrate differing proportions) and crossing the plate at 80 mph (~115 fps). It’s moving in the Y dimension 12% slower as it crosses the plate than when it left the pitcher’s hand. Let’s imagine for the moment that the spin of the ball doesn’t change as it travels from pitcher to catcher. We know from Prof. Nathan’s work that the magnus force is not dependent on velocity—only rate of spin—at these speeds [See note in above section], so if the ball breaks 6 inches in the X dimension due to magnus force during the trajectory from mound to home plate, it’s breaking at a uniform rate of 1fps in X at all times during flight. Thus, if we define break as rate of spin-induced movement per unit velocity to plate, the break does in fact increase late in the trajectory (1x/130y < 1x/115y). In a game of inches, perhaps enough.

The ball's spin rate no doubt does decrease during its flight due to drag, but if the ball's spin-rate decreases at a normalized rate less than the ball's velocity decreases, then this sort of late-movement is real.

You’re Thinking Too 2-Dimensional, Marty

A second idea of how a pitch might deflect more at various points in its trajectory towards home plate, and one that I find more likely [see note at top], is that the plane of rotation changes while the baseball is in flight. The example I have in mind here is the perfect sinking fastball. When it leaves the pitcher’s hand, it’s thrown with (say 2000rpm of) backspin, so that the direction of magnus force is upwards, significant and working against gravity. Suppose that the pitch is also thrown such that its axis of spin rotates 180 degrees clockwise from the batter’s perspective over the distance from the pitcher’s hand to home plate. In this scenario, the ball would have “hop” for the first third of its trajectory, would slightly break horizontally for the middle third, then drop dramatically for the last third. This is because the direction of magnus force would turn uniformly from up, working against gravity; to the side, neutral with respect to gravity; then downwards as it approached the plate, in concert with gravity.

If it seems far-fetched that a pitcher has the kind of fine motor skill needed to impart such a finely controlled spin on a baseball, consider that knuckleball pitchers typically throw the ball such that it makes a half rotation from pitcher’s hand to catcher’s glove. This is known because the ball is spinning slowly enough to measure the spin with high speed video. A pitcher who puts late movement on his fastball has to impart that same amount of spin while also adding a component of very fast spin in the perpendicular direction (and another twenty miles per hour of initial velocity or so). If you are still not convinced, pay careful attention to the athletes themselves, as in this postgame recap from 2007:

The change in Halladay’s cutter wasn’t drastic, by any means. Fasano said that he offered a few tips about varying finger pressure with the grip that creates different types of movement with the pitch.

That’s recounting advice from backup catcher Sal Fasano to Roy Halladay, a pitcher to whom late movement is frequently attributed, as in this story by a different catcher of Doc’s:

“A lot of guys, they’re just kind of surprised,” Barajas said. “The pitches that are coming in, they look like balls. I’m sure they go up and they look at the videos and the pitches aren’t exactly where they thought they were going to end up, because he has so much late movement — late life.

Subtle changes in finger pressure to create different types of movement is the sort of tweak that, with a lot of practice and natural skill, would seem to add that crucial spin component that’s worth all those tens of millions of dollars.

So a perfect sinking fastball’s plane of rotation would make a half rotation from pitcher to plate, perpendicular to the direction the ball is thrown; a perfect cutter would make a quarter rotation, etc. This seems intuitively correct to me in considering that you can throw a cutter from the same arm slot as a straight fastball; and that a frisbee slider thrown with a fixed sidespin moves differently than a late-breaking slider with a slowly rotating angle of rotation.

I believe late movement is a real, measurable phenomenon in baseball, but it’s not to be found in the published Pitch F/X data, which is post-processed to give a smoothed, average trajectory assuming a fixed angle of rotation. Perhaps if all the in-flight pitch location recorded were available, it may be possible to estimate the angle of the ball’s rotation, but I’m not sure. What you’d really need is an incredibly high-resolution, high frequency doppler measurement so you could tell which side of the baseball is moving fastest and thus what the ball’s angle of rotation is for many samples during its flight.

Note to Self

Monday, May 10th, 2010

If we install Adobe Production Suite CS3 on new Win7 machines (hopefully we’ll have CS5, which looks fantastic), and we start losing network due to an incorrectly set default gateway of 0.0.0.0, fix it with this solution (the first response).

Configuring a Multi-boot System

Saturday, May 8th, 2010

I’m going to sort of live-blog my process of configuring my new office computer so that it’s a dual-boot Windows 7 and Linux machine. The first thing you need to do is select your preferred linux distribution and download the installation media. You can learn about pretty much every distribution out there from DistroWatch.com. A distribution is the set of standard applications, package installers, and configuration tools that different development teams maintain and distribute, wrapped around the Linux kernel. At work, we use the commercially maintained Suse. Many people I know use the community maintained Ubuntu. I use Slackware, which is maintained primarily by Patrick Volkerding. If you’re interested in having a Linux system that’s very painless to use and customize, I’d probably recommend Ubuntu. If you want to learn a lot about how Linux in specific and operating systems in general work, you’ll have a lot of fun with Slackware, which works just fine out of the box, too.

On we go:

1. You need to have some unallocated space on an installed hard disk. You can either slot a new one into your box or resize the existing disk partition. In the past, I’d use Partition Magic, which you can get on Hiren’s boot CD. Windows 7 has a very welcome “Shrink partition” routine, accessible by right-clicking “computer” in the start menu, and choosing “manage” in the context menu. Click the Disk Management submenu, then right-click on the system volume and choose “Shrink volume”. My computer came with a 1tb disk. I’m sacrificing 216gb for the Linux installation. 200 of that will be the linux partition and the other 16 will be a swap partition. When an OS runs out of available memory, it stores some of the data that was to be kept in memory to the hard disk in what’s called a page file. Windows stores page files on the system disk. Linux uses a dedicated disk to swap excess data from memory to. A sound rule of thumb is to allocate twice the amount of RAM for the swap disk and you’ll likely never see your system crash for lack of available memory.

2. Put the linux installation disk into your optical tray and restart the computer, booting off that disk. How to do that depends on your computer’s BIOS: some automatically boot from a CD when one is present, mine requires me to press F12 at boot time. I originally learned how to install Slackware (and a bunch of other stuff) from Grogan at BitBenderForums, although much has changed since then—notably, there’s no real point in partitioning your disks the way he did back when he wrote that. You just need one disk partition for the system and the swap partition. This is my first time installed Slackware since version 11, I think, and supposedly much has improved in the current release, which is 13. Grogan’s procedure is still a good guide: use fdisk to create your two partitions from unallocated space, change the swap partition’s id to 82, then run the slackware installer with setup. My computer came with 3 partitions installed, two of them for rescue partitions, one for Windows 7. I created an extended partition with the two logical partitions inside.

3. A few things have changed in the installer already. The EXT4 disk format is now available. Surprisingly Reiserfs is still, too, in spite of its author’s murderous ways. NTFS support is available now, too. The installer recognized the windows disks that are on this machine and asked whether I want to be able to see them when booted to Linux, I opted to allow users read-only access and to give root RW privileges. I did the full distro installation and enabled a few of the network servers like samba and nfs. After setup is done, you restart the computer and choose Linux in Lilo’s boot menu. In the past, I’d had to edit Lilo pretty extensively, but it appears to have installed nicely this time automatically. I create a non-root user for myself using the adduser script, then configure audio with alsaconf.

4. Everything works great out of the box. Slackware is configured to boot up to a bash shell. Since I’ll be using this as a desktop workstation, I’m changing that so it’ll boot up into the KDE graphical environment. To do that, you edit /etc/inittab using vim or emacs, and changing the line that reads:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

to this:
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

With that done, I issue the command:
shutdown -r now
to restart the computer and boot it up to Slackware in KDE using the user I created. (And the current version of KDE is quite beautiful out of the box).

That’s it. I’m done. Took me about an hour start to finish.

Later: Turned out that the installation killed my ability to boot to windows. Remember those utility partitions I mentioned? Lilo automatically assumed the windows system partition was sda1, which was a diagnostic partition. Editing /etc/lilo.conf to make windows boot to sda2 instead fixed that. I’ve also got the proprietary driver installed for my ATI graphics card, so I’m rolling along at full 1920X1080. I also had a weird problem with the network that sorted itself somehow after a bunch of poking at stuff.

Chase Utley’s Dinger off Trever Miller

Monday, May 3rd, 2010

Is the first he’s given up to a lefty since Kosuke Fukudome pulled one last summer. Glad both of the lefties have gotten their annual non-platoon home run out of the way early and in low leverage situations.

MPEG-LA Essay

Monday, May 3rd, 2010

I mentioned MPEG-LA and how annoying it is to be held hostage by its vaguely defined patent claims and enforcement tendencies back in the “Future of Computing” post that I still need to work on. Here Eugenia Loli-Queru points out problems I didn’t know existed: Why Our Civilization’s Video Art and Culture is Threatened by the MPEG-LA.

Here’s a counter-point/chill-pill: Is h.264 a legal minefield for video pros?

The Winning Percentage of the Beast

Saturday, May 1st, 2010

The objective, of course, is to win every series. Since the majority are 3-games long, the objective then is to finish the season with around a .666 (rounding down for mild comedic purposes) winning percentage—or two wins for every loss.

The Cardinals hovered about .666, or 2X+.500 if you cringe to invoke Beelzebaseball, throughout April and have the chance to finish May 1 there with a win this afternoon. Unfortunately, Kyle Lohse is pitching, so this one will be up to the offense. In their favor, Homer Bailey is pitching, whose struggles continue into this young season. His BABIP right now is .420, which is is ridiculously unfortunate and he’s still striking out batters at a very healthy clip. If the Cardinals take their free passes today, they should be able to score a bounty of runs.

After this series is a tough four-game stretch against the Phillies before settling into a pretty weak looking May with a bunch of games against the Pirates, Padres, Astros, Reds, and Cubs. If they go about their business, we should be looking at .666 to start June, too. And that’s a very happy thing.

Updated at 3:32: And that’s a winner!