1. Hardware-Backed CSPRNG Entropy
Traditional web pickers often invoke JavaScript's built-in Math.random(), which relies on deterministic pseudo-random generators (such as xorshift128+) seeded per runtime tab. While visually acceptable for particle effects, standard PRNGs are not designed for unpredictable selection audits.
Wheel of Names derives both rotational targets and Fisher-Yates array shuffles from the W3C Web Cryptography API via window.crypto.getRandomValues(), reading 32-bit unsigned integers sourced from your operating system's cryptographic entropy pool (MDN getRandomValues specification):
function getCryptoRandom() {
if (window.crypto && window.crypto.getRandomValues) {
const buf = new Uint32Array(1);
window.crypto.getRandomValues(buf);
return buf[0] / 4294967296; // Exact division by 2^32 in [0, 1)
}
return Math.random();
}
2. Angular Sector Partitioning & Pointer Resolution
Given N active items on the wheel, every slice occupies an identical angular sweep of 2π / N radians around the circle. The fixed top pointer rests at angle 3π / 2 radians (270 degrees in Canvas coordinates, where 0 radians points right). After the wheel completes its spin rotation currentRotation, the engine normalizes angular modulo arithmetic so floating-point accumulation across dozens of spins never introduces drift:
const norm = ((currentRotation % (2 * Math.PI)) + 2 * Math.PI) % (2 * Math.PI);
const pointerAngle = (1.5 * Math.PI - norm + 4 * Math.PI) % (2 * Math.PI);
// Winner satisfies slice.angleStart <= pointerAngle < slice.angleEnd
If a user repeats a name two or three times, each duplicate claims its own equal angular slice, yielding transparent linear weighting proportional to the number of lines entered.
3. Quartic Ease-Out Deceleration Physics
Instead of snapping straight to the answer, the animation engine applies between 5 and 10 full revolutions plus the CSPRNG target offset, easing smoothly over the user-selected duration (1 to 30 seconds) via a 4th-order deceleration curve:
const progress = 1 - Math.pow(1 - elapsed / durationMs, 4);
const currentRotation = startRotation + progress * totalSpinDelta;
Because the derivative approaches zero smoothly at progress = 1, the wheel glides organically past near-miss wedges before resting cleanly beneath the pointer—giving classrooms and livestreams unmistakable visual clarity. Each time the wheel crosses a slice boundary, our engine synthesizes an acoustic tick in real time using pure Web Audio API oscillators and filters—requiring zero external MP3 downloads.
4. Public Verification via Pearson Chi-Square Testing
We test both the mathematical uniformity and rotation mapping continuously inside our open Node.js automated test suite using a 10,000-spin Pearson Chi-Square (χ²) goodness-of-fit test. You can run the identical empirical experiment yourself inside your browser on the Live Randomness Audit page, or read the deeper statistical walk-through in PRNG vs CSPRNG Randomness Explained and Why CSPRNG Matters on Prize Wheels.