Self-contained, runnable examples.

OT plan from random Diracs to the uniform distribution on [0,1]². Visualizes the power diagram structure and weight convergence.

Use a grayscale image as the target density. Transports a point cloud to match the image histogram.

Iteratively move Diracs to their transport barycenters — converges to an optimal quantization of the target density.

Minimize Wasserstein distance by gradient descent on Dirac positions. Demonstrates JAX and PyTorch autodiff.

Inspect Laguerre cells — facets, simplex decomposition, distance from boundaries.

OT and power diagrams with periodic boundary conditions (torus topology).

Fokker-Planck equation as a Wasserstein gradient flow using Lagrangian (Moreau-Yosida) discretization.

Euler equations as a geodesic in the space of measure-preserving diffeomorphisms (Gallouët-Mérigot scheme).

Wasserstein gradient flow of the free energy functional — entropy plus potential energy.