Pythagoras' Theorem with animation

This is an alternative proof of Pythagoras' Theorem. Change the size of the triangle and animate to see the proof in action.

What determines the position of the lines dividing the bottom square?