I have an implicitly defined hypersurface in R^3, given by the zero level set of some function F:
F(x,y,z) = 0.
This part may not matter but: I want to plot this surface using the answers given in this or this thread.
Now I want to take a random sample of points from this surface. Does anyone know the best way to do this?
Well, simple way would be:
Triangulate implicit surface. For implicit surface there are variations of marching cubes, I believe, already done.
Given list of triangles, compute total area A=Sum(Ai), and probabilities pi = Ai/A. Probabilities would be normalized, Sum(pi)=1
Sample particular triangle i using probabilities pi. Numpy.random.choice should help.
Given selected triangle, generate uniform point in the triangle using Generate random locations within a triangular domain