A binary matrix represents a shape in the plane. 1 means a unit square at that position. 0 means nothing. The background is 0.
For example, the array [[0,1,0],[0,0,1],[1,1,1]]
represents the following shape:
o----o
|////|
|////|
o----o----o
|////|
|////|
o----o----o----o
|////|////|////|
|////|////|////|
o----o----o----o
Challenge
You take input as the array and output the matching ASCII art.
As with all code-golfing challenges, the shortest code in terms of bytes wins.
Examples
[[1,1,1],[0,0,0]]
o----o----o----o
|////|////|////|
|////|////|////|
o----o----o----o
(You may or may not trim)
[[0,1,0],[1,0,1]]
o----o
|////|
|////|
o----o----o----o
|////| |////|
|////| |////|
o----o o----o
[[1,0,1,0],[0,0,0,0],[1,1,1,0]
o----o o----o
|////| |////|
|////| |////|
o----o o----o
o----o----o----o
|////|////|////|
|////|////|////|
o----o----o----o
[[1]]
o----o
|////|
|////|
o----o
You can choose whether or not to trim surrounding whitespace, from either rows, columns, both or neither
0 1 0\n0 0 1\n1 1 1
if our language does not support arrays? \$\endgroup\$