Closed jamblejoe closed 1 year ago
The algorithm doesn't know about the nature of the function you're trying to contour. It sees values changing sign across the y-axis, and without knowing that it's actually a discontinuity it assumes that the function must be zero along the y-axis. I think this will be the case with any contouring algorithm that just takes in a matrix of numbers.
Maybe we can put in an option where the algorithm will treat value jumps larger than some input parameter as a discontinuity? I'd rather handle cases like this by filtering out the contours lines afterwards, but it's not difficult to add this extra parameter in if there's enough people needing this.
Consider the following map with discontinuities on the y-axis. The black lines are the contours with value 0. They clearly are wrong at the discontinuity on the y-axis. Expected would be a horizontal line at y=0. Is this a general drawback of the algorithm are is this an edge case, which is not dealt with yet?
The first contour:![image](https://user-images.githubusercontent.com/12518354/236827799-85a41f98-8dba-4088-99ef-0f1f7ba373d8.png)
The second contour looks like this:![image](https://user-images.githubusercontent.com/12518354/236827889-86089fff-e8e4-40b5-b766-12d95691bc97.png)