On Feb 27, 9:36 pm, 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? > > 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
http://mathworld.wolfram.com/Sphere.html has a good discussion of the math, and links to the math for intersections of various shapes with each other. I believe those can lead you to the proper math for your desired effect. Of course, I could be way off base also.