Kinetograph animates decad solids into video frames https://lestrrat-3d.github.io
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] 075eb9a4f2
Bump the github-actions group across 1 directory with 4 updates (#22)
Bumps the github-actions group with 4 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go), [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/autobuild](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `actions/setup-go` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](b7ad1dad31...d8cbb8045d)

Updates `github/codeql-action/init` from 4.39.3 to 4.39.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](33d7b85da1...915412ff23)

Updates `github/codeql-action/autobuild` from 4.39.3 to 4.39.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](33d7b85da1...915412ff23)

Updates `github/codeql-action/analyze` from 4.39.3 to 4.39.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](33d7b85da1...915412ff23)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.39.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-30 18:35:28 +09:00
.github Bump the github-actions group across 1 directory with 4 updates (#22) 2026-11-30 18:35:28 +09:00
_clips/demo bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
_gallery bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
docs bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
examples bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
internal bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
render bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
.gitattributes initialize repository with license 2026-10-03 19:37:56 +09:00
.gitignore restyle the README after decad's with GIF gallery (#11) 2026-10-04 06:06:48 +09:00
.golangci.yml bump decad and sketch, use decad free functions (#17) 2026-10-26 06:53:08 +09:00
AGENTS.md add kinetograph design and agent guide 2026-10-03 19:53:05 +09:00
camera.go add channels, rig, scene and clip 2026-10-03 20:03:05 +09:00
camera_test.go add channels, rig, scene and clip 2026-10-03 20:03:05 +09:00
channel.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
channel_test.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
CLAUDE.md bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
clip.go add pass 2 reshape: parametric parts (#5) 2026-10-03 21:28:03 +09:00
clip_test.go add channels, rig, scene and clip 2026-10-03 20:03:05 +09:00
doc.go add schedule tracks for looped linkages (#14) 2026-10-07 15:49:22 +09:00
errors.go add schedule tracks for looped linkages (#14) 2026-10-07 15:49:22 +09:00
go.mod bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
go.sum bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
LICENSE initialize repository with license 2026-10-03 19:37:56 +09:00
light.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
light_test.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
linkage.go add schedule tracks for looped linkages (#14) 2026-10-07 15:49:22 +09:00
linkage_test.go bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
README.md add schedule tracks for looped linkages (#14) 2026-10-07 15:49:22 +09:00
reshape.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
reshape_test.go bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
rig.go add driven nodes for caller-supplied poses (#12) 2026-10-05 22:22:15 +09:00
rig_test.go add driven nodes for caller-supplied poses (#12) 2026-10-05 22:22:15 +09:00
scene.go add pass 3 node lights and part fade (#7) 2026-10-03 21:51:02 +09:00
scene_test.go bump decad and sketch to main; add local test kit (#23) 2026-11-30 18:12:42 +09:00
SECURITY.md add CI, lint, security and README scaffolding 2026-10-03 20:03:05 +09:00

kinetograph

Two gold pins drop into a drilled violet plate, and a blue ring rises off it, turns a full turn and settles back, and the pins lift out again, while the camera circles the parts

An animation layer for Go: it moves decad bodies, a camera and lights on a joint rig over time, and renders every frame to a numbered PNG with solidlens. It writes no video; ffmpeg or another video tool assembles the PNGs.

Work in progress. The API and supported capabilities may change.

Why this exists

The first clip kinetograph produces is a landing-page video for decad: decad parts turning, sliding apart and assembling, seen from a moving camera. Its program is the clip subcommand of the _gallery module in decad: cd _gallery && go run . clip > assemble.sh && sh assemble.sh in a decad checkout renders it.

It also changes a body's shape over time. A parametric part rebuilds its decad body from parameters that change with the frame, so a block can grow wider across a clip.

kinetograph is not a renderer, a video encoder, a physics engine or a CAD kernel. Rendering is solidlens's, geometry is decad's, coordinate math is r3's and quantities are units's.

What it does

Every motion below is a Channel: units.Value keyframes of one kind (an angle, a length, an opacity) with easing between them. kinetograph renders each clip to PNG frames, and ffmpeg encodes them to a GIF.

A gold lid opens on its violet box about the box's top back edge and closes again
Revolute joints turn a node about an axis through a centre point by an angle channel.
A gold carriage slides along a violet rail and back
Prismatic joints slide a node along a direction by a length channel.
A drilled plate with two pins and a ring stays still while the camera circles it once
Camera on the rig attaches the camera to a node, so an orbit is a revolute joint about an axis through the camera's target.
A light turns about the vertical axis and lights each side of the plate, pins and ring in turn
Node lights attach to rig nodes like the camera, and render.Style gives each one a colour and an intensity channel.
A coral housing fades until a blue ring inside it shows, then fades back in
Fade is a part's opacity channel; render mixes a fading part over whatever is behind it.
A gold slab grows wider and taller, then shrinks back
Reshape rebuilds a parametric part's decad body from channel values, once per distinct set of values.

Regenerate every image on this page with cd _gallery && go run . > assemble.sh && sh assemble.sh.

Usage

examples/kinetograph_sequence_example_test.go renders a decad block turning on one revolute joint while the camera orbits on another. examples/kinetograph_reshape_example_test.go renders a slab whose width follows a channel. examples/kinetograph_appearance_example_test.go fades a block in while a point light circles it. examples/kinetograph_driven_example_test.go poses a block from a caller's TransformTrack. examples/kinetograph_linkage_example_test.go films a two-link decad Linkage along its Drive with Scene.AddLinkage, each link posed by decad's Linkage.PoseAt. examples/kinetograph_schedule_example_test.go films a crank-rocker, a linkage with a closed loop, with Scene.AddSchedule through one decad Schedule. go test ./examples/ runs all six and checks their output.

_clips/demo/ renders a 4.5 s demo clip: two pins drop into a drilled plate, and a ring rises off it and turns half a turn while the camera orbits. cd _clips/demo && go run . -out out writes 108 frames at 960x720 into out/.

Assemble the frames into a video with ffmpeg:

ffmpeg -framerate 24 -i frame_%06d.png -c:v libx264 -pix_fmt yuv420p clip.mp4

The yuv420p pixel format needs an even image width and height. kinetograph does not check this, because it is a property of that codec.

A failing frame stops the sequence with a *render.FrameError that names the frame index and time. The same inputs give byte-identical PNGs on one Go toolchain and architecture; the rules are in docs/design.md section 7.

Layering

kinetograph/render   frames to solidlens scenes and PNG files   (imports solidlens)
  |
kinetograph          channels, rig, camera, lights, scene, clip  (this module)
  |
decad                3D bodies and Body.Tessellate               github.com/lestrrat-3d/decad
  |
r3                   vectors, rigid transforms                   github.com/lestrrat-3d/r3
  |
units                typed quantities (Value, Kind)              github.com/lestrrat-3d/units

The arrows point down and never back up. The root package imports decad, r3 and units; render is the only package that imports solidlens. None of them imports kinetograph.

sketch builds the bodies in the tests, the examples and the _clips and _gallery programs. No library package imports it.

Design

docs/design.md is the contract: the decisions, the public API, the error behaviour, the determinism rules and the plan for later passes.

License

This project is source-available, and is licensed under the PolyForm Noncommercial License 1.0.0.

  • Noncommercial use is free. Individuals, hobby and personal projects, research, education, nonprofits, and government may use, modify, and redistribute it at no cost, subject to the license terms.
  • Commercial / business use requires a separate license. Any use by or for a business, or for commercial advantage, is not permitted under the noncommercial license. To obtain a commercial license, reach out on Bluesky at @lestrrat.bsky.social.

Contributions

This repository does not accept external pull requests.