deform_hull | R Documentation |
Deform the coordinates of a convex hull
deform_hull(hull.coords, out.by = 1, shear.by = 0, plot = FALSE)
hull.coords |
a matrix or data.frame with x and y coordinates of the convex hull |
out.by |
numeric; the factor to expand the area of the hull by |
shear.by |
numeric; the factor to shear the area of the hull by |
plot |
logical; should the results be plotted? |
This effectively applies a 2D plane-strain tensor to the coordinates where the
diagonal components equal out.by
and the off diagonal components equal shear.by
.
A.J. Barbour
set.seed(1234)
X <- matrix(stats::rnorm(2000), ncol = 2)
hull.inds <- chull(X)
hull.inds <- c(hull.inds, hull.inds[1])
hull <- X[hull.inds, ]
deform_hull(hull, plot=TRUE)
deform_hull(hull, out.by=2, plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.