Question on doing Z axis zigzag for 3D printing

Question on doing Z axis (21.4 KB)

I have a question on creating a Z axis zigzag pattern for 3D-print purposes. I am trying to create a path that can on even number layers printing from external to internal, and odd number layers printing from internal to external (The green path show on the GH). Please let me know, any suggestions help. Thank you in advance.