Line.point_at

Line.point_at(t)[source]

Construct a point along the line at a fractional position.

Parameters:
tfloat

The relative position along the line as a fraction of the length of the line. 0.0 corresponds to the start point and 1.0 corresponds to the end point. Numbers outside of this range are also valid and correspond to points beyond the start and end point.

Returns:
compas.geometry.Point

The point at the specified position.

See also

tangent_at()

Examples

>>> line = Line([0, 0, 0], [1, 1, 1])
>>> line.point_at(0.5)
Point(0.500, 0.500, 0.500)