skspatial.objects.Triangle.orthocenter

Triangle.orthocenter() skspatial.objects.point.Point[source]

Return the orthocenter of the triangle.

The orthocenter is the intersection point of the three altitudes.

Returns
Point

Orthocenter of the triangle.

Examples

>>> from skspatial.objects import Triangle
>>> Triangle([0, 0], [0, 1], [1, 0]).orthocenter()
Point([0., 0.])
>>> Triangle([0, 0], [1, 2], [2, 0]).orthocenter()
Point([1. , 0.5])