rpsphere {icosa} | R Documentation |
Random point generation on the surface of a sphere
Description
This function will create a predefined number of points randomly distributed on the surface of a sphere with a given radius.
Usage
rpsphere(n = 1, output = "cartesian", radius = authRadius, origin = c(0, 0, 0))
Arguments
n |
( |
output |
( |
radius |
( |
origin |
( |
Details
The function uses a three dimension normal distribution to generate points, which are then projected to the surface of the sphere.
Value
A 3-column (XYZ) or a 2-column (long-lat) numeric
matrix.
Examples
randomPoints <- rpsphere(2000, output="polar")
# observe latitudinal pattern
plot(randomPoints, xlim=c(-180, 180), ylim=c(-90, 90))
[Package icosa version 0.11.0 Index]