uniform generation of points on 3D box

Posted by Myx on Stack Overflow See other posts from Stack Overflow or by Myx
Published on 2010-04-19T22:46:16Z Indexed on 2010/04/19 23:03 UTC
Read the original article Hit count: 346

Filed under:
|
|
|
|

Hello:

I would like to generate random points on a 3D box defined by its (minx, miny, minz) and (maxx, maxy, maxz) corners. I was thinking of generating a random point inside of the box and then somehow projecting it onto one of the box sides. However, I don't have explicit plane information for the box sides and this seems like it will not produce a uniform distribution of points since if some sides of the box are bigger than others, those sides should have more points generated on them.

Any suggestions are appreciated.

Thanks.

© Stack Overflow or respective owner

Related posts about particles

Related posts about 3d