Arguments
xy1
A path of x,y coordinates (a matrix in two columns)
xy2
A second path of x,y coordinates (a matrix in two columns)
i
Index of Node i of path xy1
j
Index of Node j of path xy2 pi
Index of node previous to node i on path xy1
pj
Index of node previous to node j on path xy2
opposite
matrix specifying whether points on one path are 'opposite' points on
another path, and if so the proportion between the two points where the
orthogonal line falls.
costfn
Specify a cost function to use. By default, Cost.quadratic is used,
although Cost.area is also reasonable. Other cost functions are
provided but may be sensitive to segmentation.