day 8 with all sub-pics

This commit is contained in:
2025-02-23 10:16:50 +01:00
parent b7e8ed8cfb
commit 3d2be9209f
163 changed files with 6 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ f_columns = 50
from time import time from time import time
from copy import deepcopy from copy import deepcopy
import numpy as np import numpy as np
from PIL import Image, ImageDraw, ImageFont from PIL import Image
start_time = time() start_time = time()
@@ -97,8 +97,13 @@ def array_to_image(ar):
if __name__ == "__main__": if __name__ == "__main__":
field = create_field(int(f_columns), int(f_rows)) field = create_field(int(f_columns), int(f_rows))
commands = read_file(file) commands = read_file(file)
counter=0
for command in commands: for command in commands:
field = do_command(command, field) field = do_command(command, field)
img = array_to_image(field)
img.save(f"./all_pics/pic{counter:03d}.png")
counter+=1
print(f"Solution Part1: {count_pixel(field)}") print(f"Solution Part1: {count_pixel(field)}")
print(f"Solution Part2:") print(f"Solution Part2:")

BIN
08/all_pics/pic000.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

BIN
08/all_pics/pic001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

BIN
08/all_pics/pic002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

BIN
08/all_pics/pic003.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

BIN
08/all_pics/pic004.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

BIN
08/all_pics/pic005.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

BIN
08/all_pics/pic006.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

BIN
08/all_pics/pic007.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

BIN
08/all_pics/pic008.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

BIN
08/all_pics/pic009.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
08/all_pics/pic010.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
08/all_pics/pic011.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

BIN
08/all_pics/pic012.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

BIN
08/all_pics/pic013.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

BIN
08/all_pics/pic014.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

BIN
08/all_pics/pic015.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
08/all_pics/pic016.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

BIN
08/all_pics/pic017.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
08/all_pics/pic018.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

BIN
08/all_pics/pic019.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
08/all_pics/pic020.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
08/all_pics/pic021.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

BIN
08/all_pics/pic022.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

BIN
08/all_pics/pic023.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
08/all_pics/pic024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

BIN
08/all_pics/pic025.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

BIN
08/all_pics/pic026.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

BIN
08/all_pics/pic027.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

BIN
08/all_pics/pic028.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

BIN
08/all_pics/pic029.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

BIN
08/all_pics/pic030.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

BIN
08/all_pics/pic031.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

BIN
08/all_pics/pic032.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

BIN
08/all_pics/pic033.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

BIN
08/all_pics/pic034.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

BIN
08/all_pics/pic035.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

BIN
08/all_pics/pic036.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

BIN
08/all_pics/pic037.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

BIN
08/all_pics/pic038.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

BIN
08/all_pics/pic039.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

BIN
08/all_pics/pic040.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

BIN
08/all_pics/pic041.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

BIN
08/all_pics/pic042.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

BIN
08/all_pics/pic043.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

BIN
08/all_pics/pic044.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
08/all_pics/pic045.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

BIN
08/all_pics/pic046.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
08/all_pics/pic047.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
08/all_pics/pic048.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
08/all_pics/pic049.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
08/all_pics/pic050.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
08/all_pics/pic051.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
08/all_pics/pic052.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
08/all_pics/pic053.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic054.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic055.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

BIN
08/all_pics/pic056.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic057.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
08/all_pics/pic058.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
08/all_pics/pic059.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
08/all_pics/pic060.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
08/all_pics/pic061.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
08/all_pics/pic062.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

BIN
08/all_pics/pic063.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
08/all_pics/pic064.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
08/all_pics/pic065.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

BIN
08/all_pics/pic066.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
08/all_pics/pic067.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

BIN
08/all_pics/pic068.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

BIN
08/all_pics/pic069.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

BIN
08/all_pics/pic070.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

BIN
08/all_pics/pic071.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

BIN
08/all_pics/pic072.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
08/all_pics/pic073.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
08/all_pics/pic074.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

BIN
08/all_pics/pic075.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

BIN
08/all_pics/pic076.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
08/all_pics/pic077.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

BIN
08/all_pics/pic078.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic079.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
08/all_pics/pic080.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

BIN
08/all_pics/pic081.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic082.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

BIN
08/all_pics/pic083.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

BIN
08/all_pics/pic084.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

BIN
08/all_pics/pic085.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic086.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic087.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic088.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic089.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
08/all_pics/pic090.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

BIN
08/all_pics/pic091.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
08/all_pics/pic092.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

BIN
08/all_pics/pic093.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic094.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

BIN
08/all_pics/pic095.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
08/all_pics/pic096.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
08/all_pics/pic097.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

BIN
08/all_pics/pic098.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Some files were not shown because too many files have changed in this diff Show More