midpoint_line_xy

compas.geometry.midpoint_line_xy(line)[source]

Compute the midpoint of a line defined by two points.

Parameters

line (2-tuple) – XYZ coordinates of the first point, and XYZ coordinates of the second point.

Returns

list – XYZ coordinates of the midpoint.

Examples

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