Javascript 126 bytes
for(c=r=a='';r<16;c++>22&&(r++,c=0,a+=`
`))C=c%22>1&&r%14>1,q=[1,,C&&r&2,,,,C&&~r&2,,1],a+=q[c+5+r&7]?'/':q[r-c+20&7]?'\\':' '
Since it's now pretty unreadable, a basic explanation:
- we tile the space top left to bottom right
- we draw it as basically 6 diagonal lines that repeat every 8 characters: 2 solid lines, and 4 that are "dashed" (two characters, then two spaces...)
- the
C=...
stuff is to limit drawing of some of the lines to within a bounding box
- to save a lot of characters, we deliberately add numbers to make the expressions for the upwards and downwards lines extremely similar
- then, put the expressions themselves into a sparse array
[1,,C&&...]
, which we look up into. If there is a truthy value, we draw the appropriate character.
-
for(c=r=a='';r<16;c++>22&&(r++,c=0,a+=`
`)) // basic grid tiling
C=c%22>1&&r%14>1, // are we not near the edges
q=[1, // a solid line that always draws
, // a line that never draws
C&&r&2, // a line that draws if not near the edge, and if on the correct "dash" (r&2)
,,,
C&&~r&2, // if not near the edge, and on the opposite "dash" (~r&2)
,1 // the opposite diagonal line that always draws
],
a+=q[c+5+r&7]?'/' // compute which upward line we're on, check whether to draw it
:q[r-c+20&7]?'\\' // do the same for the downward line
:' ' // otherwise draw a space
Maybe this explanation didn't help. :)
Try online: https://codepen.io/stevebennett/pen/WjgMpY
Hopefully I got the output right:
/\ /\ /\
/ \ / \ / \
/ /\ \ / /\ \ / /\ \
/ / \ \/ / \ \/ / \ \
\ \ / /\ \ / /\ \ / /
\ \/ / \ \/ / \ \/ /
\ / /\ \ / /\ \ /
\/ / \ \/ / \ \/
/\ \ / /\ \ / /\
/ \ \/ / \ \/ / \
/ /\ \ / /\ \ / /\ \
/ / \ \/ / \ \/ / \ \
\ \ / /\ \ / /\ \ / /
\ \/ / \ \/ / \ \/ /
\ / \ / \ /
\/ \/ \/
History
130
for(c=r=a='';r<16;c++>22&&(r++,c=0,a+=`
`))C=c%22>1&&r%14>1,q=[1,,C&&r&2,,,,C&&~r&2,,1],a+=q[(c+5+r)%8]?'/':q[(r-c+20)%8]?'\\':' '
133
for(c=r=a='';r<16;c++>22&&(r++,c=0,a+=`
`))C=c%22>1,q=[1,,C&&r&2&&r<14,,,,C&&~r&2&&r>1,,1],a+=q[(c+5+r)%8]?'/':q[(r-c+20)%8]?'\\':' '
137
for(c=r=a='';r<16;c++==23&&(r++,c=0,a+=`
`))C=c<22&&c>1,q=[1,,C&&r&2&&r<14,,,,C&&~r&2&&r>1,,1],a+=q[(c+5+r)%8]?'/':q[(r-c+20)%8]?'\\':' '
155
for(c=r=a='';r<16;c++==23&&(r++,c=0,a+=`
`))Z=(C=c<22&&c>1)&&~r&2&&r>1,Y=C&&r&2&&r<14,B=(c-r+12)%8,A=(c+5+r)%8,q=[1,,Y,,,,Z,,1],a+=q[A]?'/':q[8-B]?'\\':' '
History: 172
for(c=r=a='';r<16;c++==23&&(r++,c=0,a+='\n'))a+=(Z=(C=c<22&&c>1)&&~r&2&&r>3,Y=C&&r&2&&r<12,B=(c-r+16)%8,A=(c+r)%8,A==3||A==5&&Y||A==1&&Z?'/':B==4||B==2&&Y||B==6&&Z?'\\':' ')