Skip to contents

When slicing a shape using two landmarks, or functions such as coo_up, an open curve is obtained and the rank of points make wrong/artefactual results. If the widest gap is > 5 * median of other gaps, then the couple of coordinates forming this widest gap is used as starting and ending points. This switch helps to deal with open curves. Examples are self-speaking. Use force=TRUE to bypass this check

Usage

coo_slidegap(coo, force)

Arguments

coo

matrix of (x; y) coordinates or any Coo object.

force

logical whether to use the widest gap, with no check, as the real gap

Value

a matrix of (x; y) coordinates or a Coo object.

Examples

cat <- coo_center(shapes[4])
coo_plot(cat)


# we only retain the bottom of the cat
cat_down <- coo_down(cat, slidegap=FALSE)

# see? the segment on the x-axis coorespond to the widest gap.
coo_plot(cat_down)


# that's what we meant
coo_plot(coo_slidegap(cat_down))