Question: 4. Sampling uniformly over a disk. Consider the problem of sampling (x, y) points uniformly over the disk of radius R centered in the origin
4. Sampling uniformly over a disk. Consider the problem of sampling (x, y) points uniformly over the disk of radius R centered in the origin of the coordinate system. One method to generate such coordinate pairs is to uniformly sample from the bounding square containing the disc and to use the rejection method to obtain samples inside the disk. Specifically, the algorithm is: 1. Select andE using your random number generator. 2. Set x, = R(1-25) and y, = R(1-25) 3. Accept this pair if x + y'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
