These functions generate uniform samples from configurations of tori of primary radius 1 in 3-dimensional space, optionally with noise.
1 2 3 4 5
Number of observations.
Aspect ratio for tube torus (ratio of major and minor radii) or flat torus (ratio of scale factors).
Standard deviation of (independent multivariate) Gaussian noise.
sample_torus_tube() uses the tubular parameterization into
3-dimensional space documented at
sample_torus_flat() uses a flat parameterization (having zero
Gaussian curvature) into 4-dimensional space, as presented on
sample_tori_interlocked() samples from two tubular tori
interlocked in the same way as
All uniform samples are generated through a rejection sampling process as described by Diaconis, Holmes, and Shahshahani (2013).
P Diaconis, S Holmes, and M Shahshahani (2013) Sampling from a Manifold. Advances in Modern Statistical Theory and Applications: A Festschrift in honor of Morris L. Eaton, 102–125. doi: 10.1214/12-IMSCOLL1006
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.