aboutsummaryrefslogtreecommitdiff
path: root/4-im-a-sinner/main.ua
diff options
context:
space:
mode:
Diffstat (limited to '4-im-a-sinner/main.ua')
-rw-r--r--4-im-a-sinner/main.ua20
1 files changed, 11 insertions, 9 deletions
diff --git a/4-im-a-sinner/main.ua b/4-im-a-sinner/main.ua
index 00dfb26..a4f0390 100644
--- a/4-im-a-sinner/main.ua
+++ b/4-im-a-sinner/main.ua
@@ -1,9 +1,8 @@
-W ← 400 # width
-H ← 400 # height
-S ← 0.08 # scale
-I ← 30 # max iterations
-Ox ← 0 # offset x
-Oy ← 0 # offset y
+W ← 400 # width
+H ← 400 # height
+S ← 0.08 # scale
+F ← 20 # number of frames for gif
+Fps ← 10 # frame rate for gif
ToPixel ← ⍣(
0.16_0.16_0.21 ⍤.>0
@@ -13,9 +12,12 @@ ToPixel ← ⍣(
| 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
+Equation ← - ⊙(∿××) ◡(+ ⊓∿(∿+η) ∩(×.)) °ℂ
+Grid ← ⊞ℂ ∩(÷S -0.5 ÷W) ⇡H⇡W
+Img ← ∵(ToPixel Equation: 2) Grid
&fwa "./4-im-a-sinner/output.png" img "png" Img
+
+Frames ← ≡(∵(ToPixel Equation) Grid) ×6 ÷F-÷2F⇡+1F
+&fwa "./4-im-a-sinner/output.gif" gif Fps Frames