CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Random points in 3D circle (https://www.cfd-online.com/Forums/main/6952-random-points-3d-circle.html)

ZZ December 23, 2003 04:22

Random points in 3D circle
 
Hi, I have a circle in 3D (common part for x^2+y^2+z^2<=R^2 and A*x+B*y+C*z=0). How to find random and uniformly distributed point in this circle? Thanks.

ag December 23, 2003 09:22

Re: Random points in 3D circle
 
For the random part note that on a 2D surface (which is what you have) you can only vary 2 of the parameters independently. Vary those two with random perturbations and then compute the third such that your point is on the sphere. To generate a uniform distribution you may find it easier to write your expression in spherical coordinates since they provide a more natural description of the surface.


All times are GMT -4. The time now is 22:43.