Skip to main content
2 of 2
added 1329 characters in body
Neil
  • 177.3k
  • 12
  • 74
  • 281

Charcoal, 42 35 bytes

AEθSθW⊟θ«⪫θ¶AEι⮌⪫Eθ§μλωθ⊞υι↙←⮌⪫υωD⎚

Try it online! Link is to verbose version of code. Edit: Saved 7 bytes mostly by switching from character arrays to strings. Explanation:

AEθSθ

Read the input square as an array of strings into the variable q.

W⊟θ«

While the last string in the array is not empty, remove it.

⪫θ¶

Print the rest of the array.

AEι⮌⪫Eθ§μλωθ

Rotate the rest of the array by looping through each character of the last string and joining the lth character of every remaining string in the reversed array.

⊞υι↙←⮌⪫υω

Append the previously removed last string to u, which holds the unfurled value, and print it.

D⎚

Output the result and then clear the canvas ready for the next iteration.

Note that this version outputs the final unfurl on a separate line, if this is undesirable then for 38 bytes:

AEθSθW⊟θ«⊞υι←E⁺⟦⪫υω⟧⮌θ⮌κAEι⮌⪫Eθ§μλωθD⎚

Try it online! Link is to verbose version of code. Explanation: ←E⁺⟦⪫υω⟧⮌θ⮌κ reverses the current array, prepends the unfurled line, then reverses the characters in each line, then prints everything upside-down, thus producing the desired result.

Neil
  • 177.3k
  • 12
  • 74
  • 281