New Simulations
PageRank
Power iteration with dangling-node fix: p = (1-d)/N + d·(dangling/N + A^T·p/out). Random surfer model. 4 preset graphs. Node radius proportional to rank. Log-L1 convergence inset.
Axelrod IPD Tournament
10 canonical strategies in round-robin IPD: AllC, AllD, TFT, TF2T, Generous TFT, Grim, Pavlov, Random, Joss, Friedman. Pairwise matrix + sorted bar chart. Noise ε shows Generous TFT beats TFT.
Lichtenberg Figure (DBM)
Dielectric Breakdown Model: SOR Laplace solver (ω=1.8), perimeter candidates ∝ φ^η. η=0 gives DLA, η=3 gives spicules. Box-counting fractal dimension. Additive glow rendering.
PID Controller
Three plant ODEs: thermal, cart spring-damper, tank. PID with anti-windup. 20s oscilloscope. Rise time, overshoot, settling, SS error metrics. Ziegler-Nichols autotuning from ultimate gain.
Archimedes' Principle
F_b = ρgV_sub exactly: clipped box, spherical-cap formula, Simpson's-rule hull. 5 fluids + 9 materials + 4 gravities. Spring scale. Ship stability: restoring moment GM·sinθ, capsize when metacenter below CoG.
Fatigue Crack Growth (Paris Law)
da/dN = C(ΔK)^m, ΔK = YΔσ√(πa). Four materials: Steel A36, Al 7075, Ti-6Al-4V, Cast Iron. a-vs-N log-plot with Paris regime. Catastrophic fracture animation at K_IC.
PageRank: The Mathematics Behind Web Search
PageRank models a random web surfer: with probability d (damping factor, typically 0.85), they follow a random hyperlink from the current page; with probability 1−d, they teleport to any page uniformly at random. The rank of each page is its stationary probability under this Markov chain.
The Power Iteration Formula
The update equation per iteration is: p = (1−d)/N + d · (dangling/N + A^T · p / out_degree). The dangling term (Σp_i for pages with no outgoing links, redistributed uniformly) is crucial — without it, rank leaks out of sink nodes and the vector no longer sums to 1. The simulation shows log-L1 convergence ||p_new − p_old||₁ in an inset graph, typically reaching machine precision within 50–100 iterations.
Graph Presets
- Textbook: small 6-node graph with clear hierarchy
- Rank sink: a node with no outgoing edges — demonstrates why the dangling fix is needed
- Brin-Page: a graph from the original 1998 PageRank paper
- Star: hub-and-spoke — shows how linking structure concentrates rank
Axelrod Tournament: Cooperation Under Competition
Robert Axelrod's 1984 computer tournament asked: what strategy wins in a repeated prisoner's dilemma? The surprising answer: Tit-for-Tat — nice, retaliatory, forgiving, and clear. But with realistic noise (accidental defections), the picture becomes richer.
The Ten Strategies
The tournament includes 10 canonical strategies: AllCooperate (always C), AllDefect (always D), Tit-for-Tat (copy last move), Tit-for-Two-Tats (defect only after two consecutive defections), Generous TFT (occasionally forgive a defection with probability p), Grim Trigger (cooperate until betrayed, then defect forever), Pavlov (win-stay, lose-shift), Random (50/50), Joss (TFT with 10% covert defection), and Friedman (TFT variant). Round-robin play with self-play gives a full pairwise score matrix.
Noise and the Advantage of Generosity
With noise parameter ε > 0 (each intended move flips with probability ε), TFT enters "echo wars" — a single accidental defection causes mutual retaliation that never resolves. Generous TFT adds forgiveness: with probability g ≈ 1 − 3P/(T+R+P) it cooperates even after a defection. Under noise, Generous TFT accumulates significantly more payoff than strict TFT — a quantitative demonstration that forgiveness is strategically optimal.
- Payoff matrix T/R/P/S adjustable (default: 5/3/1/0)
- Match inspector: click any cell in the pairwise matrix to replay that match move by move
- Noise slider from 0 to 0.1
- Grand-total bar chart updates in real time
Lichtenberg Figure: Dielectric Breakdown Model
Lichtenberg figures are the fractal discharge patterns created when high-voltage electricity travels through an insulating material. The Dielectric Breakdown Model (Niemeyer, Pietronero, Wiesmann 1984) captures their generation with a simple probabilistic growth rule on a Laplace-solved potential field.
SOR Laplace Solver and Growth Rule
The electric potential φ satisfies Laplace's equation ∇²φ = 0 with fixed boundary conditions (electrode at φ=1, ground at φ=0). The Successive Over-Relaxation solver with ω=1.8 converges roughly 10× faster than Gauss-Seidel. At each step, all empty cells adjacent to the growing cluster are candidate growth sites. Each candidate fires with probability proportional to φ^η — the local potential raised to power η.
The η Parameter: DLA to Lichtenberg
η controls the morphology continuously. At η=0, all perimeter sites are equally likely — this recovers Diffusion-Limited Aggregation, producing a bushy fractal with dimension ≈ 1.71. As η increases, sites with higher potential (closer to the electrode) are exponentially favoured, producing the narrow spicular branching characteristic of real Lichtenberg figures at η ≈ 3. Box-counting fractal dimension is measured live on the cluster.
- Three boundary modes: central point electrode, top-down parallel plates, ring electrode
- Additive glow rendering: bright tips, fading arms
- η slider from 0 to 4 with live morphology change
- Export cluster as PNG
PID Controller: Feedback Control Engineering
The PID (Proportional-Integral-Derivative) controller is the workhorse of industrial control — an estimated 95% of all feedback controllers in use today are PID or PI variants. Despite its simplicity, tuning it well requires understanding the dynamics of the controlled plant.
Three Plant Models
- Thermal: first-order lag
τẏ + y = u— temperature control of a room or oven - Cart (spring-damper): second-order
mẍ + cẋ + kx = u— position control of a mass-spring system - Tank: nonlinear
dh/dt ∝ √h— liquid level control with square-root outflow
Anti-Windup and Ziegler-Nichols
When the output saturates, the integral term can accumulate unbounded (windup), causing large overshoots when saturation ends. The simulation implements conditional integration: the integral only accumulates when the output is unsaturated. Ziegler-Nichols autotuning finds the ultimate gain K_u by increasing K_p until sustained oscillation, then sets K_p = 0.6K_u, K_i = 1.2K_u/T_u, K_d = 0.075K_u·T_u — a robust starting point for manual refinement.
- 20-second oscilloscope: setpoint, output, error, and control signal
- Metrics panel: rise time, overshoot %, settling time, steady-state error
- One-click Ziegler-Nichols autotuning button
- Step, ramp, and sinusoidal setpoint profiles
Archimedes' Principle: Exact Buoyancy Calculation
Archimedes' principle states F_b = ρ_fluid · g · V_submerged. The interesting challenge is computing V_submerged exactly for non-trivial shapes — and the simulation does this analytically rather than via voxel approximation.
Exact Submerged Volume Formulas
- Cube: clipped box formula — V_sub = A · min(h, h_obj) where h is immersion depth
- Sphere: spherical cap formula —
V_cap = πh²(3r−h)/3for immersion depth h ≤ r, mirrored for partial top immersion - Ship hull: 5-vertex cross-section integrated by Simpson's rule along the length
Ship Metacentric Stability
A floating body is stable if its metacentre M sits above its centre of gravity G. When the ship heels by angle θ, the restoring moment is M_restore = ρgV·GM·sinθ. If GM < 0 (metacentre below CoG), the restoring moment becomes destabilising and the ship capsizes. The simulation shows the metacentre height calculation from the waterplane second moment of area I_wl / V_sub and animates capsize when the stability criterion is violated.
- 5 fluids: fresh water, sea water, mercury, oil, liquid nitrogen
- 9 materials: steel, aluminium, wood, ice, polystyrene, concrete, rubber, glass, gold
- 4 gravity settings: Earth, Moon, Mars, Jupiter
- Spring scale shows apparent weight = actual weight − buoyancy
Microcracks: Paris Law Fatigue Crack Growth
Most structural failures don't happen because the applied load exceeded the static strength — they happen because a tiny crack grew, cycle by cycle, until it reached critical size. Paris and Erdogan's 1963 law describes this process quantitatively.
The Paris Law and Stress Intensity Factor
The crack growth rate per load cycle is da/dN = C(ΔK)^m where a is crack length, N is cycle count, and ΔK is the stress intensity factor range ΔK = Y · Δσ · √(πa). Y is a geometry factor (≈1 for central crack in infinite plate), Δσ is the stress range. C and m are material constants that vary over orders of magnitude between materials.
Four Materials and Catastrophic Fracture
The simulation shows the a-vs-N logarithmic plot for four engineering materials: Steel A36 (tough, slow crack growth), Al 7075 (used in aircraft, faster growth), Ti-6Al-4V (aerospace alloy, excellent fracture toughness), and Cast Iron (brittle, rapid propagation). When K_max = Y · σ_max · √(πa) reaches the fracture toughness K_IC, the simulation triggers a catastrophic fracture animation with screen flash and crack branching — the end of fatigue life.
- Adaptive substep: smaller da steps near K_IC for accurate final life prediction
- Log-scale a-vs-N plot with Paris regime highlighted
- Crack mouth opening displacement animation
- Initial crack size, stress range, and geometry factor are adjustable
Up Next
Wave 72 brings a full 4D Kalman filter with covariance ellipse visualisation, manual backpropagation through an MLP with gradient flow animation, a 3D pendulum using Lagrange multiplier constraints, a coupled ODE eutrophication model with hysteresis loop, FDTD acoustic wave simulation with four lens types, and Keplerian planetary rings with Cassini-division resonance gap formation.