Maybe it would be better to work with the map points for the height calculation.
For each frame go through all pts only once and make a list (or array) of all points in a 50m(or other) radius.
Then use this list to:
- Calculate the blade height
- Apply the cut/fill height precisely to each pt
- draw a nicer look ahead
Con: Maybe some rounding error because we use a second list but should be negligible
Maybe it would be better to work with the map points for the height calculation.
For each frame go through all pts only once and make a list (or array) of all points in a 50m(or other) radius.
Then use this list to:
Con: Maybe some rounding error because we use a second list but should be negligible