Learn R Programming

CEC (version 0.9.4)

ball: Ball

Description

Generates points that form a ball with uniform density.

Usage

ball(n, r, dim)

Arguments

n

Number of points to generate.

r

Radius of the ball.

dim

Dimension of the points.

Value

Matrix of points with n rows and dim cols.

See Also

mouseset

Examples

Run this code
# NOT RUN {
M = ball(4000, 0.9)
plot(M, cex = 0.5, pch = 19)
# }

Run the code above in your browser using DataLab