Wave 51 at a Glance
Truchet Tiles
Seeded LCG random-tile mosaic with four tile types (diagonal arcs, straight diagonal, quarter-circle corners, cross), four colour themes, adjustable grid density, and PNG export.
Launch →Benford’s Law
Seven empirical datasets (population, rivers, stock prices, tax returns, earthquakes, street addresses, Fibonacci) with bar chart overlay, χ² conformity test, and fraud-alert indicator.
Launch →Pipe Flow Profiles
Hagen-Poiseuille parabolic velocity profile with animated streamline particles, Reynolds-number regime indicator (laminar / transitional / turbulent), and five fluid presets including blood and honey.
Launch →Truchet Tiles — Seeded Mosaics from Four Rotations
Sébastien Truchet described in 1704 how a single square tile bearing a diagonal line, when placed in four orientations, can tile the plane in an enormous variety of visually distinct patterns. The modern generalisation allows multiple tile types to coexist, each selected independently per cell.
The simulator uses a lightweight Linear Congruential Generator (LCG) seeded by a user-adjustable integer, ensuring every mosaic is perfectly reproducible:
xn+1 = (1664525 × xn + 1013904223) mod 232
Four tile designs are available: smooth diagonal arcs that form
connected curves across the grid; straight diagonals that produce
sharp zigzag lines; quarter-circle corners that tessellate into
flowing loops; and crosses that punctuate with four-way junctions. All
four can be active simultaneously within a single mosaic; each is
drawn with Canvas 2D arc and lineTo calls inside an
save()/rotate()/restore()
transformation block.
Colour Themes
Four themes ship with the simulator: Classic (cream arcs on off-black), Ocean (teal to coral gradient), Forest (muted greens), and Neon (high-saturation fluorescent on near-black). Each theme defines both a background fill and a stroke colour, so swapping the theme completely transforms the visual character of an identical seed—making it clear that aesthetic variation and procedural structure are orthogonal.
Benford’s Law — The First-Digit Anomaly
Benford’s Law states that in many naturally occurring numerical datasets the leading digit d (1–9) appears with probability:
P(d) = log10(1 + 1/d)
The result is counter-intuitive: digit 1 leads about 30.1% of the time while digit 9 leads only 4.6%. The law arises whenever a dataset spans several orders of magnitude and is scale-invariant— switching between currencies, units of length, or population scales leaves the distribution unchanged.
Fraud Detection via χ² Test
The χ² goodness-of-fit statistic compares the observed digit frequency Od against the Benford expected count Ed = N × P(d):
χ² = Σd=19 (Od − Ed)2 / Ed
With 8 degrees of freedom, the critical value at α = 0.05 is 15.51. Real datasets (city populations, river lengths, earthquake magnitudes, Fibonacci numbers) conform closely and produce small χ² values. The “Tampered Tax Returns” dataset is generated with a bias toward digits 5-7, and always exceeds the critical threshold—demonstrating why forensic accountants use Benford tests as a first-pass anomaly screen.
Pipe Flow — Hagen-Poiseuille Profile
Fully developed laminar flow through a circular pipe of radius R, driven by a pressure gradient dP/dx, produces the classic parabolic velocity profile derived independently by Hagen (1839) and Poiseuille (1840):
u(r) = (R2 − r2) / (4μ) × (−dP/dx)
where μ is dynamic viscosity and r is the radial distance from the centreline. Maximum velocity umax = R2/(4μ) × (−dP/dx) occurs on the axis, and the volumetric flow rate follows:
Q = πR4 / (8μ) × (−dP/dx)
This fourth-power dependence on radius is the key engineering insight: halving the pipe radius reduces flow by a factor of 16 for the same driving pressure. The simulator shows this directly with the radius slider.
Reynolds Number and Flow Regimes
The dimensionless Reynolds number characterises the balance between inertial and viscous forces:
Re = ρ uavg D / μ
where D = 2R is the diameter, ρ is fluid density, and uavg = umax/2. Below Re ≈ 2100 flow is laminar and the parabolic profile holds exactly. Between 2100 and 4000 the flow is transitional; above 4000 it is turbulent and the flat “turbulent core” profile replaces the parabola. The simulator renders the appropriate profile shape and colours the regime indicator accordingly.
Fluid Presets
Five fluid presets span a viscosity range of five orders of magnitude:
- Water at 20 °C — μ = 1.0 mPa·s, benchmark reference.
- Air at 20 °C — μ ≈ 0.018 mPa·s, very low viscosity, high Re for the same velocity.
- Blood at 37 °C — μ ≈ 3 mPa·s, non-Newtonian in reality but modelled as Newtonian here; Re varies widely in arteries vs. capillaries.
- Engine Oil (SAE 30) — μ ≈ 100 mPa·s, viscosity 100× water; always laminar under normal conditions.
- Honey — μ ≈ 10 000 mPa·s, extreme laminar flow; velocity scale requires very high pressure gradient to be visible.
Next Steps
Wave 52 will push further into algorithms and probability. Candidates include Hamming error-correcting codes (SECDED, syndrome decoding), regression to the mean (bivariate normal scatter and the Sports Illustrated Curse), and cyclic cellular automata (spiral wave emergence from N-state threshold rules). As always, suggestions via the contact page are welcome.