I built a simple ‘app’ using GeoGebra.

Try the link below; in the live app, try the slider.

If necessary, the user might wish to clear the menu by pressing in the upper right corner.

In my GeoGebra app, notice the relationship of the 9 angles within the triangle. Lami’s theorem considers the relationship of 6 of these angles.

**Explanation**

I start with three points (A, B, C) to build an acute triangle (ABC), add the three altitudes (*), determine points at the intersection of each altitude with the corresponding side (D, E, F), connect the intersection points thereby producing an ** enclosed triangle** (DEF).

* The three altitudes of a triangle intersect at the orthocenter, which for an acute triangle is inside the triangle.

I then determine the perimeter of triangle DEF.

There is a solution to Fagnano’s Problem which says the perimeter of the as-constructed triangle DEF is the ** minimum perimeter for any possible enclosed triangle**.

orthic triangle:

**Reference**