Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/tasks/mandelbrot-set/oracle.py # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / tasks / mandelbrot-set / oracle.py` 20 lines ยท 606 bytes Raw Blame History 1 # Independent reference for "Mandelbrot set" (Python 3, standard library only). 2 # expected.txt is this program's stdout; omc never produced it. 3 pal = " .:-=+*%" 4 for r in range(24): 5 ci = 1.15 - float(r) * 0.1 6 line = "" 7 for c in range(72): 8 cr = float(c) * 0.0375 - 2.2 9 zr = zi = 0.0 10 it = 0 11 while it < 50: 12 zr2 = zr * zr 13 zi2 = zi * zi 14 if zr2 + zi2 > 4.0: 15 break 16 zi = 2.0 * zr * zi + ci 17 zr = zr2 - zi2 + cr 18 it += 1 19 line += "#" if it == 50 else pal[it % 8] 20 print(line)