The winter X Games in Aspen began on Thursday, which means extreme skiers and snowboarders performing tricks that will make your stomach drop, even if you’re just watching from the comfort of your couch. Each year these athletes attempt to jump higher, fly further, spin faster and generally do more ridiculous stunts than they did the year before. And as the competitors progress, the courses they ride have to evolve, too. To deliver the thrills that audiences and athletes want, course designers must find ways to allow riders to go bigger without compromising their safety.

Chris Gunnarson is the president of Snow Park Technologies, which for 21 years has been building, among other things, snow features for these games, including jumps from small to massive. I asked Gunnarson to walk me through some of the math involved in building courses for two of winter X Games’ most iconic events: big air and slopestyle. Big air is just one massive, terrifying jump where the goal is for athletes to land the biggest trick they can. Slopestyle is a long run that starts with a relatively level section at the top, where skiers and snowboarders grind and do tricks off rails and boxes, before the course descends rapidly into a series of three increasingly large jumps.

As the courses and performances get bigger and more innovative, athletes are continually giving SPT feedback on how the jumps feel and whether they allow the latest tricks. But as important as rider feedback is, Gunnarson bases much of the course design on the cold realities of physics.

“A simple ballistics calculator” — like one a hunter might use — “is one tool used to look at what gravity will do to a moving object, like an arrow being shot from a bow,” Gunnarson told me. “The initial angle and speed of the arrow will dictate the distance it will go and the arcing path it will follow.” Similarly, if you know the speed at which the skier or snowboarder hits the jump, how much they weigh and what angle they take off at, you can draw the arc of their trajectory and more or less pinpoint where they will land.

The jumps on both the big air and slopestyle courses will have a final launch angle of 32 to 35 degrees, and each landing area has a “sweet spot,” which has a grade of somewhere between 34 and 37 degrees. Given a typical rider’s speed and the angle at which they take off, that slope is the best way to allow them to come down, set the edge of their board or skis, and gradually change the downward momentum they picked up while falling back into forward momentum. If the landing zone is too flat, all that downward force goes directly into the rider’s legs, which may result in more impact than they can handle. If it’s too steep, the rider can’t slow themselves down and regain control.

On the slopestyle course, Gunnarson says, the lip of the jump is typically four to eight feet above the top of the landing area, which helps the athletes get more hang time than the ramp alone would give them. The horizontal distance between the lip and the landing area increases with each jump to account for the rider’s ever-increasing speed as they come screaming down the mountain.

While these calculations seem simple enough in theory, SPT’s builders must also take into account a number of confounding real-world variables that make the equations much more complicated. The quality of the snow changes how much friction is dragging on the board or skis, making the jump faster or slower, and of course each rider’s mass affects their speed through the air. The way competitors hit the jump matters, too. “One rider might ‘pop’ off the takeoff, thereby increasing their launch angle and potentially increasing their height in the air and the distance they travel,” Gunnarson said. “Another rider might ‘press’” — bend their knees as they take off — “by absorbing the takeoff, thereby decreasing their launch angle, which may also decrease their height in the air and the distance they travel.”

These factors can create a tremendous amount of variation in where the rider comes down, which creates a potentially dangerous problem. Even when conditions are ideal, a handful of riders are injured every year simply because they are pushing their limits. (ESPN stated that it does not publicly share event injury statistics.) So building a landing area that helps keep athletes safe is all about putting the sweet spot in a location where riders taking a wide range of trajectories can hit it.

SPT has found that for both slopestyle and big air, the sweet spot should begin between 55 and 75 feet from the lip of the jump and should maintain a consistent angle for at least 100 feet before it starts to fade into the normal slope. Essentially, the course designers make it nearly impossible to overshoot the landing, even when riders cover a huge distance — some of the snowboarders in the 2016 big air event flew more than 100 feet.

The jumps that course designers build for the X Games are very different from the features you’d typically find at a ski resort. Everything is scaled up and built for elite riders who are constantly redefining what is possible in their sport. And neither the designers nor the athletes could pull it off without the math that determines how the courses can keep up with riders while also keeping them safe.