Message Boards Message Boards

Fermat Point of a Tetrahedron

Posted 7 years ago

In a triangle, the Fermat point minimizes the total distance to the vertices. There are numerous ways to find it.

In a tetrahedron, the Fermat point minimizes the total distance to the vertices. Here's some code.

FermatPoint[{{x1_, y1_, z1_}, {x2_, y2_, z2_}, {x3_, y3_, z3_}, {x4_, y4_, z4_}}] :=  
  Module[{pts = {{x1, y1, z1}, {x2, y2, z2}, {x3, y3, z3}, {x4, y4, z4}}, fermat, cs, extend, other},
    fermat = {a, b, c} /. NMinimize[Total[EuclideanDistance[{a, b, c}, #] & /@ pts], {a, b, c}, WorkingPrecision -> 30][[2]];
    cs = Circumsphere[Append[#, fermat]] & /@ Subsets[pts, {3}];
    extend = Table[a /. Quiet[Reverse[Solve[EuclideanDistance[a fermat + (1 - a) pts[[5 - k]], cs[[k, 1]]] == cs[[k, 2]]]]][[1]], {k, 1, 4}];
    other = Reverse[Table[extend[[k]] fermat + (1 - extend[[k]]) pts[[5 - k]], {k, 1, 4}]];
   {fermat, other}];

From the 2D Fermat picture, lines from the vertices to the Fermat point to the circumcircles all have the same length.

pp = Partition[RandomSample[FareySequence[40], 12], 3];
fp = FermatPoint[pp];
Graphics3D[{Red, Point /@ pp, Blue, Point[fp[[1]]], Gray, Table[Line[{pp[[k]], fp[[2, k]]}], {k, 1, 4}], Black, Point /@ fp[[2]]}]  

Fermat Point

In 3D, the red points are the original tetrahedron. Lines of identical length through the Fermat point have been added. The length of each of these lines is the same as the total distance from F to the vertices.

For any 3 points of the tetrahedron, draw the sphere also going through F. The sphere will also go through the extended point.

With all that, it seems like an exact solution should be findable.

POSTED BY: Ed Pegg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract