In the mid-60s, a golden generation of highly trained whizz kids was pouring out of American universities with PhDs in maths, engineering and chemistry. "It was the generation that went on to drive the development of silicon valley in the 1970s," says Dave Parker, director of the British National Space Centre. "And those people made the moon landing happen."
Wernher von Braun, spirited from postwar Germany in Operation Paperclip, designed the mighty Saturn V rocket, as high as St Paul's Cathedral, which was to carry Nasa astronauts to the moon. "The Saturn V was 365ft tall and made from millions of separate parts, and every single time they pressed the go button it worked," Parker says. "Every single time."
Getting off Earth was difficult, but even tougher tasks lay ahead. Colin Pillinger, who led the doomed UK efforts to land the Beagle 2 probe on Mars in 2003, says: "For Kennedy to stand up and say they were going to the moon and then to put a time limit on it was foolhardy. They just didn't have the technology."
Nasa originally intended to send a giant rocket to the moon, where it would land and then return. Instead, it settled on a more complicated plan involving multistage spacecraft, mid-space docking manoeuvres and a heartstopping final descent in a clumsy lunar lander.
"Everything in it was a step further than they had been before, and they had to do them all one after the other," Pillinger says. "There were single points of failures everywhere you looked." A single point of failure is a critical step that will bring the whole system crashing down if something goes wrong. In space, one single point of failure is the difference between life and death.
Getting off Earth was only the beginning. Parker says: "Getting to the moon is twice as hard as getting into orbit, and landing on the moon is twice as hard as getting there. And coming home is twice as hard again." A speech for President Nixon in the event of failure was written before the astronauts even left Earth.
As the Apollo 11 astronauts headed for the moon, their course trajectory was crucial. The moon is a big target, but the rest of the universe is even bigger. Of the dozen or so robot probes sent to explore the moon by the US and the Soviet Union before Apollo 11 took off, enough had missed the moon for Nasa to be concerned. The course could be tracked and corrected mid-flight, but that needed precisely timed firing of the engines.
"That's why the guidance computers were developed, to make sure they got the timing just right," says Doug Millard, senior curator of space technology at the Science Museum in London. But the term "computer" only barely applies to Nasa's primitive processing technology. Pillinger says: "The only calculator available to scientists at the time was the size of a cash register. You put the levers in the right place and wound the handle." Forget Twitter. While Nasa was at the bleeding edge, the 60s was a time when chemists still relied on logarithm tables, and engineers carried slide rules.
Forty years on, Tim Stevenson, chief engineer at Leicester University's Space Research Centre, says the real achievement of Apollo was less tangible than the programme's whizz-bang technology: fuel cells, inertial guidance systems, freeze-dried food, fire retardants and cordless power tools.
"Apollo was the combination of technologies, none of which was particularly dramatic. Combining it was the achievement. This was a bunch of people who didn't know how to fail. Apollo was a triumph of management, not engineering."