Fill a polygon with triangles with certain criteria

351 Views Asked by At

I have a random polygon like the example below (in general the polygon can have n vertices where n > 3).

enter image description here

I want to find set of 3 vertices that constructs triangles inside the polygon in a way that below ratio is as close to 1 as possible.

$$\frac{2R_i}{R_o}$$

where $R_i$ is the radius of the circle inscribed in a triangle and $R_o$ is the radius of the circle circumscribed around the triangle.

If $a$, $b$ and $c$ are the length of the edges and $s=(a+b+c)/2$ $$R_i=(s-a)(s-b)(s-c)/2$$ and $$R_o=\frac{abc}{\sqrt{(a+b+c)(b+c-a)(c+a-b)(a+b-c)}}$$

Note that I know the coordinates of each vertex in 3D so I can calculate any angle or distance.