Image acquisition for trolling-mode atomic force microscopy based on dynamical equations of motion