The Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » sci.math.* » sci.math

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Rich Grise

Posts: 55
Registered: 2/4/05
How to make weighted random numbers?
Posted: Feb 27, 2009 9:36 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?

It's got to be computable, maybe with iterations, but that's what I
do best! I just have no idea what the algorithm would be.

What I'm up to is I have a 3-d drafting program and I want to approximate
a translucent ball effect. I can enter coordinates by copying the output
and paste it into the command line to automatically place n dots. ;-)

Thanks!
Rich




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.