deform_hull: Deform a convex hull

Description Usage Arguments Details Author(s) Examples

View source: R/seismicity.R

Description

Deform the coordinates of a convex hull

Usage

1
deform_hull(hull.coords, out.by = 1, shear.by = 0, plot = FALSE)

Arguments

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?

Details

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.

Author(s)

A.J. Barbour

Examples

1
2
3
4
5
6
7
8
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)

abarbour/deform documentation built on Feb. 15, 2022, 6:24 p.m.