This is extremely early playing around. It touches on things I’m going to be working with in Stanford, but at this point, I’m not even up on toy level.

We’ll start by generating a dataset. Essentially, I’ll take the trefolium, sample points on the curve, and then perturb each point ever so slightly.

theta <- idx*2*pi/2000

a <- cos(3*theta)

x <- a*cos(theta)

y <- a*sin(theta)

xper <- rnorm(2000)

yper <- rnorm

xd <- x + xper/100

yd <- y + yper/100

cd <- cbind(xd,yd)

As a result, we get a dataset that looks like this:

So, let’s pick a sample from the dataset. What I’d really want to do now would be to do the witness complex construction, but I haven’t figured enough out about how R ticks to do quite that. So we’ll pick a sample and then build the 1-skeleton of the Rips-Vietoris complex using Euclidean distance between points. This means, we’ll draw a graph on the dataset with an edge between two sample points whenever they are within ε from each other.