skspatial.objects.Line.to_point

Line.to_point(t: float = 1) skspatial.objects.point.Point[source]

Return a point along the line using a parameter t.

Parameters
t{int, float}

Parameter that defines the new point along the line.

Returns
Point

New point along the line.

Notes

The new point \(p\) is computed as:

\[p = \mathtt{line.point} + t \cdot \mathtt{line.direction}\]

Examples

>>> from skspatial.objects import Line
>>> line = Line(point=[0, 0], direction=[2, 0])
>>> line.to_point()
Point([2, 0])
>>> line.to_point(t=2)
Point([4, 0])