Back to Interactive Lab
rust-wasmstudio-mathstudio-geometrystudio-demosstudio-wasm
Shot Dispersion Explorer
Correlated bivariate Gaussian dispersion, polygon hazard integration, and tactical aim optimization in Rust & WebAssembly.
Rust / WASMInitializing Rust WASM worker…
GreenWaterBunkerOptimal Aim
Green Hit
—
Penalty
—
Exp. Strokes
—
Optimal Aim
—
How the Computation Works
Every shot landing coordinate relative to the center of the green is modeled as a correlated bivariate normal random vector:
Rather than relying on rough circular approximations, the compiled Rust WebAssembly engine performs three exact steps in a background Web Worker:
- Analytical Covariance Eigendecomposition (
studio-math): Computes exact major/minor axes and principal rotation angles for the 50% CEP, 68% Core, and 90% Envelope confidence ellipses using the two-degree-of-freedom chi-squared quantile . - Composite 2D Gauss-Legendre Quadrature (
studio-demos+studio-geometry): Integrates the bivariate PDF across $900$ weighted quadrature nodes spanning , classifying each node against exact ray-cast hazard and putting-green polygons. - Lateral Aim Sweep & Deterministic Simulation: Evaluates expected strokes across lateral aim lines from to yards to surface the mathematically optimal target line, and generates deterministic SplitMix64 + Box-Muller simulated shots for tabular inspection and JSON export.