Learn R Programming

Momocs (version 1.1.6)

coo_chull: Calculates the convex hull of a shape

Description

Returns the ids of points that define the convex hull of a shape. A simple wrapper around chull, mainly used in graphical functions.

Usage

coo_chull(coo)

Arguments

coo
a matrix of (x; y) coordinates.

Value

a matrix of ids defining the convex hull of the shape.

See Also

Other coo_ descriptors: coo_area, coo_boundingbox, coo_circularityharalick, coo_circularitynorm, coo_circularity, coo_convexity, coo_eccentricityboundingbox, coo_eccentricityeigen, coo_elongation, coo_length, coo_lw, coo_rectangularity, coo_rectilinearity, coo_solidity, coo_tangle, coo_theta3, coo_thetapts, coo_width

Examples

Run this code
data(hearts)
h <- coo_sample(hearts[4], 32)
coo_plot(h)
ch <- coo_chull(h)
lines(ch, col='red', lty=2)

Run the code above in your browser using DataLab