folflow.git
14 months agoImplement iteration optimization
Lukas Jiriste [Fri, 13 Sep 2024 10:20:36 +0000 (12:20 +0200)]
Implement iteration optimization

Instead of checking every element of a
heightmap for eligibility to process,
only the elements neighbouring just
processed elements are checked.
This cuts the time to roughly a third.

14 months agoCreate a helper function for basin recognition
Lukas Jiriste [Thu, 12 Sep 2024 23:56:03 +0000 (01:56 +0200)]
Create a helper function for basin recognition

This function accepts an array representing the height map of an area
and accumulates pixel count through steepest path downward.
This is a naive implementation that takes quite some time to complete
for larger maps.