Your task: generate a Koch snowflake to the nth depth. You do not need to make a complete Koch snowflake, just one side of the starting triangle. Wikipedia on Koch flakes: https://en.wikipedia.org/wiki/Koch_snowflake.
Rules:
- The program must generate one side of the Koch snowflake to the nth depth.
- Output may be ASCII or graphical.
- You may generate the whole snowflake; this is not required.
- Standard rules for input/output and loopholes and stuff apply.
- Whitespace does not matter, as long as it all characters are in the right place. (ASCII)
- Shortest code wins!
Test cases:
n=2: ASCII:
_/\_
\ /
_/\_/ \_/\_
n=3: ASCII:
_/\_
\ /
_/\_/ \_/\_
\ /
/_ _\
\ /
_/\_ _/ \_ _/\_
\ / \ / \ /
_/\_/ \_/\_/ \_/\_/ \_/\_
I hope this makes sense.