the weight of each triangle is the area of each triangle when you are working with a flat object. You can calculate the area of each triangle and the center of mass.Ĩ) You can find the center of the polygon by finding the weighted average of all the triangles. If you have a triangle greater than 90 degrees it indicates that the triangle is describing an area outside the polygon.ħ) Now you can process the list of triangles. To remove any triangles with acute angles (less than 90 degrees). I think you one want to remove triangles that are three consecutive points in the polygon. Realize the removing a triangle may divide the polygon into two polygons. Store the removed triangle into a List objectĦ) Repeat process until the entire polygon is divided into triangles. The algorithĢ) Get the next two vertices so you have three points which is a triangle.ģ) Next verify if any of the other vertices in the polygon is inside the triangle.Ĥ) If you find another point inside the triable skip these three points and get another three points.ĥ) If there is no vertices inside the triangle remove the triangle from the polygon by eliminating the middle vertices from the polygon. Since you have a polygon we will assume all edges are straight lines. So the first thing you need to do is define what a "part" realy is? The solution is to divide the polygon into triangles and calcuate the area of each triange. Waht do you think? they are only answering a part of the question. You are looking for " center of largest part ". I don't think people are really ansering the question you asked. If I provoked Aha! please click Propose as Answer If I provoked thought, please click the green arrow "Premature optimization is the root of all evil." - Knuth Support for the OP in his math homework, which is fine by me. Other responders will make their own judgement on an appropriate degree of I will also assist in identifying "well-known" math algorithms for well-defined problems, but "general research" in this area does not appeal to me. I will assist with coding and other C# issues This is a C# forum, not a Mathematics & Geometry forum. That leaves the circumscribed circle (what I referred to as the exscribed circle above, and which always exists) and the bary-center or center-of-gravity (which also always exists) as common mathematicalĤ) My approach at this point, having pointed out some of the relevant mathematics and geometry, is to wait for the OP to do his math homework. General than these, so the inscribed circle will not exist. Unfortunately the current problem is more And responders need to assist each other as well as just OP's.ģ) After writing my question I refreshed my memory on the relevant geometry, and was reminded that the inscribed circle only exists for these cases: triangles, regular polygons and occasional special cases. I believe it is the former, others here believe it is the latter.Ģ) Agreed. 1) Now we need to know whether by "hole" he means "cavity as in concave", or "hole as in torus".
0 Comments
Leave a Reply. |