midpoint_line_xy

compas.geometry.midpoint_line_xy(line)[source]

Compute the midpoint of a line defined by two points.

Parameters:
line[point, point] | compas.geometry.Line

XYZ coordinates of the first point, and XYZ coordinates of the second point.

Returns:
[float, float, 0.0]

XYZ coordinates of the midpoint in the XY plane.

Examples

>>> midpoint_line_xy(([0.0, 0.0, 0.0], [1.0, 0.0, 1.0]))
[0.5, 0.0, 0.0]