angle_points

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

Compute the smallest angle between the vectors defined by three points.

Parameters
  • a (sequence of float) – XYZ coordinates.

  • b (sequence of float) – XYZ coordinates.

  • c (sequence of float) – XYZ coordinates.

  • deg (boolean) – returns angle in degrees if True

Returns

float – The smallest angle between the vectors in radians (in degrees if deg == True). The angle is always positive.

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.