These functions generate uniform and stratified samples from configurations of circles of radius 1 in 2- or 3-dimensional space, optionally with noise.
sample_circle(n, bins = 1L, sd = 0)
sample_circles_interlocked(n, bins = 1L, sd = 0)
Number of observations.
Number of intervals to stratify by. Default set to 1, which generates a uniform sample.
Standard deviation of (independent multivariate) Gaussian noise.
The function sample_circle()
uses the usual sinusoidal parameterization
from the unit interval to the unit circle.
The function sample_circles_interlocked()
effectively samples from a pair
of circles and rotates them in 3-dimensional space so that they are
interlocked (perpendicular to each other).
Both functions are length-preserving and admit stratification. If bins = 2
,
the stratification for the latter function will simply be between the two
interlocked circles.