Given a positive integer N, output the innermost N×N square of an ASCII art spiral made of -|/\
that spirals clockwise inward.
The -
is used for horizontal portions, |
for vertical portions, and /
and \
for corners. The first character is -
and the spiral proceeds left and down.
Specifically, when N is 1 the output is:
-
When N is 2 the output is:
/-
\-
When N is 3 the output is:
--\
/-|
\-/
When N is 4 the output is:
/--\
|/-|
|\-/
\---
Note how every output is a square of N by N characters.
The pattern continues in the same way:
N=1
-
N=2
/-
\-
N=3
--\
/-|
\-/
N=4
/--\
|/-|
|\-/
\---
N=5
----\
/--\|
|/-||
|\-/|
\---/
N=6
/----\
|/--\|
||/-||
||\-/|
|\---/
\-----
N=7
------\
/----\|
|/--\||
||/-|||
||\-/||
|\---/|
\-----/
N=8
/------\
|/----\|
||/--\||
|||/-|||
|||\-/||
||\---/|
|\-----/
\-------
etc.
The shortest code in bytes wins.