如何找到特定形状的边界点

Pra*_*eep 14 r border shapes points uniform

假设我有一个从数据集生成的不规则随机形状.如何找到位于形状边界上的点?

我正在使用R. R中是否有任何包用于此目的?为简单起见,假设我有一个2d的点数据集.

And*_*rie 18

您正在寻找chull()在包grdevices中计算2D对象的凸包的函数.

以下是在线帮助中的示例:

require(stats)
X <- matrix(rnorm(2000), ncol = 2)
chull(X)
## Not run: 
# Example usage from graphics package
plot(X, cex = 0.5)
hpts <- chull(X)
hpts <- c(hpts, hpts[1])
lines(X[hpts, ])
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述