NEMS Resonant Mass Sensor — Frequency-Response Waterfall (2D)

This is the 2D companion to the 3D NEMS resonant mass sensor simulator. Instead of animating the physical shape of a vibrating nanocantilever, it plots the analytic steady-state frequency-response curve of the identical driven damped harmonic oscillator and sweeps it live across a frequency window. Every time a particle lands on the sensor, the total vibrating mass increases by a tiny amount, the resonance peak steps to a slightly lower frequency, and the previous curve is kept on screen as a fading trace — stacking landings into a waterfall that makes the staircase shift, and the linewidth set by the quality factor Q, directly visible. Adjust particle mass, landing rate and Q to see how each one shapes the readout a real NEMS lab would see on a network analyzer.