https://simplymaya.com/forum/showthread.php?t=34884 this topic might help, it's not exactly the same method and i don't think it's gonna work with a closed path but it might give you a clue and hopefully you'll learn something with it.