Uniformly Lighting the Christmas Tree: Riesz s-Energy in Action

Uniformly Lighting the Christmas Trees: Riesz {s}-Energy in Action

Michael Emmerich, December 25th, 2024 Did you ever have the problem of how to distribute candles uniformly across your Christmas Tree? Well, here is a solution from the mathematical sciences! Using the concept of Riesz {s}-Energy, we can optimize the placement of stars or candles on a tree-like structure to achieve a uniform distribution. This post describes the process of creating a “Riesz {s}-Energy Christmas Tree,” where the candles are visualized as points distributed evenly over the surface of a cone by minimizing the {s}-energy function.

In this post, we explore the intriguing visualization of Riesz {s}-energy optimization over a spherical cone. This process involves distributing a set of points (or candles, as visualized in our Python implementation) uniformly over the surface of a cone by minimizing the {s}-energy function. The visualization is created using pygame (see link at the end of essay), and the optimization employs simulated annealing to minimize the Riesz s-Energy of the configuration of points. For theoretical insights, this blog also discusses the application of simulated annealing to Riesz {s}-energy problems and their connection to uniform distributions on rectifiable manifolds.

Riesz {s}-Energy is named after the Hungarian mathematician Marcel Riesz (1886–1969). Originally developed in the context of electrophysics, it was used to analyze the distribution of electrons. The Coulomb energy is a special case of Riesz {s}-Energy when {s = 1}. Recently, Riesz {s}-Energy has also seen recent applications as a diversity indicator to distribute point sets evenly across approximations of trade-off surfaces (Pareto fronts) in multi-objective optimization (Falcon-Cardona et al. 2024), triggering a renewed interest in pairwise potentials in other domains than physics.

Theoretical Background

The Riesz {s}-energy for a set of {N} points {\{x_i\}_{i=1}^N} on a manifold {M} is defined as:

\displaystyle  E_s = \sum_{i < j} \frac{1}{\|x_i - x_j\|^s},

where {\|x_i - x_j\|} denotes the Euclidean distance between points {x_i} and {x_j}, and {s > 0}

is a parameter that controls the strength of repulsion between points.

As shown in (Hardin et al., 2005), minimizing {E_s} for {s}-energy problems tends to distribute points uniformly on rectifiable manifolds as {N} grows. This finding is sometimes referred to as the “poppz seed bagel theorem”. Here, we focus on the surface of a spherical cone, a manifold defined by its height and base radius.

Simulated Annealing for {s}-Energy Optimization

Simulated annealing is an iterative optimization algorithm inspired by the cooling of materials. At each step, the algorithm perturbs the current configuration of points and evaluates the change in energy. The perturbation is accepted probabilistically, based on the temperature {T}, which decreases gradually:

\displaystyle  P(\text{accept}) = \begin{cases} 1 & \text{if } \Delta E \leq 0, \\ e^{-\Delta E / T} & \text{if } \Delta E > 0. \end{cases}

For this visualization, we initialize {N = 70} random points on the cone surface and optimize their positions over 50,000 iterations. The cooling schedule starts with {T = 100} and uses an exponential cooling rate of {0.995}.

Python Implementation

The interactive Python program uses pygame for real-time visualization of the optimization process. Each point on the cone is parameterized by {\phi} (angle) and {s} (height). This parametrization allows easy visibility checks by means of checking whether the angle is in a prescribed interval. The program calculates the {s}-energy of (perturbed) point configurations and dynamically updates the positions of the points, projecting them into 2D for rendering.

The full code is available as an interactive python demo (trinket) at: Python Trinket Online Demo

Visualization

The visualization reveals how the points (candles) converge to a near-uniform distribution on the spherical cone surface as the optimization progresses. The simulated annealing algorithm efficiently explores the solution space, minimizing the {s}-energy function.

References

D.P. Hardin and E.B. Saff, Minimal Riesz energy point configurations for rectifiable {d}-dimensional manifolds, Advances in Mathematics, 2005.

J.G. Falcón-Cardona, L. Uribe, and P. Rosas, Riesz {s}-Energy as a Diversity Indicator in Evolutionary Multi-Objective Optimization, IEEE Transactions on Evolutionary Computation, 2024.

https://en.wikipedia.org/wiki/Poppy-seed_bagel_theorem

Riesz, M., Integrales de Riemann-Liouville et potentiels, Acta Sci. Math. (Szeged) 9, 142 (1938-40)

https://trinket.io/pygame/ce7d0993171c

Leave a comment