Skip to content

Faraday Wave

A pool of liquid shaken into standing patterns that flow between squares, hexagons and stars as the surface heaves. Loops perfectly.

Background, V1 Effects3DSeamless loop, verified255 lines of codev1.0.1

In Science & maths, Space & cosmos, Liquids, Patterns & illusions

Next: Torus Wave LoopSurprise me

Faraday Wave preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source at reduced resolution.

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

5
4
0.55
1

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

A shallow pool of liquid shaken from below, the way Michael Faraday did it: above a certain shaking the surface breaks into a standing pattern that pulses with the shaking, as squares, hexagons or ten-pointed stars. Here the three patterns flow into one another around the loop while the surface heaves up and down, lit like a pool of mercury, ink, honey or lagoon water. Choose the liquid, the number of cells across the picture, how many heaves per loop, how steep the surface looks and the brightness of its reflections.

Reuse it in your own idea

  • Science backdrop: Mercury, five cells.
  • Dark ambient: Ink, fine pattern.
  • Warm ambient: Honey, slow heave.

Which part is reusable

src/faraday-wave.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • The surface is a closed-form sum of waves, not a fluid simulation; the patterns are idealised.
  • Reflections use a fixed light and sky rather than real environment mapping.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/faraday-wave.js
Exports
  • createFaradayWave({ liquid?, cells?, cycles?, heave?, gain? }) => { scene, camera, setSize(width, height), update(time, loopSeconds), dispose() }
  • createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }
  • LIQUIDS: { mercury, ink, honey, lagoon }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer and a full-screen shader material.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: Screen-centred, ±1 vertically; waves are plane waves of wavelength 2 / cells at fixed angles.

Lighting: A fixed light from the upper left lights the slope of the liquid, with a sky reflection by slope and a Fresnel rim.

Timing: update(time, loopSeconds) sets the loop phase; frames render in any order.

Output
1080×1080, 30 fps, 12 s · procedural (computed from the frame number) · seamless loop — The three patterns are crossfaded with weights of whole cycles of the loop, the pool heaves a whole number of times per loop and the pattern's small rotation is a sine of the loop, so the last frame meets the first.
Tested
Rendered 360 frames on 2026-10-08 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
One full-screen fragment shader of about ten cosines per pixel, plus the bloom: under 2 ms a frame at 1080² on an integrated Intel GPU. Software WebGL renders in about two seconds a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- faraday-wave/1.0.1 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.1 · sha256:76f968a5e4723b36… · other versions: 1.0.0
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Adapted from the owner's threejs-sketches/physics-forces/faraday-wave (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original shader: hexagon, square and ten-fold standing-wave patterns crossfaded on an exact loop and lit as a liquid surface.
BinMore like this

Lava Lamp

3D object3DSeamless loop15 seconds

Cube Wave

3D object3DSeamless loop12 seconds