Fabric smocking

hey guys!
im new to grasshopper, and as a part of an architecture-textile project i want to do a code that can make fabric smocking patterns. any ideas on how to achieve that?
thank you

examples:

I thing you will spend more more time to develop:persevere:

I can’t imagine doing this without Kangaroo.

can you suggest another working method?

i found this simulation but i cant quite understand how it works