Use arrow keys to move the Dog on the stage, also use "s", "d", "f" and "e" keys to move the cat on the stage. You will see right triangle. Blue leg - is vertical side of the triangle, Green leg - is horizontal side of triangle, Red line - is the hypotenuse of the triangle. Deltax - shows the difference between x coordinated of Cat and Dog, Deltay - shows the difference between y coordinated of Cat and Dog. Distance shows the distance between Cat and Dog (the length of the red line). Distance is calculated by using Pythagorean property (Theorem).