skspatial.objects.Triangle.point

Triangle.point(vertex: str) skspatial.objects.point.Point[source]

Return a point (vertex) of the triangle.

Parameters
vertex: str

‘A’, ‘B’, or ‘C’.

Returns
Point

A vertex of the triangle.

Raises
ValueError

If the vertex is not ‘A’, ‘B’, or ‘C’.

Examples

>>> from skspatial.objects import Triangle
>>> triangle = Triangle([0, 0], [1, 0], [0, 1])
>>> triangle.point('A')
Point([0, 0])
>>> triangle.point('B')
Point([1, 0])
>>> triangle.point('C')
Point([0, 1])
>>> triangle.point('D')
Traceback (most recent call last):
...
ValueError: The vertex must be 'A', 'B', or 'C'.