Learn R Programming

TDA (version 1.0)

circleUnif: Uniform Sample From The Circle

Description

This function 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. Default is 1.

Value

  • circleUnif returns an n by 2 matrix of coordinates.

See Also

torusUnif

Examples

Run this code
X=circleUnif(100)
plot(X)

Run the code above in your browser using DataLab