HomeMaterials ScienceAFM Raster-Scan Imaging: Constant-Force Topography Feedback

AFM Raster-Scan Imaging: Constant-Force Topography Feedback

Interactive 2D atomic force microscope raster-scan simulator: a PI feedback loop drives the cantilever's z-piezo to hold a constant DMT contact force while the tip sweeps a real 2D sample topography, building up a reconstructed height image line by line — switch to open-loop constant-height imaging to see the same physics produce a distorted image.

Materials Science2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-atomic-force-microscopy-tip-sample-interaction ↗ Open standalone

This simulator turns the single-point AFM force-curve physics into a real raster-scan imaging instrument: a PI feedback loop drives the cantilever's piezo command to hold a constant tip–sample contact force while the tip sweeps line by line across a genuine 2D sample topography with a spatially varying, stickier "material" patch. The recorded piezo-command trace builds up into a reconstructed height image in real time, exactly the way a real constant-force AFM works — and switching to open-loop constant-height imaging reproduces the real distortion artifact that closed-loop feedback exists to fix, driven by the same damped-oscillator and DMT contact equations rather than a scripted image.

⚙ Under the hood

Watch a PI feedback loop drive an AFM cantilever's piezo command to hold a constant DMT contact force while the tip raster-scans a real 2D sample topography with a spatially varying sticky patch, building a reconstructed height image line by line — then switch to open-loop constant-height imaging and see the same physics produce a distorted, adhesion-confounded image instead.

AFMraster scan imagingPI feedback controlvan der Waals forceDMT contact modelmaterials sciencesurface science

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)