aboutsummaryrefslogtreecommitdiff
path: root/sketches/week-1/mandelbrot.bqn
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-10-29 20:20:25 +0530
committerAkshay Nair <phenax5@gmail.com>2023-10-29 20:20:25 +0530
commited50aedc08afd67b8d9606460d2d5209239ac88c (patch)
tree02264f19aaea8ea0b7c2287f5ae3910a0bd1486e /sketches/week-1/mandelbrot.bqn
parentb6ebba87606d180735994d62e2d71c3fbf0b8763 (diff)
downloadcreative-coding-playground-ed50aedc08afd67b8d9606460d2d5209239ac88c.tar.gz
creative-coding-playground-ed50aedc08afd67b8d9606460d2d5209239ac88c.zip
chore: moving stuff around
Diffstat (limited to 'sketches/week-1/mandelbrot.bqn')
-rw-r--r--sketches/week-1/mandelbrot.bqn23
1 files changed, 0 insertions, 23 deletions
diff --git a/sketches/week-1/mandelbrot.bqn b/sketches/week-1/mandelbrot.bqn
deleted file mode 100644
index e844df8..0000000
--- a/sketches/week-1/mandelbrot.bqn
+++ /dev/null
@@ -1,23 +0,0 @@
-CMul ← { ⟨a, b⟩𝕊⟨c, d⟩: ⟨a×c - b×d, a×d + b×c⟩ }
-CMag ← +´×˜
-MandelbrotFn ← +⟜(CMul˜)
-
-MBValue ← {⟨w, h⟩ 𝕊 ⟨x, y⟩:
- p ← 6 × ⟨(x - w÷2)÷w, (y - h÷2)÷h⟩
- iters ← 0
- old ← 0‿0
- CMag p⊸MandelbrotFn •_while_ {
- isFinite ← 70 > CMag (𝕩 - old)
- old↩𝕩
- iters+↩1
- isFinite ∧ iters < 10
- } 0‿0
-}
-
-MBGrid ← {dimens 𝕊 grid: {⟨0.7, 0.4, 1⟩ × (dimens MBValue 𝕩) | 255}¨grid}
-
-{𝕊⟨w, h⟩:
- grid ← (>{↕h}¨↕w) ∾¨ h⥊˘↕w
- p ← ⟨1, 1⟩
- ⟨w, h⟩ MBGrid grid
-}