Grasshopper Ziggurat Manipulation

Hi, I was wondering anyone knew how to program this in rhino, I have a ziggurat formation I am trying to play with and multiply, was just wondering if anyone had a similar grasshopper file to achieve this or helpful resources, thank you!

Hi,

Check this out:

The definition sometimes produces self-intersecting curves, which break it, but otherwise it should produce similar results to the reference.

ziggurat.gh (16.8 KB)