How can an earthquake felt thousands of kilometers away cause so much damage, while leaving almost untouched a major metropolitan area just 40 miles from its epicenter?
Some may think that it has to do with the quality of construction in the city versus satellite urban areas, but the reason probably has more to do with geology.
The Richter scale is a logarithmic measure, and an quake that registers 5.0 moves the ground ten times as much as one that measures 4.0, and one that registers 6.0 indicates that it is one-hundred times as strong as that 4.0 — but this only describes the movement of the earth. Energy is actually released at a much higher multiple as you go up the scale.
Without going into the math, an upward change of 1.0 on the Richter scale suggests 32 times the energy, and a 2.0 increase generates around 1,000 times as much energy. Chengdu was close to the epicenter, but it was not in the ‘hot zone’. A quick glance at the ShakeMap made available by the U.S. Geological Survey suggests in a visual way how much worse the earthquake might have been.
UPDATE: NY Times took related data from U.S. Geological Survey and made an even better graphic. From the graphic, you can see why Beichuan suffered more, though it was farther from the epicenter than Chengdu.