Is there any algorithm by which one can calculate the fermat's point for a set of 3 points in a triangle? a fermat's point is such a point that the sum of distances of the vertices of the triangle to this point is minimum. I came across several mathematical proofs regarding this ,but can't get an algo for actually calculating it programmatically for given 3 points. Can someone please help on this? Thanks.
calculating the Fermat point of a triangle
3
$\begingroup$
geometry
algorithms
triangles
-
2The construction described at http://en.wikipedia.org/wiki/Fermat_point seems like a straightforward algorithm to me. – 2011-08-28
-
0programmatically?? – 2011-08-28
-
0What's the difficulty with implementing that construction programmatically? – 2011-08-28
1 Answers
3
If the angle at A is 120 degrees or more, $a^2 \geq b^2 + bc + c^2$ and the Fermat point is at A. Check this for B and C, as well.
When all angles are less than 120 degrees, the Fermat point is number 13 in the list of triangle centers here:
http://faculty.evansville.edu/ck6/encyclopedia/ETC.html
where you can find barycentric coordinates of that point as a function of the sides of the triangle. Given barycentric coordinates for any point its Cartesian coordinates can be calculated from the Cartesian coordinates of the vertices of the triangle.
-
0i tried calculating the catesian co-ordinates but not getting the correct result: `Y= ((U+V+W)/3.0+(ax*cy)-(cx*ay)+(bx*ay)-(ax*by)+(cx*by)-(bx*cy))/((2*(bx-cx)));` `X= ((U-V-W)/3.0+(cx*by)-(bx*ay)-(ax*cy)+(cx*ay)-(bx*ay)+(ax*by))/((2*(by-cy)));` where U,V,W are the barycenters and a,b,c are the cartesian co-ordinates of vertices. – 2011-08-31
-
1If A,B,C are Cartestian coordinates of the vertices and barycentric coordinates are (p,q,r) then the Cartesian coordinates of the point are (pA+qB+rC)/(p+q+r). Usually the barycoordinates are normalized so p+q+r = 1. The "+" means addition of vectors. At the Encyc.Triangle Centers web site they sometimes list trilinear coordinates and not barycentric, but there is an explanation (a formula) at the top of the page on how to convert the two. – 2011-08-31
-
0thanx a lot again :) – 2011-09-02