This might be a simple algorithm but I haven't found any answer related to it...
The question is simple, given any convex quadrilateral $Q=[a,b,c,d]$ and a point $p$ inside $Q$, how is it possible to compute the radius of the largest incircle with center in $p$?
I know that since $p$ can be given at any point, the circle can be tangential to $4$, $3$, $2$ or $1$ edges of $Q$.
Some picture examples follow:
Incircle tangential to 4 edges
Incircle tangential to 2 edges
Incircle tangential to 1 edges
Any help would be much appreciated! Thank you in advance! (:
For each of the four edges of the quadrilateral, compute the distance from that edge to $p$. The minimum of these four distances is the radius of the largest incircle centered at $p$.
It is an easy exercise to show that this method works. Note that it uses the fact that the given quadrilateral is convex.