4 ms·
Cases 5 and 10 in the article are actually ambiguous. In each case there are two ways to draw lines to separate the high and low points and a naïve algorithm wi
by liversage 5y ago
Cases 5 and 10 in the article are actually ambiguous. In each case there are two ways to draw lines to separate the high and low points and a naïve algorithm will just hardcode one of each like it's done in the article. This isn't a serious problem in the two dimensional marching squares algorithm but the same problem can lead to holes in the surface generated by the three dimensional marching cubes algorithm.
During a visit to Washington University I had the opportunity to work with this flaw in the algorithm and I ended up publishing a scientific paper about the subject. I then went on to write my thesis (in Danish) where I worked more rigorously on how to deal with this. It's so long ago that I almost forgot so reading about marching squares again was a nice trip down memory lane.
https://martinliversage.blob.core.windows.net/publications/1992%20Automedica.pdf https://martinliversage.blob.core.windows.net/publications/1...
https://martinliversage.blob.core.windows.net/publications/1994-09%20Visualisering%20af%20tredimensionale%20medicinske%20data.pdf https://martinliversage.blob.core.windows.net/publications/1...
- phkahler 5y ago>> Cases 5 and 10 in the article are actually ambiguous. They are. He does mention using interpolation to make better boundaries. For example if you're using a threshold value and flag points as above/below that value, you can position the end-point of a line based on that threshold. When the lines don't exactly split a squares edge then cases 5 and 10 can be made less ambiguous by selecting the lines that minimize total line-length within a square. Or some similar heuristic.