getMinBBox2D | R Documentation |
Calculates the minimum oriented bounding box using the rotating callipers algorithm in 2D. Credits go to Daniel Wollschlaeger. The function modified from <http://dwoll.de/rexrepos/posts/diagBounding.html>.
getMinBBox2D(xy, prec = 1e-08)
xy |
a matrix of xy values from which to calculate the minimum oriented bounding box. |
prec |
numerical, rounding precision; default 1e-08, lose to .Machine$double.eps^0.5. |
a list with numeric width & height of the bounding box, and the number of points used for the calculation.
library(ARCOS)
getMinBBox(cbind(c(0,1,3,2,1), c(0,-1,1,3,2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.