Modelling of the scan process in lateral force microscopy