# Locate ridges on a surface

hi guys,
I said to a friend that I will help him with the illustrations for his thesis and it’s proving somewhat challenging!
I want to recreate this image,

and I want to define the ridges on the surface.
(for every local minimum, I want to define the border of the area from which a ball would roll to that minimum and not the neighboring shown with the dotted curves in the image)
can this easily be defined?
I could ‘fake’ it by approximating it with a voronoi projection, but I bet it can be done more accurately.

ridges.gh (4.6 KB)

This is one possible way, using slopes, you could probably get more precision by calculating the gradient and the divergent of the mesh or by mapping the surface into an image and using edge detection but then again is more difficult.
Slopes.gh (21.1 KB)

hmm, not exactly what I’m looking for.
What I want are essentially drainage basins.

Something like this? You could extract all the curves, which are moving to your target point. Create a curve from the endpoints and project them onto the surface?

1 Like

yeah!
It still needs some ‘manual’ work but it pretty much works! thanks man!

This one talks about catchment areas in a similar way you describe. There is a function call Topographic Position Index = TPI, and is pretty good for identifying ridges and …
https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2009WR008540