The slides that follow this one explain very well why this algorithm does not produce the desired uniform sampling. This would have been my initial thought too if I were to implement this myself, and I would not have realized that it was not correct.
The slides that follow this one explain very well why this algorithm does not produce the desired uniform sampling. This would have been my initial thought too if I were to implement this myself, and I would not have realized that it was not correct.