angles_points_xy

compas.geometry.angles_points_xy(a, b, c, deg=False)[source]

Compute the two angles between the two vectors defined by the XY components of three points.

Parameters:
a[float, float] or [float, float, float] | compas.geometry.Point

XY(Z) coordinates.

b[float, float] or [float, float, float] | compas.geometry.Point

XY(Z) coordinates.

c[float, float] or [float, float, float] | compas.geometry.Point

XY(Z) coordinates.

degbool, optional

If True, returns the angle in degrees.

Returns:
float

The smallest angle in radians, or in degrees if deg == True.

float

The other angle.

Notes

The vectors are defined in the following way

\[\begin{split}\mathbf{u} = \mathbf{b} - \mathbf{a} \\ \mathbf{v} = \mathbf{c} - \mathbf{a}\end{split}\]

Z components may be provided, but are simply ignored.

Examples

>>>