Morse Potential 2D: Phase-Space Portrait & Anharmonic Levels

This is the 2D counterpart to the 3D Morse-potential bond simulator, integrated independently with a fourth-order Runge-Kutta solver rather than derived from the 3D scene. It draws the same real anharmonic bond physics — a covalent bond that snaps back hard when compressed and lets go entirely when stretched far enough — as three genuinely 2D-native views: the potential well with its quantized vibrational levels, a phase-space (stretch vs. rate-of-stretch) portrait that traces a closed loop for every bound state and no longer closes at dissociation, and a simple real-space bond animation. Pick a real diatomic molecule, set its vibrational quantum number, absorb or emit an infrared photon to jump levels, and watch the anharmonicity — the way adjacent energy levels bunch together near the dissociation limit — show up directly in the shrinking photon energy and the flattening phase-space loop.