max distance to determine steps and generate intermediate states