Add midpoint displacement algorithm