diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-02-15 18:39:00 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-02-15 18:39:57 +0530 |
| commit | 381101385d632b169ce87fa29873c5bdb0a038b0 (patch) | |
| tree | a65a5dfdc08e1897753740638777ea537cde08ac | |
| parent | 8d3e624490779607fbbe1eef65afa7e0e5be2cac (diff) | |
| download | uiua-creative-coding-381101385d632b169ce87fa29873c5bdb0a038b0.tar.gz uiua-creative-coding-381101385d632b169ce87fa29873c5bdb0a038b0.zip | |
Add julia set fractal
| -rw-r--r-- | 6-julia/main.ua | 26 | ||||
| -rw-r--r-- | 6-julia/output-600.gif | bin | 0 -> 248956 bytes | |||
| -rw-r--r-- | 6-julia/output-600.png | bin | 0 -> 74018 bytes | |||
| -rw-r--r-- | 6-julia/output.gif | bin | 0 -> 248956 bytes | |||
| -rw-r--r-- | 6-julia/output.png | bin | 0 -> 74018 bytes | |||
| -rw-r--r-- | README.md | 11 |
6 files changed, 36 insertions, 1 deletions
diff --git a/6-julia/main.ua b/6-julia/main.ua new file mode 100644 index 0000000..5fca4d5 --- /dev/null +++ b/6-julia/main.ua @@ -0,0 +1,26 @@ +W ← 200 # width +H ← 200 # height +S ← 0.35 # scale +I ← 30 # max iterations +Ox ← 0 # offset x +Oy ← 0 # offset y +F ← 24 # number of frames for gif +Fps ← 8 # frame rate for gif + +ToPixel ← ⍣( + 0.18_0.2_0.25 ⍤.=I +| 0.92_0.93_0.96 ⍤.≥20 +| 0.37_0.5_0.67 ⍤.>13 +| 0.64_0.75_0.55 ⍤.>11 +| 0.74_0.38_0.41 ⍤.>8 +| 0_0_0 +) + +C ← ×0.7885 ⁿ(×i)e +Iterations ← ◌:◌: ⌵ ⍢(⊙(+⊙.×.) +1|× ⊙(<100⌵) <I) 0 :C +Grid ← ⊞ℂ ∩(÷S -0.5 ÷H) ⊓(-Oy)(-Ox) ⇡H⇡W +Img ← ∵(ToPixel Iterations ×1.62π) Grid +&fwa "./6-julia/output.png" img "png" Img + +Frames ← ≡(∵(ToPixel Iterations :) Grid) ×τ÷F⇡F +&fwa "./6-julia/output.gif" gif Fps Frames diff --git a/6-julia/output-600.gif b/6-julia/output-600.gif Binary files differnew file mode 100644 index 0000000..530d8a5 --- /dev/null +++ b/6-julia/output-600.gif diff --git a/6-julia/output-600.png b/6-julia/output-600.png Binary files differnew file mode 100644 index 0000000..a81d92d --- /dev/null +++ b/6-julia/output-600.png diff --git a/6-julia/output.gif b/6-julia/output.gif Binary files differnew file mode 100644 index 0000000..530d8a5 --- /dev/null +++ b/6-julia/output.gif diff --git a/6-julia/output.png b/6-julia/output.png Binary files differnew file mode 100644 index 0000000..a81d92d --- /dev/null +++ b/6-julia/output.png @@ -3,7 +3,7 @@ <table> <tr> <td width="50%" valign="top"> - <h3><a href="1-mandelbrot/main.ua">Mandelbrot set fractal</a></h3> + <h3><a href="1-mandelbrot/main.ua">Mandelbrot Set</a></h3> <img src="1-mandelbrot/output-1080.png" /> </td> <td width="50%" valign="top"> @@ -38,5 +38,14 @@ https://github.com/user-attachments/assets/18ce9a04-b597-4340-876d-8585a054c6ad </td> </tr> + + <tr> + <td width="50%" valign="top"> + <h3><a href="6-julia/main.ua">Julia Set</a></h3> + <img src="6-julia/output-600.gif?raw=true" /> + </td> + <td width="50%" valign="top"> + </td> + </tr> </table> |
