R Under development (unstable) (2024-06-20 r86796 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(RPointCloud) > library(TDA) > set.seed(54321) > theta <- seq(0, 359, by = 8) * pi/180 > L <- length(theta) > x <- cos(theta) + rnorm(L, 0, 0.2) > y <- sin(theta) + rnorm(L, 0, 0.2) > z <- matrix(rnorm(2*L, 1, 0.5), ncol = 2) > joint <- rbind(as.matrix(data.frame(x, y)), z) > ripper <- ripsDiag(joint, maxdimension=1, maxscale = 3, + dist = "euclidean", library = "Dionysus", + location = TRUE) > RD <- ripper$diagram > gum <- RPointCloud:::process(RD) > tack <- RPointCloud:::test(gum) > cb <- RPointCloud:::con_band(RD) > > set.seed(97531) > jag <- jitter(joint) > ripped <- ripsDiag(jag, maxdimension=1, maxscale = 3, + dist = "euclidean", library = "Dionysus", + location = TRUE) > RD2 <- ripped$diagram > gum <- RPointCloud:::process(RD) > tack <- RPointCloud:::test(gum) > cb2 <- RPointCloud:::con_band(RD2) > > exp(cb) [1] 2.310858 > exp(cb2) [1] 2.315761 > > opar <- par(mfrow=c(1,2)) > plot(RD, band = cb) > plot(RD2, band = cb2) > par(opar) > > proc.time() user system elapsed 5.43 0.56 5.98