gen.2holes: Generate Two Intertwined Holes

Description Usage Examples

View source: R/gen.2holes.R

Description

Generate Two Intertwined Holes

Usage

1
gen.2holes(n = 496, sd = 0)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## see two sets of intertwined circles
nn = 200
x1 = gen.2holes(n=nn)
x2 = gen.2holes(n=nn, sd=0.05)
x3 = gen.2holes(n=nn, sd=0.1)
cols = as.factor(c(rep(1,nn/2),rep(2,nn/2)))

## visualize
opar = par(mfrow=c(1,3), pty="s")
plot(x1[,1],x1[,2],pch=18,main="sd=0.00",col=cols)
plot(x2[,1],x2[,2],pch=18,main="sd=0.05",col=cols)
plot(x3[,1],x3[,2],pch=18,main="sd=0.10",col=cols)
on.exit(par(opar))

kyoustat/TDAkit documentation built on Feb. 19, 2020, 11:37 a.m.