PseudorandomHalton (2,3)
Inside circle Outside circle

Quasi-Monte Carlo 2D: Point-Set Discrepancy Race

This simulator races two sampling strategies side by side at a classic Monte Carlo task — estimating π by sampling a unit circle inscribed in a square — while computing the actual star discrepancy of each growing point set, not just the resulting π error. One panel draws points with ordinary pseudorandom numbers; the other uses a 2D Halton low-discrepancy sequence built from the van der Corput construction in bases 2 and 3, which fills the square far more evenly than chance would from the very first samples. Live readouts track both running π estimates, their errors against the true value, and an exact anchor-point star-discrepancy statistic D*ₙ for each sequence, so the structural difference between random and quasi-random sampling — not merely its downstream effect on one integral — is visible and independently verifiable in real time.