Annulus Sampling I
This animation shows the perils of naïve annulus sampling, where points cluster near the inner edge because the radius and angle are chosen uniformly at random. The result is a biased density that does not fill the annular region evenly. The code uses a Canvas context with `d3.select`, `d3.timer`, and explicit `context.arc` and `context.fill` calls to draw the samples over time, adding 50 points per frame until 1,000 total are placed. The static background ring uses an evenodd fill rule to show the sampling region.
AI-generated descriptionThis animation demonstrates the perils of naïve annulus sampling. If the radius and angle are chosen with random uniformity, the sample density will be higher where the radius is smaller, and thus points will be concentrated around the inner edge of the annulus. See corrected sampling.