diff options
| author | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-27 03:19:39 -0500 |
|---|---|---|
| committer | nic-gaffney <gaffney_nic@protonmail.com> | 2023-06-27 03:19:39 -0500 |
| commit | 5d958f8af1646f9cb4763bb2f020bb2e6de8a3c0 (patch) | |
| tree | 32321069ed7dd49c567b53a13dfbb07e1e95f88b /mandelbrot.py | |
| parent | 9f7f0f925f9304ac46499caf0fef245083a78828 (diff) | |
| download | sloth-5d958f8af1646f9cb4763bb2f020bb2e6de8a3c0.tar.gz | |
help
Diffstat (limited to 'mandelbrot.py')
| -rw-r--r-- | mandelbrot.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mandelbrot.py b/mandelbrot.py deleted file mode 100644 index 82aa65c..0000000 --- a/mandelbrot.py +++ /dev/null @@ -1,22 +0,0 @@ -size = 200 - -# constants: -MaxValue = 4 -MaxIterations = 50 -planeWidth = 4 - -for x in range(0, size): - for y in range(0, size): # for each pixel do: - cReal = (x * planeWidth / size) - 2 - cImg = (y * planeWidth / size) - 2 - zReal = 0 - zImg = 0 - count = 0 - while (zReal*zReal + zImg*zImg) <= MaxValue and count < MaxIterations: - temp = (zReal * zReal) - (zImg * zImg) + cReal - zImg = 2 * zReal * zImg + cImg - zReal = temp - count += 1 - - if count == MaxIterations: - print(f"\x1b[{x};{y}H*") |
