circleUnif: Uniform Sample From The Circle

View source: R/circleUnif.R

circleUnifR Documentation

Uniform Sample From The Circle

Description

The function circleUnif samples n points from the circle of radius r, uniformly with respect to the circumference length.

Usage

  circleUnif(n, r = 1)

Arguments

n

an integer specifying the number of points in the sample.

r

a numeric variable specifying the radius of the circle. The default value is 1.

Value

circleUnif returns an n by 2 matrix of coordinates.

Note

Uniform sample from sphere of arbitrary dimension can be generated using sphereUnif.

Author(s)

Fabrizio Lecci

See Also

sphereUnif, torusUnif

Examples

X <- circleUnif(100)
plot(X)

TDA documentation built on May 29, 2024, 1:28 a.m.