Katie Ledecky is all smiles after winning gold in the 200-meter freestyle Tuesday night at the Rio Games. (Jonathan Newton/The Washington Post)

Just as Tuesday night was turning to Wednesday morning, 13½ feet worth of superstar athlete showed up at a closed door in the bowels of the Olympic Aquatics Stadium that, moments earlier, Katie Ledecky had entered, accompanied by a woman with a clipboard and a briefcase. Team USA hoopsters Kevin Durant and Draymond Green, who had watched from the stands half an hour earlier as Ledecky won her second gold medal of these Olympics, were on a mission to meet her. And now they were so close.

“Tell her it’s KD!” Durant blurted to someone standing outside the door.

But as that particular door was marked “Doping Control” and as doping control is a process that is both sacrosanct, procedurally speaking, and necessarily private, Ledecky was not available. And so two of the most recognized athletes in the world waited perhaps 10 minutes until Ledecky emerged. Only then did Durant get the photo — he and Ledecky, grinning, arms around each other — that he would send out moments later to his 8.4 million Instagram followers, with the tagline, “It’s just a Maryland thing!!”

Ledecky and Durant both grew up in suburban Maryland, just outside Washington.

For most great Olympians — which is to say, all except NBA superstars and a handful of others — the Olympic quadrennial is a largely lonely stretch, bookended by intense bursts of attention. Ledecky reached a briefly high level of fame when she won Olympic gold in the women’s 800-meter freestyle as a 15-year-old in London in 2012, then receded into the shadows, even as she grew into the dominant freestyler in the world.

Katie Ledecky developed the "gallop" in her stroke with former coach Yuri Suguiyama. It gives her an advantage in the pool over her female competitors, since most do not have the strength to sustain it. (Jayne Orenstein/The Washington Post)

But it was during those quiet years away from the Olympic spotlight that Ledecky grew into the champion on display this week, one who — with wins already in the 400 freestyle Sunday night (with a world record time) , the 200 free Tuesday night and the 4x200 free relay late Wednesday — is now three-quarters of the way to what is expected to be a four-gold haul. Only Amy Van Dyken (1996) and Missy Franklin (2012), among female American swimmers, have matched that in a single Olympics.

In the fall of 2013, following Ledecky’s four-gold medal performance at the world championships in Barcelona at age 16, she and coach Bruce Gemmell sat down to discuss her goals. Gemmell had taken over as Ledecky’s coach a year earlier, following the London Games, and thought he had a good handle on what she was capable of. But Barcelona had blown that plan apart.

“In 2012, we had made some 2013 goals,” Gemmell recalled this week. “And I don’t want to say we made them hastily. But I got there, and I didn’t really know what I had. [But] after having been through Barcelona, it was a case of, ‘All right, let’s look at the bigger picture.’ I didn’t want to sit down in the fall of ’12 and say, ‘Okay, what do we want to do in ’16?’ But once we had gotten through Barcelona, it’s more of, ‘Okay, let’s think — not just about next year, but let’s talk about Rio.’ ”

Gemmell, now 55, had left the corporate world a few years earlier to resume a career as a swim coach, and he brought with him some of the silly acronyms and corporate speak from his previous gig. One of those acronyms was BFHG — Big Fat Hairy Goal.

“You know,” Gemmell said. “Not the little ones — what’s the big one?”

Gemmell and Ledecky identified a handful of BFHGs for Ledecky to shoot for in Rio — goals that both keep private, even from Ledecky’s family. Only when she hit the first of them Sunday night did Ledecky reveal one of those goals publicly: a time in the range of 3:56 in the 400 free. Ledecky’s world record time Sunday night: 3:56.46, nearly two seconds better than her previous world mark and nearly five seconds ahead of the runner-up.

Gemmell doesn’t remember whether it was he or Ledecky who first brought up a 3:56 back in 2013, but either way, it was downright preposterous. The world record back then was 3:59.15, set by Italy’s Federica Pellegrini in 2009, during the era of high-tech swimsuits that were later banned. Ledecky’s career best was the 3:59.82 she threw down to win the gold in Barcelona.

But Ledecky implied the notion had come from Gemmell. “I always rely on him to help set my goals,” she said, “because you never know what’s possible unless you hear somebody else say it.”

Asked whether he considered a 3:56-something to be outlandish at the time, Gemmell said, “Absolutely. And that was the whole point.”

“The idea was, what’s the man-on-the-moon goal?” Gemmell said. “What’s going to get you excited for three years and make you want to get out of bed in the morning and go to practice?”

This particular BFHG had a target date: the 2016 Olympics. The overarching strategy, as with most Olympic athletes, was to structure Ledecky’s training in a way that ensured annual peaks at each year’s biggest meet, with the biggest of those peaks ideally coming at the Olympics — a coaching dynamic Gemmell described as “part science, part art, part witchcraft, part seat-of-my-pants.”

It is clear by now, halfway through the Olympic swim meet, that Gemmell’s three-year vision and Ledecky’s training have paid off. The evidence is in not only the 3:56.46 in the 400 free, the 12th long-course world record of her career, but in Ledecky’s two sizzling swims in the 4x100 free relay — helping the U.S. team to a silver medal — as well as her gutsy gold medal performance in the 200 free Tuesday night, when she pushed herself so hard in her most difficult race of the week that she nearly threw up.

But even for people who have watched Ledecky closely over these past few years, there is something different about her this week — an intense focus to her preparation, a brutal efficiency to her stroke. She is at her absolute peak form, just as Gemmell had scripted it, which is saying something when you’re speaking of a woman who owns nine of the top 10 performances all time in the 400 and all 10 in the 800.

“Oh, she’s dialed in,” U.S. women’s Coach David Marsh said. “But then again, I don’t know that I’ve never seen her not dialed in.”

After leading the United States to the gold medal, her third of these Games, with a powerful anchor leg in the 4x200 Wednesday night, Ledecky now has two swims left in the Olympics, two swims left to complete the three-year mission she and Gemmell concocted after Barcelona. Both come in the 800 free — with a preliminary heat Thursday afternoon and the final Friday night — an event in which no one in the world has been within 11 seconds of her this year.

A win in the 800 — as foregone a conclusion as there is in the entire Olympics — would complete a sweep of the 200, 400 and 800, something that only Debbie Meyer, in 1968, has ever done. And based on what Ledecky has already shown, her own world record of 8:06.68, set in January, is in its dying days.

The 800 was discussed back in 2013 during that conversation about Big Fat Hairy Goals between Ledecky and her coach, and the target time for Rio was likely just as outlandish as the one in the 400.

And whatever that number was, she won’t reveal it, if she does at all, until the race is over and the target is reached. Then Ledecky’s future goals — and by extension, the understood limits of human performance in the water — must be recalibrated yet again.