ZHANGJIAKOU, China (AP) — Pure joy on the halfpipe looked like this on a sunny, windswept day at the Beijing Olympics:

—It was multinational freeskiing sensation Eileen Gu learning her gold medal was secure, then falling to her knees at the top of that halfpipe, covering her hands with her mittens and screaming “Oh my God!”

—It was the 18-year-old superstar doing straight airs all the way down the pipe, gleefully punching her fists and poles downward as she vaulted herself above the lip, enjoying every last second of a victory run that meant nothing — and everything.

—It was Gu wearing a furry panda hat as she climbed the podium, smiling wide and belly laughing while accepting her third Bing Dwen Dwen mascot of the Olympics — one for each medal she’s won.

“I was very emotional at the top and I chose to do a victory lap,” Gu said of her breezy final ride down the pipe Friday. “Because I felt like, for the first time, I really deserved it and I really earned it.”

There were smiles mixed with tears as Gu mingled with her competitors, the coaches and the media at the bottom — a huge sense of pride blended with incredible relief. Her two-week odyssey in China included 16 combined runs down halfpipe, slopestyle and big air courses and countless more practice trips down those same icy expanses.

By winning her gold, in a state-of-the-art contest over defending champion Cassie Sharpe, Gu is the first action-sports athlete to win three medals at the same Olympics. Two were gold and one was silver.

“She has basically set a level that’s pretty unattainable for a lot of us,” said American freeskier Carly Margulies, who finished 11th.

Gu’s trip to China was about more than sports. About 30 months ago, she took a chance and made a statement when she decided to wear the colors of her mother’s homeland — China, the host country — instead of those of her native United States.

She received some love and some hate for that move. She explained it time and again: She did it to inspire girls in China. There was little in the way of winter-sports culture here when she was younger. There certainly is more now.

“We’re not here to break limits for a country, we’re here to break a human limit,” Gu said.

Good intentions aside, ultimately her trip to the Olympics was destined to be gauged, at least on the outside, by how she did on the slopes. Yet again, with the pressure on and the world watching, Gu delivered. With her latest win, she stayed undefeated on the halfpipe this season.

“She’s a machine,” Sharpe said.

With winds gusting left to right on a 3 degree F (minus 16 degree C) day, Gu put this contest to rest on her first run. It included a pair of 900-degree spins in different directions, each frosted with full, second-long reaches downward to grab her skis.

Gu scored a 93.25 for that, then on her second run, she scored two points better.

She increased the difficulty on her final jump, going for back-to-back “alley-oop” flat spins in which she starts her spin facing up the halfpipe even though she’s traveling downhill. She landed both jumps without even a hint of a bobble.

One of her coaches, Misra Tornianen, was even more impressed with the 13 feet, 9 inches Gu flew above the halfpipe on her first hit.

“It’s amazing, all she has done without resting, dealing with the pressure and just delivering every day,” Tornianen said.

That Gu’s win wasn’t in much doubt hardly diminished the overall quality of the contest.

A year ago at the Winter X Games, Sharpe fell hard and tore up her left knee. On Friday, for only the second time in her career, she landed two 1080-degree spins in the same run.

Her 2-3 finish, along with teammate Rachael Karker, marked another beautiful day on the halfpipe for Canada. It was that country’s best freeskier, the late Sarah Burke, who pushed hard to get women included in halfpipe skiing, and then to bring the sport to the Olympics for the 2014 Sochi Games.

In a twist that feels like something different than just mere happenstance, the sport’s original star, Burke, and its newest one, Gu, share the same birthday: Sept. 3.

In an interview last year, Gu spoke about making a wallet out of duct tape for a sixth-grade art project. Across the front, she wrote “Celebrate Sarah,” a tribute to the pioneer who had died in a training accident in 2012.

“Even if I’m terrible at art,” Gu said that day, “I can still express myself to the best of my ability.”

A magazine cover girl who scored 1580 (out of 1600) on the SAT and is Stanford-bound next fall, Gu saves her finest artwork for the snow. Her latest performance launched her into the debate about best Olympic performances of all time.

When it comes to action sports, the versatile teenager is in the same conversation with snowboarder Shaun White, whose pressure-packed victory four years ago was an all-timer; it earned him a third gold medal over the span of 12 years.

And with her friend Chloe Kim, who has dominated her sport for a decade and left China with her second snowboarding gold in two tries.

It seemed only fitting that the final event of Gu’s freeski trifecta came in the same halfpipe where Kim won and White said goodbye to the Olympics the week before.

More than any other place in the action park, the halfpipe is where Olympic stars are born.

As Gu prepared to head down it for the first time of her last event, she placed her hands on her hips and closed her eyes, then repeated one sentence three times.

“I said ‘My name is Eileen Gu,” she told reporters as tears welled up in her eyes, “and I’m the best halfpipe skier in the world.”

After the pep talk, she pulled down her goggles, took off down the hill and proved that one more time.