I want to cover a particular subregion of the x-y plane with a random distribution.
As this particular region is not a circle I encounter some problems declaring the permitted zone where to put points.
The points must NOT be drawn in the blue zone. As in the graph
And I use the following code to drawing the graph:
mu = 0.000954;
h = x^2 - y^2 + 2 (1 - mu)/Norm[x + mu] + 2 mu/Norm[1 - x - mu];
S =
RegionPlot[h < 3.07, {x, -2, 2}, {y, -2, 2},
Mesh -> None, PlotPoints -> 200, Axes -> True, Frame -> False]
Where h
is the function.
P.s.: the drawing process is a bit long if you use more then 200 points, so keep this not so high.