Wave 25: Linear Algebra, Topology & Machine Learning

Wave 25 ships five new interactive simulations spanning linear algebra, electrochemistry, machine learning, special relativity, and algebraic topology — plus complete Ukrainian translations for all seven Wave 25 simulations. This update brings the platform to 352 total simulations.

Platform Stats

352Simulations
75Categories
134Blog posts
25Waves
45Devlogs

Wave 25 Simulations at a Glance

This wave consolidates five mathematically dense simulations that were ready in the repository but not yet integrated into the platform registry or translated. All five are now fully bilingual (EN + UK), registered in the simulation index, and referenced in the sitemap.

New Simulation: Eigenvectors & Eigenvalues

🧮 Eigenvectors & Eigenvalues Visualiser

An interactive Canvas 2D visualiser for 2×2 real matrices. The simulation draws the unit circle, its image under the linear map T(x) = Ax, and the two real eigenvectors as overlaid arrows. A draggable point on the unit circle shows how any arbitrary vector is transformed, making the “stretching along eigenvectors” intuition immediately visible.

Physics & maths

Av = λv   (eigenvalue equation)
det(A − λI) = 0   (characteristic polynomial)
For 2×2: λ² − tr(A)λ + det(A) = 0
Spec(A) = {λ⊂1;, λ⊂2;}; trace = λ⊂1; + λ⊂2;, det = λ⊂1;λ⊂2;

Sliders control entries a, b, c, d of the 2×2 matrix. The eigenvalues are computed analytically from the quadratic formula; when the discriminant is negative the display shows “complex / no real eigenvectors” and highlights the rotation component. The info panel shows determinant, trace, and a geometric interpretation (rotation-stretch decomposition).

Canvas 2D Linear Algebra Eigenvalues Matrix Transform

New Simulation: Nernst Equation

⚡ Nernst Equation — Galvanic Cell Potential

An animated electrochemical cell visualiser. Choose from six common electrode pairs (Zn/Cu Daniell, Fe/Cu, Ag/Zn, Ni/Cu, Pb/Cu, H2/Cu SHE), then adjust temperature and ion concentrations (“red” + “blue” solutions in the two half-cells) to watch the cell potential shift away from its standard value E° according to the Nernst equation.

Physics & maths

E = E° − (RT / nF) ln Q
Q = [oxidised]n / [reduced]n
At 298 K: E = E° − (0.05916/n) log Q
ΔG = −nFE = −RT ln K

The canvas shows an animated Daniell-cell schematic: the anode compartment on the left (labelled oxidation), cathode on the right (reduction), a salt bridge connecting them, electron current through an external wire, and colour-coded cation and anion particles that drift in the correct directions as the cell discharges. The live readout shows E (V), ΔG (kJ/mol), and Q.

Canvas 2D Electrochemistry Gibbs Energy Nernst Equation

New Simulation: PCA & SVD Visualiser

📊 PCA & SVD Visualiser

An interactive scatter-plot tool for exploring Principal Component Analysis. Click to place 2D data points on the canvas or generate one of several built-in datasets (linear, circular, blob, banana). The tool computes the empirical covariance matrix, solves for eigenvectors via a 2×2 closed-form, and draws the principal components as arrows scaled by their eigenvalues. A second tab shows the 2×2 covariance matrix as a colour-coded heatmap.

Physics & maths

X̃ = X − μ (mean-center)
C = X̃²⁄⊂T / (n−1) (covariance matrix)
C = VΛV⊃T (eigendecomposition)
PCA ≡ truncated SVD: X = UΣV⊃T
Explained variance: λ⊂k; / Σ⊂i; λ⊂i;

The visualiser displays eigenvectors as arrows, the explained-variance bar (percentage captured by PC1 and PC2), a projection of points onto PC1, and optionally a density ellipse (1σ and 2σ). The covariance tab shows the numeric matrix alongside a deterministic colour scale: positive entries blue, negative red.

Canvas 2D PCA SVD Machine Learning Covariance

New Simulation: Relative Simultaneity

⏱️ Relative Simultaneity — Einstein’s Train Thought Experiment

A dual-frame animation of Einstein’s 1905 train-and-lightning thought experiment. Two canvases run in parallel: the top canvas shows the platform frame S where both lightning bolts strike simultaneously; the bottom canvas shows the train frame S′ where the front bolt fires first. Adjust β = v/c from 0.10 to 0.95; the Lorentz-transformed flash times update in real time.

Physics & maths

t′ = γ(t − vx/c²),   x′ = γ(x − vt)
γ = 1/√(1−β²)   (Lorentz factor)
Δt′ = −γvΔx/c² ≠ 0 for spacelike Δx
L′ = L/γ   (Lorentz contraction)

The light pulses expand at c = 1 in both frames; expanding spheres are drawn as dashed vertical segments centred on the flash origin. The panel shows γ, length-contracted train size L′/L, simultaneity gap Δt′, and the transformed flash times t′rear and t′front. Four preset β buttons cover slow, half-c, fast, and near-c regimes.

Canvas 2D Special Relativity Lorentz Transform Simultaneity

New Simulation: Torus & Genus Explorer

📐 Torus & Genus Explorer

A Three.js r160 interactive 3D topology explorer. Select genus g = 0 (sphere), 1 (torus), 2 (double torus), or 3 (triple torus) to see the surface rendered with optional solid, wireframe, and normal-map modes. Drag to orbit; scroll to zoom. The panel updates the Euler characteristic χ = 2 − 2g, fundamental polygon word, handle count, and π1 for each surface.

Physics & maths

χ = V − E + F = 2 − 2g (Euler characteristic)
∫∫_M K dA = 2πχ (Gauss-Bonnet theorem)
π1(S²) = 1,   π1(T²) = ℤ × ℤ
Surface group: ⟨a1,b1,...,ag,bg | [a1,b1]···[ag,bg] = 1⟩

Double and triple tori are rendered as two or three offset TorusGeometry meshes — a visual approximation of the true connected sum, sufficient to convey the handle count. The Gauss-Bonnet note updates per surface: sphere (K = 1/R², integral = 4π), torus (positive outer + negative inner cancel to 0), and higher genus g (integral −4(g−1)π).

Three.js r160 Topology Euler Characteristic Gauss-Bonnet Fundamental Group

Ukrainian Localisation — Wave 25

All five Wave 25 simulations, plus the two Wave 24 simulations (Gravitational Wave Chirp and Phase Equilibrium) that were missing Ukrainian pages, received full UK translations in this update. That brings the total to seven new bilingual simulations in this release cycle.

Each UK page follows the standard template: lang="uk", hreflang cross-links, ../../style.css relative path, Ukrainian navigation (Головна / Категорії / Блог / Про нас), category breadcrumb, difficulty badge in Ukrainian, and all simulation canvas labels, button text, and readouts translated. Simulation physics code is preserved verbatim (only user-visible strings are replaced).

Engineering Notes

Eigenvectors

Eigenvalues are solved analytically: λ = (tr ± √(tr² − 4det)) / 2. When the discriminant Δ < 0 the surface shows a “complex eigenvalues” notice and switches to a rotation-only display. Eigenvectors are normalised before drawing; the arrow length is proportional to |λ| clamped to two canvas units. The unit circle is sampled at 200 points; each point is transformed by A and drawn as the image ellipse in a contrasting colour.

Nernst Equation

Six standard-electrode pairs are pre-loaded with literature E° values. Q is computed as [ox]⊃n / [red]⊃n where n is the electron transfer count for that pair. The ion particle animation uses a simple leapfrog step: cations drift toward the negative electrode, anions in the opposite direction, at rates proportional to Q − 1 (the driving force). The salt bridge leaks a slow counter-ion current to keep charge balance visible.

PCA Visualiser

The covariance matrix C is computed online as new points are placed. Eigenvalues and eigenvectors are solved via the 2×2 closed form (no iteration needed). The PC1 projection line is drawn as a regression line through the centroid in the direction of the dominant eigenvector. The explained-variance bar is animated with a CSS transition on width change, giving smooth feedback as the dataset distribution shifts.

Relative Simultaneity

Simulation time is measured in natural units where c = 1 and the proper train length L = 1. The platform-frame flash events are locked at (t = 0, x = ±Lc/2) where Lc = L/γ is the Lorentz-contracted length. Flash events are Lorentz-transformed to S′ analytically; light cones expand as r(t) = c(t − tfire) in each frame. The animation speed slider scales d(tsim)/dt independently of the physics so slow-motion exploration of the near-c regime is possible.

Torus & Genus

The sphere (g = 0) uses THREE.SphereGeometry(1.5, 48, 32). The single torus (g = 1) uses TorusGeometry(1.1, 0.42, 32, 64). Double and triple tori are built from two or three offset tori with scaled radii, disposed and rebuilt each time the genus is changed to avoid GPU memory leaks. The MeshPhongMaterial is semi-transparent (opacity 0.75) when wireframe overlay is active, making internal topology visible. The OrbitControls damping factor of 0.07 gives a pleasing inertial feel.

What’s Next: Wave 26

Wave 26 targets plasma physics, quantum computing, and ecology. Planned simulations include:

Blog posts planned: Spotlight #46 on Plasma Physics & MHD; Learning #35 on Quantum Computing & Quantum Information Theory.