update pic

This commit is contained in:
basicbonobo 2023-12-10 10:19:18 +01:00
parent 4859e3f51c
commit dfaf33671b
2 changed files with 3 additions and 4 deletions

BIN
ten.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 107 KiB

7
ten.py
View File

@ -60,12 +60,11 @@ smallvas = canvas[1::3,1::3]
print(len(np.where(smallvas == 3)[0]))
if len(sys.argv) > 1 and sys.argv[1] == '-v':
# readd junk onto blank space (turn 2 into 1 where appropriate)
# only draw the pipes, so as to not spoil anything
for (y, x), bend in np.ndenumerate(ca):
canvas[y*3:y*3+3,x*3:x*3+3] -= (np.asarray([[False, bend & 8, False], # ...and part of the bend
canvas[y*3:y*3+3,x*3:x*3+3] = 2 - np.asarray([[False, bend & 8, False], # ...and part of the bend
[bend & 2, bend, bend & 1],
[False, bend & 4, False]], dtype=bool) &
(canvas[y*3:y*3+3,x*3:x*3+3] == 2))
[False, bend & 4, False]], dtype=bool).astype('uint8')
palette = [(x & 255, x >> 8 & 255, x >> 16)
for x in [0x433c34, 0x7f9aa5, 0xae8c67]]
colored = np.transpose(np.asarray(np.vectorize(