Xref: utzoo comp.graphics:14123 sci.math:13109 Path: utzoo!utgpu!watserv1!watmath!att!att!emory!samsung!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!pasteur!miro.Berkeley.EDU!ph From: ph@miro.Berkeley.EDU (Paul Heckbert) Newsgroups: comp.graphics,sci.math Subject: question regarding random numbers Message-ID: <29358@pasteur.Berkeley.EDU> Date: 30 Oct 90 04:42:35 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: ph@miro.Berkeley.EDU (Paul Heckbert) Organization: University of California at Berkeley Lines: 23 I'm looking for good references on techniques for generating random numbers with arbitrary density functions. For example, to generate a gaussian random number from uniform random numbers: r = sqrt(-2*log(U)); t = 2*pi*U; x = r*sin(t); y = r*cos(t); where U is a random number between 0 and 1, different every time x and y will then be gaussian-distributed between -inf and inf. Similarly, you can generate a point uniformly distributed inside a circle with: r = radius*sqrt(U); theta = 2*pi*U; I assume the method is well known in probability and statistics. What are good references for such techniques of distribution shaping? Paul Heckbert, Computer Science Dept. 570 Evans Hall, UC Berkeley INTERNET: ph@miro.berkeley.edu Berkeley, CA 94720 UUCP: ucbvax!miro.berkeley.edu!ph