Random point generation on the surface of a sphere
This function will create a predefined number of points randomly distributed on the surface of a sphere with a given radius.
rpsphere(n = 1, output = "cartesian", radius = authRadius, origin = c(0, 0, 0))
n |
( |
output |
( |
radius |
( |
origin |
( |
The function uses a three dimension normal distribution to generate points, which are then projected to the surface of the sphere.
A 3-column (XYZ) or a 2-column (long-lat) numeric
matrix.
randomPoints <- rpsphere(2000, output="polar") # observe latitudinal pattern plot(randomPoints, xlim=c(-180, 180), ylim=c(-90, 90))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.