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.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
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:
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.