(compute_motion): If right margin is reached and we are