dimanche 30 juin 2019

Sampling from a given region

I am exploring a way to sample from the following region on a two dimensional coordinate (the blue region):

enter image description here

Of course, the baseline is that I can sample random number (x,y) and then check if it overlaps with the smaller box or outside the larger box. But that just wastes too many computing resource, after some quick trial.

Any suggestion or advice will be appreciated, thank you.




Aucun commentaire:

Enregistrer un commentaire