Hi Jo,<br><br>Hmm.. I think that Voronoi Diagrams approach is usefull for computing &quot;circumscribed circle&quot; but not &quot;inscribed circle&quot;, if the geometry is triangle.<br><br><a href="http://en.wikipedia.org/wiki/Circumscribed_circle">http://en.wikipedia.org/wiki/Circumscribed_circle</a><br>
<br>But your result image seems to be well computed and have no problem.<br><br>Thanks for your reply.<br><br>Regards,<br><br>Sanak.<br><br><div class="gmail_quote">2009/6/28 Jo <span dir="ltr">&lt;<a href="mailto:doublebyte@gmail.com">doublebyte@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I thought I would published my solution here, for all the ppl who are lazy like me, and google for a solution before posting...<br>
Dis problem is reduced to finding the InCirce of a polygon, which is slightly different from the well-known geometry problem: largest empty circle.<br>
<br><a href="http://www.personal.kent.edu/%7Ermuhamma/Compgeometry/MyCG/CG-Applets/LgEmptyCircle/lccli.htm" target="_blank">http://www.personal.kent.edu/~rmuhamma/Compgeometry/MyCG/CG-Applets/LgEmptyCircle/lccli.htm</a><br>
<br>In the &quot;largest empty circle&quot; we calculate the Voronoi Diagrams and test each of its vertexes inside the convex-hull as a candidate for the center. It all comes down <br>
to a max-min optimization of the radius: the largest radius, that does not contain any points inside (and therefore, the circle is &quot;empty&quot;).<br>The Largest inscribed circle, is very similar except that here we look for a circle that does not contain the *actual* polygon (rather than just its vertexes).<br>

The distance we wont to test here is the (minimum) distance of the candidate centre to the polygon.<br>I struggled a little bit here to measure a distance from polygon to a point that is located inside it, and ended up having to decompose the polygon to its boundary<br>

to get it done (Im using OGR)!<br>Here is the result:<br><br><a href="http://ladybug.no-ip.org/files/inCircle.png" target="_blank">http://ladybug.no-ip.org/files/inCircle.png</a><br><br>Just as a final note: there are plenty (exact) implementations of the incircle (or apotheom) of a triangle or a regular polygon, but it becomes a bit complicated when we are dealing<br>

with irregular geometries, which is my case... (and prob everyone else workin in GIS)<br></blockquote></div><br>