Rust rail fence cipher

Can anyone shed some light with this exercise? I can’t figure out how to start with the encrypt function. My issue is that I cannot find a way to even start the indexing of the already sanitized literal string. I understand the zig zag steps (by hand is pretty simple), but programmatically I haven’t been able to find a method. I already did the affine-cipher, at-bash cipher, rotational cipher and I was able to complete those. But with this one I cant. I have read many pages online, but most of them provide a formula for the decrypting part. I already understood that formula. Can anyone share the steps you took to find the encrypt algorithm?
I have read this Clojure thread Clojure rail fence But Clojure is kind of cryptic for me to read.

If you know how you would do it be hand, you’re halfway there! Try to write those steps down. A 2D array can be helpful here.

Alternatively, look for patterns. Maybe lay out the data on rails using indexes to see if you can find patterns in how you would collect values.