aboutsummaryrefslogtreecommitdiff
path: root/7-dan-flashes/main.ua
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 /7-dan-flashes/main.ua
parent4014dc198f2ef7152f37f59668b16792e3358001 (diff)
downloaduiua-creative-coding-95a72bf4c39f82281ef2efe7bb7302b8807f133b.tar.gz
uiua-creative-coding-95a72bf4c39f82281ef2efe7bb7302b8807f133b.zip
Add another fancy patternHEADmain
Diffstat (limited to '7-dan-flashes/main.ua')
-rw-r--r--7-dan-flashes/main.ua23
1 files changed, 23 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