Cartoon of monolayer-for-monolayer thin film growth and monitoring with XRR 

This cartoon depicts Frank-van-der-Merwe thin-film growth being monitored by XRR. Each monolayer must be completed before the next monolayer starts, as in atomic-layer deposition. If the randomly chosen position of the deposition of a unit cell happens to be on a site where a unit cell already exists for that monolayer, the algorithm searches to see if any of the neighbouring eight sites in the square of 3x3 are unoccupied, and if so, chooses one of those at random for the deposition location. The x-ray reflectivity signal intensity depends on the roughness, which is at a maximum at 50% coverage. This is only plotted after the end of the simulation, as it must know how long this took in order to plot out across the entire x-axis.