Skip to contents

Align the longest axis of a shape along the x-axis.

Usage

coo_alignxax(coo)

Arguments

coo

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

Value

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

Details

If some shapes are upside-down (or mirror of each others), try redefining a new starting point (eg with coo_slidedirection) before the alignment step. This may solve your problem because coo_calliper orders the $arr.ind used by coo_aligncalliper.

Examples

b <- bot[1]
coo_plot(b)

coo_plot(coo_alignxax(b))