example program
water.grapheme
/bond angle from Coulomb forces alone
One water molecule, modeled as five charged particles: one oxygen, two hydrogens, two lone-pair electron clouds. The charges feel Coulomb repulsion. The hydrogen-oxygen bonds are stiff springs. Damping bleeds energy each tick.
Without hard-coding any angle, the system relaxes into the bent H₂O geometry. The H–O–H angle settles at exactly 104.52° as a consequence of the lone-pair tetrahedron geometry.
code
// loading...