</> APL Run Loading interactive WebAssembly workspace…

🎓 Chapter 10: Capstone Projects & High-Level Visuals

Congratulations on completing the APL foundations! In this capstone chapter, we bring everything together in 3 real-world computational applications paired with APL Studio's interactive visual renderers.

---

Project A: Conway's Game of Life (Boolean Pixel Map)

Conway's Game of Life evaluates cellular automata on a 2D grid based on 8-neighbor counts.

In APL, we compute neighbor counts elegantly using 8 matrix rotations (⊖, ⌽) without writing a single nested loop!

⍝ Initialize a 16x16 grid with a glider pattern
Grid ← (16 16) ⍴ 0
Grid[1;2] ← 1 ⋄ Grid[2;3] ← 1 ⋄ Grid[3;1 2 3] ← 1
⍝ Calculate 8-neighbor sum N
N ← (¯1⊖¯1⌽Grid)+(¯1⊖Grid)+(¯1⊖1⌽Grid)+(¯1⌽Grid)+(1⌽Grid)+(1⊖¯1⌽Grid)+(1⊖Grid)+(1⊖1⌽Grid)
⍝ Apply Conway rules: Live if (N=3) or (Grid and N=2)
Grid ← (N=3) ∨ (Grid ∧ N=2)
Grid

---

Project B: Mandelbrot Fractal (True Bitmap Canvas)

We evaluate $Z_{k+1} = Z_k^2 + C$ across a complex coordinate matrix grid and render the iteration counts directly to an HTML5 True Bitmap Canvas with color palettes!

H ← 40 ⋄ W ← 60 ⋄ Iters ← 30
re ← ¯2.0 + 3.0 × (¯1 + ⍳W) ÷ W - 1
im ← 1.25 + ¯2.5 × (¯1 + ⍳H) ÷ H - 1
CR ← (H⍴1)∘.×re ⋄ CI ← im∘.×W⍴1
ZR ← (H,W)⍴0 ⋄ ZI ← (H,W)⍴0 ⋄ N ← (H,W)⍴0
:For i :In ⍳Iters
    MASK ← 4 ≥ (ZR×ZR) + ZI×ZI
    T1 ← (ZR×ZR) - ZI×ZI ⋄ T2 ← 2 × ZR × ZI
    ZR ← MASK × CR + T1 ⋄ ZI ← MASK × CI + T2
    N ← N + MASK
:EndFor
N

---

Project C: Mathematical Curve Plotting (Auto-Chart)

Plotting numerical mathematical series $Y = X \cdot \ln(1 + X)$ using SVG Auto-Charting.

X ← ⍳ 50
Y ← X × ⍟ 1 + X
Y

← Chapter 9: Matrix Algebra, Transpose (⍉) & Linear Solvers (⌹)