Virtual Batting Cage

The above video is from a midterm that was the first step towards creating an interactive batting cage that allows users to face off with real pitchers from Major League Baseball. The midterm featured a hollowed out plastic bat fitted with an accelerometer along with an Arduino Uno and is programed so that when a certain location is reached, a swing occurs in a p5 sketch.  The p5 sketch itself is a rudimentary batting practice where a “fastball” is thrown at the same speed every few seconds.

While this was certainly enjoyable, it definitely was a bit easy. The next step is to take actual data from five separate pitchers – Noah Syndergaard, Clayton Kershaw, Yu Darvish, Mariano Rivera and Tim Wakefield – and code it into the sketch. Rather than use all of the data made available though – my source for all of this is Fangraphs –  I boiled it down to what was essential for the sketch: the pitcher’s arsenal, the max/min velocity for each speed, the frequency which it was thrown and it’s xMov. The bat will also be fitted with a vibrating motor disc and haptic motor controller so that when the user gets a hit the bat will vibrate depending on if they made good contact or not. Let’s say the user is having too much difficulty hitting Clayton Kershaw. They can press a button located on the batting helmet they will be wearing to change pitchers. Let’s say the best the Show has to offer is too difficult for them. They can step on home plate to change game modes. Ultimately, when this is all said and done, I would love to take the final and make it a VR experience.

If you’re interested in seeing the final first hand it will be on display at the ITP Winter Show on December 18th and 19th and you can check my progress with it here.

P.S. In case you’re thinking to yourself: “Rivera? Wakefield?!” I’ve got two friends working on the project who are Yankees and Red Sox fans and while I am a die-hard Orioles fan, I couldn’t bring myself to put Dylan Bundy or Mike Mussina or like…Kevin Brown – can you believe he was an Oriole? – into the sketch. Though a part of me wanted to put Arrieta in there and just have him throw his cutter as a big middle finger to the Orioles pitching staff.

Leave a Reply

Your email address will not be published. Required fields are marked *