
Solving any complex problem requires writing many side algorithms. Some of them turn out to be so interesting that they deserve a separate publication. For example, this algorithm for building a convex hull by points, written using Revit API and DSCore. While solving one topographic problem requiring the creation of a convex hull, I noticed that this algorithm is inextricably linked to the spiral sorting of points and the construction of concentric non-intersecting closed contours. I haven't quite figured out where else it can be applied other than in my problem, but I already like how spectacularly it works.
😭 However, we should not assume that this algorithm pretends to be efficient. Rather, the opposite is true. It seems that the computation time increases exponentially as the number of points increases. On the other hand, it solves a more serious problem than just finding a convex hull.

Okay, well... I sometimes guess it's good to reinvent the wheel without going to other sources, just to exercise your brain... But next time I'll check Wikipedia first.
https://en.wikipedia.org/wiki/Convex_hull

The funny thing is that after I wrote this algorithm, I remembered that Dynamo already has such a function and got very upset that I wasted a lot of time in vain. Fortunately or not, it turned out to be broken. ¯\(ツ)/¯
