colour.algebra.extend_line_segment¶
-
colour.algebra.
extend_line_segment
(a, b, distance=1)[source]¶ Extends the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point.
Parameters: - a (array_like) – Point array \(a\).
- b (array_like) – Point array \(b\).
- distance (numeric, optional) – Distance to extend the line segment.
Returns: New end point.
Return type: ndarray
References
Notes
- Input line segment points coordinates are 2d coordinates.
Examples
>>> a = np.array([0.95694934, 0.13720932]) >>> b = np.array([0.28382835, 0.60608318]) >>> extend_line_segment(a, b) array([-0.5367248..., 1.1776534...])