An oversized wooden compass sits on the dusty baseball field. Three students stand next to it, holding a giant yellow slingshot pulled taut. The girl in the middle leans back, gaining traction, and releases, launching a tennis ball across the field at a perfect 45-degree angle.

They were among a dozen students from Mansfeld Magnet Middle School who took the field on Saturday, measuring ball trajectory and pitch velocity in a Science of Baseball camp.

Ricardo Valerdi, a professor in the University of Arizona Department of Systems and Industrial Engineering, started the camp three years ago.

The Red Sox season-ticket holder said he started looking at sports in a new way after attending a sabermetrics course, on the statistical analysis of baseball, taught by a colleague at Massachusetts Institute of Technology.

“A light bulb went off for me, and I went from a fan to an analyst,” Valerdi said. “I realized this was something we could do with kids of all ages, not just college students.”

Fresh off of the UA baseball team’s 2012 NCAA national championship, Valerdi said Tucson was baseball-crazy, and it was the perfect time to start.Having just accepted a job at UA, Valerdi brought the idea for the camp to Mansfeld’s principal at the time, who loved it. The first Science of Baseball camp took place at Mansfeld in 2012, and returned on Saturday to the school at 1300 E. Sixth St.

“This program gives students the opportunity to see real-life applications of math, technology and engineering,” said Mansfeld social studies teacher and coach Kevin Brungardt. “It allows me to support those fields and to incorporate those lessons into my teaching.”

Mansfeld recently transitioned to a school that focuses on science, technology, engineering and math education, or STEM, so the program is perfect for it, he said.

Before hitting the baseball field, students learned about scorekeeping, football pressure and pitching biomechanics in the classroom. Once they got to the field, they used tennis and whiffle balls to keep the day injury-free.

“I thought it was pretty interesting,” said 13-year-old Araceli Romero. “I like baseball; that’s why I wanted to come.”

A year ago, the university approached Valerdi and the program was turned into a nonprofit called Science of Sport. It’s now paired with the Arizona Diamondbacks, the Los Angeles Angels, the Colorado Rockies and the San Diego Padres, and in talks with four other Major League Baseball teams that are interested in joining the program.

“We have a state goal in Arizona to bring the program into all of the schools,” said Science of Sport spokeswoman Crystal Kasnoff. “We want to get kids interested in STEM fields, and with this, they relate what they do every day to STEM.”

There is an extreme shortage of STEM workers in general, Kasnoff noted, with even fewer women in STEM careers.

“We get a lot of girls, and they do incredibly well. They’re really engaged,” she said.

In the last year, the program has moved into Calilfornia, Illinois and Australia and a soccer program has also been developed. Valerdi and Kasnoff are in talks with the NFL to develop a football version of the program.

Matt Yalung, an engineering graduate student, has known Valerdi for three years and was one of five UA students assisting.

“Being with kids is fun, watching them learn how sports relates to STEM,” he said.