Pythagoras Theorem Simulation