How is Pythagoras's theorem used in astronomy?