From: colin@nyx10.cs.du.edu (Colin Plumb) Newsgroups: sci.math,comp.sys.mac.programmer.help,comp.programming,comp.theory Subject: Re: Generating random points on surface of n-sphere Date: 3 Nov 1995 03:46:15 -0700 In article , Mark Chrisman wrote: > If anyone could help me out by sending me the "well-known" but never-shown > algorithm for generating the Gaussian distribution, I would appreciate it, > since it's going to be a few weeks before I can get to a library and look > up Knuth... If you're doing something this mathematical, you should really go out and BUY a copy of Knuth. It's starting to show its age, but it's *still* the classic reference to lots of things. (Another good source is possibly the Graphics Gems series, although very few of the gems explicitly discuss generalizations to >3 dimensions.) The quick and dirty one I use is to just add together a few uniformly distributed numbers. Even as few as 3 is pretty good, while if you add together 12 (which gives you a stnadard deviation equal to the range of the original distribution), you get an excellent approximation. There is a more direct method, which I don't recall off the top of my head, but it's described in Knuth, implemented in "The Stanford GraphBase", and there are certainly some neat techniques in the Graphic Gems series. -- -Colin