← Back to catalog
Cover image for Wigner crystal simulation

Wigner crystal simulation

This is fun little a Wigner crystal simulation. It minimizes the energy of a bunch of electrons (which repel each other due to electromagnetic forces) in a radial quadratic potential (i.e. something like V(x,y) = x^2 + y^2). It works by simulating the dynamics with damped forces. The electron-electron repulsion is accelerated through the Barnes-Hut algorithm. For visualization, the Delaunay triangulation of the points is computed; points having degree 5 are marked red, points with degree 7 are marked blue (both are considered to be defects of the crystal), others are black. The UI in the upper-left corner controls some simulation parameters: Count is the number of electrons in the simulation. Higher values mean slower & less stable simulation, but more interesting effects.Step is the time step size. Smaller values lead to slower simulation, larger values lead to instabilities.Damping is the velocity damping factor (i.e. the parameter C in v' = -Cv). Smaller values mean hotter simulation (more movement & wiggliness), larger values mean colder simulation (behaves more like gradient descent on energy). Precision is the parameter for Barnes-Hut algorithm. Smaller values lead to imprecise electron-electron force calculations & instabilities, larger values increase precision at the expense of slower simulation. I've no idea how useful that is, but at least it's fun to watch, so I figured I'd share it. If you enjoyed it, please let me know, I'll be more than happy :) The full code for this project is here. It uses my own C++ game engine (which is used for most other projects I've released here as well). This project was inspired by John Carlos Baez's post on mastodon about Wigner crystals.

lisyarus 2 games· 153 followers· 6 ratings· portfolio 44 View creator →
Linux
ItchDB signals
★ 5 avg rating
1 ratings
4 comments
Catalog standing Top 75%
#298,704 of 399,841most rated

Ratings over time

Cumulative · 30d
1 30d ago today
Cumulative ratings

Screenshots

1 / 2
Screenshot 1 for Wigner crystal simulation
Screenshot 2 for Wigner crystal simulation