poly_apex_base_angle: Calculate the apex and base angles of an object
Description
This function calculates the apex and base angles of an object. It takes as
input a matrix of coordinates and returns the apex angle, base angle, and the
coordinates of the apex and base as a list. The angles are computed after the
object is aligned in the vertical axis with poly_align().
A list containing the apex angle, base angle, apex coordinates, and
base coordinates.
Arguments
x
A matrix of coordinates representing the contour of the object,
often obtained with object_contour().
percentiles
A numeric vector of two percentiles between 0 and 1
indicating the height of the points from the top to the bottom. The function
calculates the apex angle between the two percentiles and the base angle
between the lowest point and the highest point.
invert
If TRUE, aligns the object along the horizontal axis.
plot
Plots the polygon with the points? Defaults to TRUE.