Function Repository Resource:

TrianglePointData

Source Notebook

Given a 2D triangle and a point, get the specified data

Contributed by: Minh Trinh Xuan

ResourceFunction["TrianglePointData"][{a,b,c},p,property]

Given triangle with coordinates {a,b,c} and point p, return property (see details).

ResourceFunction["TrianglePointData"][Triangle[tri],Point[p],property]

Given triangle tri and point p, return property (see details).

ResourceFunction["TrianglePointData"][Triangle[tri],Point[p],"Pedal"]

Given triangle tri and point p, return the triangle formed by the altitudes.

Details

Given triangle ABC and a point P (not on edge), then

Trilineardistance from P to triangle edges
Barycentric(u,v,w) = areas (PBC,APC,ABP) normalized so that u+v+w=1
InverseInCircumPoint X satisfies OX × OM = R2 where O is the circumcenter
Complement, where G is the triangle centroid
Anticomplement, where G is the triangle centroid
IsogonalReflect cevians by angle bisectors
IsotomicReflect cevians by midpoints
CyclocevianDraw circumcircle of cevian points, use other intersections
AntigonalThe isogonal conjugate of the inverse-in-circumcircle of the isogonal conjugate of P.("Pairs of Points: Antigonal, Isogonal, and Inverse," Mathematics Magazine 65 (1992) 339-347)
SynagonalThe antigonal image of the anticomplement of P. (following Hyacinthos #9881)
CevianThe triangle made by the cevians
AnticevianThe triangle with ABC as the cevian triangle
PedalThe triangle made by the altitudes
AntipedalThe triangle with ABC as the pedal triangle

Examples

Basic Examples (2) 

Given a triangle and point p, find the antipedal triangle:

In[1]:=
tri = {{0, 1}, {0, -4}, {3, 0}};
p = {1, -1};
anti = ResourceFunction["TrianglePointData"][tri, p, "Antipedal"]
Out[3]=

Edges perpendicular to lines from p to the triangle vertices give the antipedal triangle:

In[4]:=
Graphics[{EdgeForm[Black], White, anti, Triangle[tri], Green, Line[{p, #}] & /@ tri, Red, Point[p]}, ImageSize -> Small]
Out[4]=

Scope (6) 

Show the trilinear:

In[5]:=
delta = Triangle[{{-1, 1}, {4, 0}, {0, 3}}];
point = Point[{1, 1}];
object = ResourceFunction["TrianglePointData"][delta, point, "Trilinear"]
Out[7]=

Show the barycentric:

In[8]:=
delta = {{-1, 1}, {4, 0}, {0, 3}};
point = {1, 1};
object = ResourceFunction["TrianglePointData"][delta, point, "Barycentric"]
Out[10]=

Show a set of derived points:

In[11]:=
delta = {{1.5, 2.5}, {-3.5, -2}, {3., -1.5}};
point = {1, 0};
objects = {#, ResourceFunction["TrianglePointData"][delta, point, #]} & /@ {"Complement", "Anticomplement", "Isogonal", "Isotomic", "Cyclocevian", "Antigonal", "Syngonal"};
Graphics[{EdgeForm[Black], White, Polygon[ delta], Green, Line[{point, #}] & /@ delta, Red, Point[{point}], {Black, #[[2]] & /@ objects, Text[#[[1]], #[[2, 1]], {-1.2, -1}] & /@ objects}}]
Out[12]=

Show the cevian triangle:

In[13]:=
delta = {{1.5, 2.5}, {-3.5, -2}, {3., -1.5}};
point = {1, 0};
object = ResourceFunction["TrianglePointData"][delta, point, "Cevian"];
Graphics[{EdgeForm[Black], White, Polygon[ delta], Green, Line[{point, #}] & /@ delta, Cyan, Point[{point}], {Opacity[0.5], EdgeForm[Black], object}}]
Out[5]=

Show the anticevian triangle:

In[14]:=
delta = {{1.5, 2.5}, {-3.5, -2}, {3., -1.5}};
point = {1, 0};
object = ResourceFunction["TrianglePointData"][delta, point, "Anticevian"];
Graphics[{EdgeForm[Black], White, Polygon[ delta], Green, Line[{point, #}] & /@ delta, Cyan, Point[{point}], {Opacity[0.1], EdgeForm[Black], object}}]
Out[17]=

Show the pedal triangle:

In[18]:=
delta = {{1.5, 2.5}, {-3.5, -2}, {3., -1.5}};
point = {1.5, 1};
object = ResourceFunction["TrianglePointData"][delta, point, "Pedal"];
Graphics[{EdgeForm[Black], White, Polygon[ delta], Green, Line[{point, #}] & /@ delta, Red, Point[{point}], {Opacity[0.1], EdgeForm[Black], object}}]
Out[21]=

Neat Examples (1) 

Construct the pedal triangle of a point:

In[22]:=
Manipulate[
 Module[{AA, BB, CC, MM}, AA = ptAA; BB = ptBB; CC = ptCC; MM = ptMM;
  Graphics[{FontFamily -> Times, FontSize -> 14, PointSize[0.015],
    {LightBlue, EdgeForm[{Thick, Blue}], Triangle[{AA, BB, CC}]}, {Opacity[0], EdgeForm[{Thin, Brown}], ResourceFunction["TrianglePointData"][{AA, BB, CC}, MM, "Pedal"]},
    {Blue, Point[{AA, BB, CC}], Text["A", AA, {-1, -2}], Text["B", BB, {2, -1}], Text["C", CC, {2, 1}]}, {Red, Point[{MM}], Text["M", MM, {-1, 2}]}}, ImageSize -> {400, 230}, PlotRange -> {{-5.5, 5.5}, {-3.5, 3.5}}]],
 {{ptAA, {1.5, 2.5}}, {-5.25, -3.25}, {5.25, 3.25}, Locator, Appearance -> None}, {{ptBB, {-3.5, -2}}, {-5.25, -3.25}, {5.25, 3.25}, Locator, Appearance -> None},
 {{ptCC, {3., -1.5}}, {-5.25, -3.25}, {5.25, 3.25}, Locator, Appearance -> None}, {{ptMM, {-0.5, -0.75}}, {-5.25, -3.25}, {5.25, 3.25}, Locator, Appearance -> None}, SaveDefinitions -> True, TrackedSymbols :> {ptAA, ptBB, ptCC, ptMM}]
Out[22]=

Version History

  • 1.0.0 – 07 November 2022

Related Resources

License Information