Scientists have uncovered clues to a 4,000-year-old mystery — the hidden logic behind where ancient Chinese built their tombs.