Find the number of positive integer solutions such that $a+b+c\le 12$ and the shown square can be formed. Find the number of positive integer solutions such that $a+b+c\le 12$ and the
shown square can be formed.

$a \perp b$ and $b\perp c$.
the segments $a,b,c$ lie completely inside the square  as shown.

Here is my attempt but I am pretty sure this is not the efficient method
Let the angle between left edge of square and segment $a$ be $\alpha$. To form a square we need the horizontal projections equal the vertical projections. Using similar triangles it is easy to get to below equation
$$\langle \cos\alpha ,~\sin \alpha\rangle \cdot \langle b-a-c,~a \rangle = 0  $$
I feel stuck after this. Any help ?
 A: Here is a start.
Extend the line
of length $a$
by an amount $c$
and then draw a line
from the end of that
to the corner of the square
that ends the line of length $c$.
This forms a right triangle
with sides
$a+c$ and $b$
whose hypotenuse is the
diagonal of the square.
This length is
$\sqrt{(a+c)^2+b^2}$,
so the side of the square is
$\sqrt{((a+c)^2+b^2)/2}$.
This does not take into account
the condition that
the lines line inside the square,
but it is a start.
A: We start off by noting that $$a\sin(\theta)+b\cos(\theta)+c\sin(\theta)=a\cos(\theta)-b\sin(\theta)+c\cos(\theta)$$ and that therefore all solutions will be of the form $$(a+b+c)^2\cos^2(\theta)=(a-b+c)^2\sin^2(\theta)$$
Which, in turn yields $$2(ab+bc)+(a^2+b^2+c^2+2c)(\cos^2(\theta)-\sin^2(\theta))\equiv2(ab+bc)+(a^2+b^2+c^2+2c)\cos(2\theta)=0$$ Which implies that for all $a+b+c \leq 12$ such that $(a^2+b^2+c^2+2ac) \leq 2b(a+c)$ we have a solution. It also implies that $\theta>\pi/4$ for all solutions, which makes sense if you look at your picture (otherwise $|b|<0$)
