3D pythagorean theorem solved