[R] Points on a sphere

Duncan Murdoch dmurdoch at pair.com
Sat Oct 26 13:39:41 CEST 2002

I don't have code for this in R, but a general technique I've used is
as follows:

Start with 4 points at the corners of a regular tetrahedron.  Then
recursively subdivide each triangular face into 3 triangular faces by
placing a point at the center of it. This is easy, just average the 3
vertices and normalize to length 1.   The only tricky part is keeping
track of which vertices form faces.

Duncan Murdoch
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list