How to bound a set of points with polygon in the form of stars

I generated a set ot lines in different planes, I want to connect the ending points of each lines to get star-shaped polygons, like what I did for the red starry shape in the image I posted. Is it possible to do it in grasshopper smartly?
Thanks!!!

1.3dm (114.5 KB)

So I group them by z under the assumption that you only have one star per level.
outline.gh (16.8 KB)

1 Like

Awesome! Thank you so much for your solution! The steps of member index and sort along curve are breathtaking!