Pythagoras in 3D