aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-02-21 20:49:18 +0530
committerAkshay Nair <phenax5@gmail.com>2025-02-21 20:49:18 +0530
commit95a72bf4c39f82281ef2efe7bb7302b8807f133b (patch)
tree0a08a69fe422a58df0483724f1501ffca6611c18
parent4014dc198f2ef7152f37f59668b16792e3358001 (diff)
downloaduiua-creative-coding-95a72bf4c39f82281ef2efe7bb7302b8807f133b.tar.gz
uiua-creative-coding-95a72bf4c39f82281ef2efe7bb7302b8807f133b.zip
Add another fancy patternHEADmain
-rw-r--r--7-dan-flashes/main.ua23
-rw-r--r--7-dan-flashes/output.gifbin0 -> 2271730 bytes
-rw-r--r--7-dan-flashes/output.pngbin0 -> 232875 bytes
-rw-r--r--README.md2
4 files changed, 25 insertions, 0 deletions
diff --git a/7-dan-flashes/main.ua b/7-dan-flashes/main.ua
new file mode 100644
index 0000000..b101302
--- /dev/null
+++ b/7-dan-flashes/main.ua
@@ -0,0 +1,23 @@
+W ← 400 # width
+H ← 400 # height
+S ← 0.1 # scale
+F ← 50 # number of frames for gif
+Fps ← 10 # frame rate for gif
+
+ToPixel ← ⍣(
+ 1_0.84_0 ⍤.≤0.1⌵
+| 0_0_0 ⍤.≤0.44⌵
+| 0_0.34_0.72 ⍤.≤0.8⌵
+| 0.16_0.16_0.21
+)
+
+Sq ← :⊃∿(∿+η) +∩(×.)
+# xsin(ax)cos(ax)cos(x^2 + y^2) = ysin(ax)cos(ax)sin(x^2 + y^2)
+Equation ← -⊙×× ⊙: ⊙⊙(∩(××⊃∿(∿+η).) ⊙×⊸×⊙:) ◡Sq °ℂ
+
+Grid ← ⊞ℂ ∩(÷S -0.5 ÷W) ⇡H⇡W
+Img ← ∵(ToPixel Equation: 1) Grid
+&fwa "./7-dan-flashes/output.png" img "png" Img
+
+Frames ← ≡(∵(ToPixel Equation) Grid) +0.2×5÷F⇡F
+&fwa "./7-dan-flashes/output.gif" gif Fps Frames
diff --git a/7-dan-flashes/output.gif b/7-dan-flashes/output.gif
new file mode 100644
index 0000000..44fd1b5
--- /dev/null
+++ b/7-dan-flashes/output.gif
Binary files differ
diff --git a/7-dan-flashes/output.png b/7-dan-flashes/output.png
new file mode 100644
index 0000000..d85b747
--- /dev/null
+++ b/7-dan-flashes/output.png
Binary files differ
diff --git a/README.md b/README.md
index 19686dc..ff5becf 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,8 @@ https://github.com/user-attachments/assets/37e38ccf-5e7e-47e5-ba3e-1bc216b7ff2f
<img src="6-julia/output-600.gif?raw=true" />
</td>
<td width="50%" valign="top">
+ <h3><a href="7-dan-flashes/main.ua">More sins</a></h3>
+ <img src="7-dan-flashes/output.gif?raw=true" />
</td>
</tr>
</table>