Learn R Programming

TDA (version 1.9.1)

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)

Value

circleUnif returns an n by 2 matrix of coordinates.

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.

Author

Fabrizio Lecci

See Also

sphereUnif, torusUnif

Examples

Run this code
X <- circleUnif(100)
plot(X)

Run the code above in your browser using DataLab