Constructing a right triangle with a given hypotenuse segment and given point of tangency for its incircle 
Given a hypotenuse $AB$ and an arbitrary point $C$ on $AB$. How to construct a right triangle with the given hypotenuse $AB$ such that point $C$ is the point of tangency of the inscribed circle?




My attempt: First draw a circle with $AB$ as diameter (Thales theorem). if i get the incenter of the triangle then the rest is easy. but how to locate the point$G$ on the circle  or how to locate the incenter with the given information
. any hints or idea
here is my construction.
$F$ is the midpoint of $CD$
here]


Let $ABG$ be the triangle you want to construct, $F$ its incenter. In the circle $\Gamma$ with diameter $AB$, let $D$ be the endpoint of the diameter perpendicular to $AB$ and on the opposite side of $AB$ to $G$.
Since $AGB$ is a right triangle, $G$ lies on $\Gamma$. Because $GF$ bisects $\angle AGB$, it meets $\Gamma$ at $D$. Furthermore, it is easy to see that $\angle AFB = 135^{\circ}$. It follows that $F$ is on the circle $\Gamma'$ centered at $D$ passing through $A$ and $B$.
Hence $G$ can be constructed as follows. First construct the point $D$. Then let $F$ be the intersection of $\Gamma'$ with the perpendicular to $AB$ through $C$. Lastly, let $G$ be the other intersection of $DF$ with $\Gamma$.
