Skip to content

Perpetual Motion

The overbalanced wheel, the oldest perpetual motion machine: hinged weights swing out on the falling side and fold in on the rising side. Loops perfectly.

3D object, V2 Objects3DSeamless loop, verified92 lines of codev1.0.0

In Machines & clockwork, Craft & heritage

Next: HourglassSurprise me

Perpetual Motion 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

12
1

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

Info

What it is

The overbalanced wheel: the oldest design for a perpetual motion machine, drawn by Villard de Honnecourt in the 1200s and reinvented ever since. A wheel carries hinged arms, each ending in a heavy weight. On the way down the arms swing out so their weights hang far from the axle; on the way up they fold in close, so the wheel always seems heavier on the falling side and should turn for ever. (It does not: a machine like this cannot work, which is the whole fascination.) Choose the number of arms, the metal (brass, steel, copper or bronze), the wood of the stand, the whole turns per loop, the backdrop colour and whether the camera sways.

Reuse it in your own idea

  • History explainer: Brass, twelve arms.
  • Cool: Steel, many arms.
  • Warm: Copper, eight arms.

Which part is reusable

src/perpetual-motion.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses chrome-material only for the demo.

Good to know

  • It is a picture of an impossible machine: it moves by formula, not by its own weight.
  • The folded arms pass through the rim at some wheel angles.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/perpetual-motion.js
Exports
  • createOverbalancedWheel({ arms?, metal?, wood?, turns? }) => { group, setProgress(progress), dispose() }
  • METALS: { brass, steel, copper, bronze }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and shader materials.
  • chrome-material@1.1.0 (demo) — Studio environment light, backdrop and contact shadow.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: The axle is at y = 6 on the z axis; the wheel (rim radius 3.2) turns clockwise seen from +z; each arm is 1.7 long and swings out to a radius of about 5.

Lighting: A warm key light with a shadow map, a shadow-catching floor and the studio environment.

Timing: setProgress(progress) sets the wheel angle and every arm's fold from its position; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — The wheel turns a whole number of times per loop and each arm's fold is a function of where it is on the wheel, which repeats exactly, and the camera sway is a sine of the loop, so the last frame meets the first.
Tested
Rendered 480 frames on 2026-10-06 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
A few hundred small meshes and a shadow map: about a millisecond a frame on an integrated Intel GPU. Software WebGL renders in about a second a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- perpetual-motion/1.0.0 --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.0 · sha256:06a2d08206b82a81…
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/objects-scenes/perpetual-motion (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: an overbalanced wheel with hinged weighted arms folded by position on the wheel, turning by whole turns on a wooden stand, on an exact loop.
BinMore like this

Hourglass

3D object3DSeamless loop16 seconds

Music Box

3D object3DSeamless loop12 seconds

Astrolabe

3D object3DSeamless loop16 seconds

Gyroscope

3D object3DSeamless loop16 seconds