This 2D side-view simulator balances real magnetic forces against gravity to hold an object in mid-air. In permanent-magnet mode, an inverse-cube repulsion force from a track below the puck naturally strengthens as the gap shrinks and weakens as it grows, giving a passively stable levitation height with no active control needed. Switch to electromagnet mode and the puck instead hangs below an overhead coil whose inverse-square attraction pulls harder the closer it gets — an open-loop unstable configuration that crashes or drifts away unless a PID feedback loop continuously trims the coil current to hold it at the target gap. Adjust the field strength and object mass, nudge the puck with the perturb button, and watch levitation height, net force, drive current and stability update live as the system either settles, oscillates, or fails.