Wednesday, December 17, 2014

Trying to find cliffs from point grid

The ask is simple: you are given vertices on a regular grid and need to return cliffs: lines where steepness gets larger than some given constant.
I tried algorithm like this:

  • mark all cells for which the borders are steep, 
  • connect 2 steepest sides with cliff segment
  • join segments where possible
End result is best described by this picture:
The small white lines are my calculated cliffs. The background is OCAD 11 generated steepness where black is 45degree steepness. My lines are calculated in a smaller subregion than the whole picture. 

This algorithm does not work without some additional improvements. Something better is needed.

No comments:

Post a Comment