Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!sgi!shinobu!odin!horus.esd.sgi.com!thant From: thant@horus.esd.sgi.com (Thant Tessman) Newsgroups: comp.graphics Subject: Re: Random points on a sphere Keywords: random points sphere Message-ID: <7426@odin.corp.sgi.com> Date: 8 May 90 18:03:09 GMT References: <434@ticipa.ti.com> <1990Apr26.151056.25145@laguna.ccsf.caltech.edu> <1990Apr27.201704.16711@cs.UAlberta.CA> <1990May4.150632.27212@watcgl.waterloo.edu> <7429@crdgw1.crd.ge.com> Sender: news@odin.corp.sgi.com Reply-To: thant@horus.esd.sgi.com (Thant Tessman) Distribution: na Organization: Silicon Graphics Inc. Lines: 24 I haven't followed the whole thing, but I think I've got a really easy way to distribute random points on a sphere. x = random number [-1, +1] y = random number [-1, +1] z = random number [-1, +1] r = sqrt(x*x + y*y + z*z) if ( r > 1.0 ) //throw it away else //project it onto the unit sphere x = x/r; y = y/r; z = z/r; Piece o' cake. thant