skspatial.objects.Line

Methods

best_fit(points[, tol])

Return the line of best fit for a set of points.

distance_line(other)

Return the shortest distance from the line to another.

distance_point(point)

Return the distance from a point to the line.

from_points(point_a, point_b)

Instantiate a line from two points.

from_slope(slope, y_intercept)

Instantiate a 2D line from a slope and Y-intercept.

intersect_line(other[, check_coplanar])

Intersect the line with another.

is_coplanar(other, **kwargs)

Check if the line is coplanar with another.

plot_2d(ax_2d[, t_1, t_2])

Plot a 2D line.

plot_3d(ax_3d[, t_1, t_2])

Plot a 3D line.

project_point(point)

Project a point onto the line.

project_vector(vector)

Project a vector onto the line.

side_point(point)

Find the side of the line where a point lies.

to_point([t])

Return a point along the line using a parameter t.

transform_points(points)

Transform points to a one-dimensional coordinate system defined by the line.