In the popular fable of Jeremy Lin’s life story, the villains are the NBA scouts and executives who overlooked the Harvard-educated, Asian-American point guard from Palo Alto.

Such a storyline, while convenient, undercuts a key aspect of Lin’s rocket ride to stardom. The New York Knicks sensation is thriving not because his skeptics were wrong. Lin is thriving because he realized they were right.

He really was too willowy to survive the muscled forest of an NBA defense. He really was lacking a consistent jump shot.

So Lin rewrote his scouting report, reinventing himself shot by shot and pound by pound.

“That’s the lesson here: If you don’t like the way things are going for you in a sport, don’t cry about it. Don’t whine to the coach. Do something about it,” said Doc Scheppler, who helped Lin refine his shooting fundamentals.

Over the span of more than three body-transforming months, Lin doubled the amount of weight he could squat (from 110 pounds to 231 pounds), nearly tripled the number of pull-ups he could do (from 12 to 30) and abandoned the shooting form he’d been using since eighth grade (he’s now among the most accurate point guards in the NBA).

He did so by crisscrossing the Bay Area all summer, honing his shooting touch with Scheppler in Los Altos Hills, building up his lower-leg strength with trainer Phil Wagner in Menlo Park and sculpting his upper body with E.J. Costello at 24 Hour Fitness in Pleasanton — often on the same day.

“He’s got the mental makeup of a Hall of Famer,” Wagner said.

Despite a rough game Thursday night — eight points and eight turnovers in a loss at Miami — Lin remains one of the hottest stories in the history of American sports. He has been invited to participate in Rising Stars Challenge, a game Friday that features rookies and second year players as part of this weekend’s NBA All-Star Festivities.

The only thing being ignored now is the work that went into becoming an overnight success.

‘Beating the Ghost’

By all accounts, Lin was a terrific shooter as a little kid. It wasn’t until around the eighth grade, when boys typically grow strong enough to hoist shots from over their head, that Lin developed a hitch.

For one thing, he brought the ball too far behind his head. For another, he started his shooting motion too late. The result was a release that lacked rhythm, a shot that looked more like a fling. “Those are angry balls,” Scheppler said. “There’s no polish. You’re not controlling the force or the direction of the ball.”

No one fretted too much since the rest of Lin’s game was what mattered anyway. He was then, as he is for the Knicks, a pass-first point guard and floor leader whose best scoring move was to drive to the basket.

With the Warriors last season, however, Lin was limited to a perimeter game and that awkward release. “Mediocre-ly proficient,” Scheppler called it.

Lin’s shooting flaws could no longer be ignored if he wanted to thrive in the NBA. Enter Scheppler, the girls basketball coach at Pinewood High School in Los Altos Hills, who had once coached Lin’s high school coach — Peter Diepenbrock.

The tutoring sessions started last May. In a favorite drill called “Beat the Ghost” the coach had Lin go one on one against an invisible defender and fire shots from NBA 3-point range.

Sink the shot from the top of the key and get a point. Miss the shot and the ghost gets three points. The first one to 21 wins.

The ghost trounced Lin in the early going, winning by scores such as 21-9, 21-10 and 21-11. A frustrated Lin would sometimes refuse to move on to the next drill, pleading for a rematch. “He’d say, ‘No, no, no, Doc. I have to beat the ghost,” Scheppler recalled.

Lin eventually did ward off the evil spirits, once Scheppler taught him how to load his shot earlier so that he could release the ball in rhythm at the apex of his jump. (At the end of one session, Scheppler calculated that Lin had hit 70 percent of his shots beyond the arc. No matter — Lin was still disgusted with himself.)

He lowered the arc on Lin’s shot by exhorting him to snap his wrist sooner during the release. He moved Lin’s feet out wider so that they were positioned under his shoulders for optimum stability.

It took 500 to 600 shots over the course of 1½ hours, three days to four times a week. But by the end, Lin’s flaws vanished like the ghost.

Earlier this month, on the night that Lin drained a 3-pointer from the top of the key to beat the Toronto Raptors, Scheppler’s phone buzzed with a text message.

“Doc, that was all you,” Lin wrote. “Thanks for everything you did this summer.”

The body

On the day Lin reported to the Sparta Performance Science facility in Menlo Park, he was instructed to jump with all his might on a rectangle about the size of a welcome mat.

The so-called force plate, installed under the floor, is Sparta’s way of measuring an athlete’s strength, flexibility and stamina.

The test revealed a weak link in Lin’s conditioning: The point guard lacked the lower-leg strength he would need to maintain his balance in traffic.

Part of Lin’s weakness stemmed from a patellar tendon injury sustained the previous season. Still, his squat strength was embarrassingly low for a professional athlete. He could do 110 pounds three times.

But by the time he left, he was doing three repetitions of 231 pounds.

“He went from being a motorcycle to being a Porsche,” Wagner said. “Anybody in an accident on a motorcycle is going to be in a lot of trouble. But if you’re in a well-built car, it’s a different story. That’s where Jeremy is now — he’s much more stable in traffic.”

Hindered by injuries during his UC Davis playing career, Wagner concluded that there has to be a better way than a one-size-fits-all training approach. Now, armed with a medical degree from USC, he runs his facility as if it’s a doctor’s office. Athletes are diagnosed and then “prescribed” a personal regimen.

In Lin’s case, that meant a program that would allow him to stay even on his feet. His work included squatting, sprinting and hopping onto a slide board to improve his lateral movement.

To supplement those workouts, Lin would often head to the 24 Hour Fitness in Pleasanton, where he could play 5-on-5 pickup basketball and work with Costello, a personal trainer.

Costello stressed a routine heavy on pull-ups, push-ups and sit-ups.

These days, Costello smiles whenever he hears about how Lin is the “kid who came from nowhere.”

“To a point, he did. I don’t think even he could envision what’s happened,” said Costello, who now works at the 24 Hour Fitness in Concord. “But I’ve never seen anyone work harder than him — ever.

“If there were 40 hours in a day, he would have used them. He’s earned every second of what’s going on.”