In my answer to this question - Finding the no. of possible right angled triangle. - I derived this result:
If a right triangle has integer sides $a, b, c$ and integer inradius $r$, then all possible values of $a$ and $b$ can be gotten in terms of $r$ as follows:
For every possible divisor $d$ of $2r^2$, $a = 2r+d$ and $b = 2r+\dfrac{2r^2}{d}$. These are exactly the solutions.
From this, of course, the number of solutions depends only on the prime factorization of $r$.
My answer involved some annoyingly complicated algebra.
My question is "is there a geometrical way to show that the expressions for $a$ and $b$ are true?"
(Added later)
Another way to phrase this, without mentioning divisibility:
Take a rectangle of area $2r^2$. Extend the sides by $2r$. Then the inradius of the resulting right triangle is $r$.
