Thanks much! It seems so obvious now that you pointed it out... anyways, thanks again!<div><br></div><div>Tyler<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 3:47 PM, Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Wed, 9 Feb 2011, Tyler Leavitt wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At the moment, no, this isn&#39;t allowed =) I had thought of that, and then with all the difficulty I&#39;ve had without taking this into account, I&#39;d figured one step at a time.<br>
</blockquote>
<br></div>
You replied in private. (why ?)<br>
<br>
Anyway, I reply back to the list.<br>
<br>
suppose you have 4 points a,b,c,d with polygon edges ab, bc, cd. They have diagonals ac, bd. They form triangles abc and bcd that intersect. The intersection is bce where e is the single point at the intersection of ac and bd.<br>

<br>
e is a + p*(c-a) where p is some number between 0 and 1, which is the fraction of the travel from a that you have to do to reach e, when going in a straight line towards c.<br>
<br>
e is also b + q*(d-b).<br>
<br>
e = a + p*(c-a) = b + q*(d-b).<br>
<br>
I don&#39;t quite remember how to continue the reasoning from there.<br>
<br>
However I found this out <a href="http://en.wikipedia.org/wiki/Line_intersection" target="_blank">http://en.wikipedia.org/wiki/Line_intersection</a> which I can translate to :<br>
<br>
e = (det(a,c)*(b-d) - det(b,d)*(a-c)) / det(a-c,b-d)<br>
<br>
after that, it&#39;s easy, as the area of the bce triangle is det(b-e,c-e)/2, as you&#39;d do for any triangle. This part can be computed using this abstraction : <a href="http://gridflow.ca/help/%23polygon_area-help.html" target="_blank">http://gridflow.ca/help/%23polygon_area-help.html</a><br>

<br>
With your example, you have to do the above calculation 5 times on different combinations of points, to get 5 different inner points and 5 different areas. Then you combine the inner points to get the areas of 5 more triangle. Area #1, in the middle, is not a triangle, but you can compute its area with [#polygon_area] anyway.<div>
<div></div><div class="h5"><br>
<br>
 _______________________________________________________________________<br>
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC</div></div></blockquote></div><br></div>