aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-02-14 21:06:42 +0530
committerAkshay Nair <phenax5@gmail.com>2025-02-14 21:07:05 +0530
commitf4de7a370d3b55064dc6c980d49ccb9ab8a1bb09 (patch)
tree9ac09d745440e244ab7dc1c303039e155dc7ac23
parent266493157c27710f323d589a20cbc6fb78f9fc8a (diff)
downloaduiua-creative-coding-f4de7a370d3b55064dc6c980d49ccb9ab8a1bb09.tar.gz
uiua-creative-coding-f4de7a370d3b55064dc6c980d49ccb9ab8a1bb09.zip
Add sin magic pattern
-rw-r--r--4-im-a-sinner/main.ua21
-rw-r--r--4-im-a-sinner/output-1000.pngbin0 -> 616415 bytes
-rw-r--r--4-im-a-sinner/output.pngbin0 -> 193659 bytes
-rw-r--r--README.md7
4 files changed, 25 insertions, 3 deletions
diff --git a/4-im-a-sinner/main.ua b/4-im-a-sinner/main.ua
new file mode 100644
index 0000000..00dfb26
--- /dev/null
+++ b/4-im-a-sinner/main.ua
@@ -0,0 +1,21 @@
+W ← 400 # width
+H ← 400 # height
+S ← 0.08 # scale
+I ← 30 # max iterations
+Ox ← 0 # offset x
+Oy ← 0 # offset y
+
+ToPixel ← ⍣(
+ 0.16_0.16_0.21 ⍤.>0
+| 0.09_0.57_0.6 ⍤.≤0.3⌵
+| 0.31_0.23_0.64 ⍤.≤0.6⌵
+| 0.82_0.06_0.22 ⍤.≤0.9⌵
+| 0.31_0.23_0.64 ⍤.≤1.1⌵
+| 0.09_0.57_0.6 ⍤.≤1.3⌵
+| 0.16_0.16_0.21
+ # | 0.74_0.58_0.98
+)
+
+Iterations ← - ⊙(∿×2×) ◡(+ ⊓∿(∿+η) ∩(×.)) °ℂ
+Img ← ∵(ToPixel Iterations) ⊞ℂ ∩(÷S -0.5 ÷W) ⊓(-Oy)(-Ox) ⇡H⇡W
+&fwa "./4-im-a-sinner/output.png" img "png" Img
diff --git a/4-im-a-sinner/output-1000.png b/4-im-a-sinner/output-1000.png
new file mode 100644
index 0000000..60e5d4b
--- /dev/null
+++ b/4-im-a-sinner/output-1000.png
Binary files differ
diff --git a/4-im-a-sinner/output.png b/4-im-a-sinner/output.png
new file mode 100644
index 0000000..0261f3b
--- /dev/null
+++ b/4-im-a-sinner/output.png
Binary files differ
diff --git a/README.md b/README.md
index df9bade..51e7f76 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# Playing with [uiua](https://www.uiua.org/)
-| | |
-|---|---|
-| ![mandelbrot fractal](./1-mandelbrot/output-1080.png) | ![dragon curve](./2-dragon/output-12.png) |
+| | | |
+|---|---|---|
+| ![mandelbrot fractal](./1-mandelbrot/output-1080.png) | ![dragon curve](./2-dragon/output-12.png) | ![im a sinner](./4-im-a-sinner/output-1000.png) |
+<!-- | ![levy c curve](./3-levy-c-curve/output-10.png) | | | -->