Learn R Programming

TDA (version 1.6.2)

circleUnif: 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.

See Also

sphereUnif, torusUnif

Examples

Run this code
# NOT RUN {
X <- circleUnif(100)
plot(X)
# }

Run the code above in your browser using DataLab