@ PolyHertz: Is that a XSI feature, or am I completely wrong? Anyway, it seems to be quite interesting, and I got it in my mind for some time, trying to find an algorithm as smart as the loop to do the job. There are some open issues about it I haven't figured out yet, like how to deal with a closed loop. In particular,…