The architectural design of Beijing's ancient complex of palaces and temples enabled it to survive centuries of earthquake shocks.