angle_points_xy
- compas.geometry.angle_points_xy(a, b, c, deg=False)[source]
Compute the smallest angle between the vectors defined by the XY components of three points.
- Parameters
a ([float, float] or [float, float, float] |
Point
) – XY(Z) coordinates of a 2D or 3D point (Z will be ignored).b ([float, float] or [float, float, float] |
Point
) – XY(Z) coordinates of a 2D or 3D point (Z will be ignored).c ([float, float] or [float, float, float] |
Point
) – XY(Z) coordinates of a 2D or 3D point (Z will be ignored).deg (bool, optional) – If True, returns the angle in degrees.
- Returns
float – The smallest angle 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.