STM Topographic Imaging Lab: Constant-Current vs Constant-Height (2D)
2D scanning-tunneling-microscope lab: raster-scan a hexagonal or square atomic lattice in constant-current or constant-height mode, watch I ∝ V·exp(-2κd) build the topographic image, and compare it live against the true surface.
This 2D companion runs the same core tunneling relation as the 3D lab — I(x,y) = C·V·exp(−2κ·d(x,y)), where d is the local vacuum gap — but exposes both scan modes an operator actually chooses between on a real instrument. In constant-current mode the feedback loop is solved analytically: because I depends only on the gap d, holding I fixed forces d to a single constant everywhere, so the tip-height trace z_tip(x,y) = d_const + h(x,y) reconstructs the true corrugation almost exactly no matter what κ or V is set to. In constant-height mode the tip is frozen at a fixed plane and the measured image is the raw exponential current itself — small bumps get wildly amplified, and if the local gap collapses below about 0.15 Å the simulation flags a genuine tip crash. A reference pane renders the true synthesized surface (hexagonal graphite-like, square metal-like, or hexagonal with a vacancy defect) next to the measured image and a cross-section line plot, so the distortion — or lack of it — is directly comparable.
2D STM raster-imaging lab: reciprocal-lattice cosine-sum surface synthesis, analytic constant-current feedback solution, exponential constant-height current mapping with tip-crash detection, and a live cross-section comparison against ground truth.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install