Does not work on mobile! please play on desktop sorry
Quantum Dice
Basins of attractions
Dice
The left hand side lets you control a collection of points $p_i \in S^2$, and their weights $w_i$. The colors show the basin of attraction of the gradient flow of the function $f: S^2\to \mathbb{R}$:
\[f(x) = \prod |x-p_i|^{w_i}\]Remarkably, the basin of attraction of $p_i$ has area proportional to $w_i$. This provides a Voronoi-type decomposition of the sphere, with prescribed areas of each cell. For a related decomposition of the plane, with mathematical details, see my page on the Biran decomposition.
The right hand side shows a convex body with support function $f(x)+c$, where $c$ is a constant controlled by the slider “roundness”. For large enough roundness, $f(x)+c$ is a convex function, and the associated convex body is smooth. This is a dice, with faces defined by the Voronoi decomposition on the left side. The stable positions of this dice are $p_i$, and the probability of rolling $p_i$ is $w_i$. In particular, if all the weights are the same, we produce fair dice with prescribed stable positions.
Input controls
Each dot on the left side controls a face of a dice
- Click and drag / scroll to rotate and zoom sphere and dice.
- Hold Shift to pan
- Click and drag dot to move it on sphere
- Double click to add/ remove dots
- Scroll over dot to change its weight, and the size of the associated cell. (This really messes with my solvers at the moment)
Basins of attraction control:
- Flow time: increasing flow time gives more accurate basins of attraction. At large flow times, things become unstable. Make flow time as large as possible while still seeing the basins. When flow time is zero, we see a spherical weighted voronoi diagram
- Marble sphere?: When enabled, uses the numerical preclusions of my gradient flow algorithm to color the regions. Similar to newton fractals.
Dice control:
- Roundness: Interpolates the function $f(x)$ to a constant, making the dice closer to a sphere. When large enough, the dice becomes smooth and it will be fair. When too small, the dice develops edges, and is not guarenteed to be fair.
- Draw dice?: Switches from showing the polar plot of $f(x)$ to the associated dice.