colour.algebra.extend_line_segment¶
- colour.algebra.extend_line_segment(a: ArrayLike, b: ArrayLike, distance: float = 1) numpy.ndarray [source]¶
Extend the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point.
- Parameters
a (ArrayLike) – Point array \(a\).
b (ArrayLike) – Point array \(b\).
distance (float) – Distance to extend the line segment.
- Returns
New end point.
- Return type
References
[Saeedn]
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...])