calculate Fermat Point

Returns the first Fermat point of a triangle with vertices (A,B,C).
Updated 19 Jun 2023

View License

calculateFermatPoint(A,B,C) returns the first Fermat point of a triangle with vertices (A,B,C). "In Euclidean geometry, the Fermat point of a triangle, also called the Torricelli point or Fermat–Torricelli point, is a point such that the sum of the three distances from each of the three vertices of the triangle to the point is the smallest possible[1] or, equivalently, the geometric median of the three vertices. It is so named because this problem was first raised by Fermat in a private letter to Evangelista Torricelli, who solved it."
This implementation was based off the Mathematica code by E. Coiras at:
Aaron Becker, and David Kramer
Last updated June 17, 2023
testCalculateFermatPoint.m Generates and plots a random triangle and the First Fermat Point. It tests the function calculateFermatPoint(A,B,C)
The vertex angles are less than 120° the First Fermat Point is in the interior of the triangle; otherwise it is the obtuse-angled vertex.

Cite As

Aaron T. Becker's Robot Swarm Lab (2024). calculate Fermat Point (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Formatted the description