Skip to contents

Registers a new baseline for the shape, with the ldk1-th and ldk2-th points being set on \((x= -0.5; y=0)\) and \((x= 0.5; y=0)\), respectively.

Usage

coo_bookstein(coo, ldk1, ldk2)

Arguments

coo

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

ldk1

numeric the id of the first point of the new baseline (the first, by default)

ldk2

numeric the id of the second point of the new baseline (the last, by default)

Value

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

Details

For Out, it tries to do it using $ldk slot. Also the case for Opn, but if no landmark is defined, it will do it on the first and the last point of the shape.

For Out and Opn defines the first landmark as the first point of the new shapes with coo_slide.

Examples

h <- hearts %>% slice(1:5) # for the sake of speed
stack(h)

stack(coo_bookstein(h, 2, 4))

h <- hearts[1]
coo_plot(h)

coo_plot(coo_bookstein(h, 20, 57), border='red')