First of all thanks for providing the nice implementation of the Marching Squares algorithm.
I've noticed some inconsistencies for various edge cases (literal "edge"-cases). I'm testing a simple 4x4 grayscale input data where all the values are 0 except one of the corners and a threshold of 0.5. Depending on which corner is set to 1, the number of mesh points varies between 3, 5, and 8. As a result, the boundary extraction also gives significantly different results of what (I think) should just be shaped which are rotated versions of each other.
First of all thanks for providing the nice implementation of the Marching Squares algorithm.
I've noticed some inconsistencies for various edge cases (literal "edge"-cases). I'm testing a simple 4x4 grayscale input data where all the values are 0 except one of the corners and a threshold of 0.5. Depending on which corner is set to 1, the number of mesh points varies between 3, 5, and 8. As a result, the boundary extraction also gives significantly different results of what (I think) should just be shaped which are rotated versions of each other.