Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: How to make weighted random numbers?
Replies: 7   Last Post: Feb 28, 2009 3:49 AM

 Messages: [ Previous | Next ]
 matt271829-news@yahoo.co.uk Posts: 2,136 Registered: 1/25/05
Re: How to make weighted random numbers?
Posted: Feb 27, 2009 10:18 PM

On Feb 28, 2:36 am, Rich Grise <r...@example.net> wrote:
> Say, I want to fill a sphere uniformly with random dots; the logical way
> to do that in r,theta format; otherwise to make a sphere, you'd have to
> do  some heroic math on the three dimension (or is there some
> quick-n-dirty formula that can do it in one flop, that they don't tell
> us high school (and Tech School, don't forget!) ?
>
> Either way. I don't want a uniform sphere - more like density through the
> center looks like a bell-shaped curve, i.e., denser in the middle?

You can choose the distance from the dot to the centre, r, according
to whatever distribution you want (e.g. Gaussian), and then place the
dot at a uniformly random point on the surface of a sphere of radius
r, chosen using a method such as the one given at
http://mathworld.wolfram.com/SpherePointPicking.html

Date Subject Author
2/27/09 Rich Grise
2/27/09 RGVickson@shaw.ca
2/27/09 matt271829-news@yahoo.co.uk
2/27/09 swp
2/27/09 Ioannis
2/28/09 Mike Williams
2/28/09 RGVickson@shaw.ca
2/28/09 Kevin Stone