F³⊞υ﹪ι²F”)⧴→↨w﹪f”«UMυ⁺κ§υ⊖λ⊞υ⁰F›ⅉ⁰≔⪫✂υIι±Iι¹ ι⟦⁺× ⊘⁻²⁴Lιι
Try it online! Link is to verbose version of code. Explanation:
F³⊞υ﹪ι²
Start by preparing a list 0 1 0
. (Charcoal's indexing is cyclic, so rather than letting it wrap I need to provide a safety margin.)
F”)⧴→↨w﹪f”«
Loop over the compressed string 111113222667
which represents the number of entries to slice off each side (except on the first iteration).
UMυ⁺κ§υ⊖λ
Add each element to the next element (so the first element remains 0
).
⊞υ⁰
Append another 0
to the end. (This is done here so that it can be easily sliced off again.)
F›ⅉ⁰≔⪫✂υIι±Iι¹ ι
Except on the first loop, slice off the given number of entries from the start and the end (this has to be nonzero to work, which is why we already pushed the 0
only to slice it off again, and also why we have an extra 0
at the start, which otherwise wouldn't be necessary). On the first loop, the 1
just ends up being the output string.
⟦⁺× ⊘⁻²⁴Lιι
Centre the string in a width of 24 (23 would round the sixth and eighth lines down which is not what we want) and output each string on its own line.