haystack_2D function

The main Haystack function, for 2-dimensional spaces.