circleUnif {TDA}R 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)

[Package TDA version 1.9.1 Index]