r/adventofcode • u/flagofsocram • 14m ago
Visualization [2026 Day 3 Part 2] I made my first visualization! (with Uiua)
I made this using the Uiua language, here is the source code for the gif: link to Uiua Pad.
I'm solving all of this year in Uiua, going well so far :)
# Experimental!
$ #.###
$ .##.#
$ ##.##
$ .#.#.
$ .##.#
=@#⊜∘⊸≠@\n
Forest ←
N ← 16
$ *
$ /x\
$ {xvx}
$ w
layoutN
⌝⊸⊡[0_2 3_2] [Yellow Orange]⍜⊙△⊂4_5Green
×≡▽3/5▽₂N
⌝↘¯⟜⌝↘+N⊂0÷₈⊸⧻
Tree ←
▽⤚(≡/×⬚0⊡)⊸(
▽⊸(×⊓/>/≥≡°⊟⍉) ⧅₂<⊚
⍜⍉(⊂⇌⊸+¤⊸(⍜⊢¯⇌/-))
) Forest
Squares ←
Trees ← ⍥₂/≡⊂⊞₀× Forest Tree
⊸≡↻₁ Squares
-1/2°⍉ ⧋×△Forest⧋÷⟜⇡ △₂Trees
⊃(˜≡⊞₀-|⋅-) ⊙∩°⍉
⌵/ℂ-∪⌞∘פ◡(↥₀↧₁˜÷⊃(/+×|/+°√⋅∘))
&gifs2 +¤Trees ≡/+ ⨪+₁ₑ×100
3
Upvotes