Physics as Code

Pauli Exclusion Principle — particle sandbox

Every electron's state is the tuple (n, l, m_l, m_s), and the rule is algorithmic: the electron cloud must behave like a Set, never a List. Spawn protons, neutrons and electrons at random positions and watch nuclear attraction pull nucleons into nuclei, electrons fall into the next open quantum state, and — once an atom's outer shell can take more electrons — simple valence-driven bonds form between atoms, per the original write-up.

This is a stylized toy model, not a physically exact simulation: attraction, capture radii and bonding are simplified so the underlying quantum-state rule stays visible. Quantum states are drawn from the article's 12-slot table (1s–3s), so bonding is only modeled through Z=12 (Magnesium).

Stage drag to rotate
0
atoms on stage
0 protons free · 0 neutrons free · 0 electrons free
0 bonds formed
Paused
s subshell
p subshell
spin +½
spin −½
proton
neutron
Speed 1.00x
Spawn Particles random positions
2× Hydrogen
Water-ish (O + 2H)
Methane-ish (C + 4H)
Atoms on Stage 0 formed
No atoms yet — add particles and press Play
Event Log live
validate_pauli_exclusion() live JS