pointsphere: Random sphere pointing

View source: R/pointsphere.R

pointsphereR Documentation

Random sphere pointing

Description

Randomly generates data points within a sphere that are uniformly distributed.

Usage

pointsphere(N = 100, longlim = c(0, 360), latlim = c(-90, 90), rlim = c(0, 1))

Arguments

N

Number of random points.

longlim

Limits of longitude in degrees.

latlim

Limits of latitude in degrees.

rlim

Limits of radius.

Details

This function randomly generates data points within a sphere that are uniformly distributed. 3D pointing is based in efficient inversion of random uniform distributions, rather than a Monte-Carlo approach.

Value

Returns a data.frame comtaining the longitude, latitude and radius of the random points generated.

Author(s)

Aaron Robotham

See Also

rgl.sphgrid,rgl.sphcirc,rgl.sphpoints,rgl.sphtext,rgl.sphsun,rgl.sphMW,sph2car,car2sph

Examples

rgl.sphgrid()
rgl.sphpoints(pointsphere(100,c(0,90),c(0,45),c(0.25,0.8)),deg=TRUE)

sphereplot documentation built on June 27, 2022, 9:06 a.m.