powered by
Map the square \([0,1]^2\) in swiss roll for all \(x,y\) in \([0,1]^2\), set $$Sx=\pi \sqrt{(b^2-a^2)x + a^2)}$$ $$Sy=\pi (b^2-a^2)y/2$$
swissroll(N = 500, seed = NULL, a = 1, b = 4)
N x 3 array for 3d points.
Number of points drawn.
Optionally specify a RNG seed (for reproducible experiments).
Shape parameters.
adjacency_mat
pts <- swissroll(N=500, seed=0, a=1, b=4)
Run the code above in your browser using DataLab