How does depth perception work? - How does the frog know where the fly is? Move the fly around, and see how the hungry frog track it. Help the frog catch the fly by setting the distance and direction of the tongue. Click the checkbox to see the math behind the scenes. In how many different ways can you find the fly's position?