powered by
This function generates s points on a d-dimensional sphere.
generate.point.in.sphere(no.row,d)
Number of rows to generate.
Number of variables to generate.
A \(no.row \times d\) matrix of coordinates of points in sphere.
Marsaglia, G. (1972). Choosing a point from the surface of a sphere. Annals of Mathematical Statistics, 43, 645-646.
# NOT RUN { generate.point.in.sphere(no.row=1e5,d=3) # }
Run the code above in your browser using DataLab