3-D Pythagoras