proof-engine 0.2.3

Real-time graphics from math: glyphs and particles moved by ODEs, strange attractors and force fields, drawn with HDR bloom on OpenGL.
Documentation

Proof Engine is a real-time generative art and math visualization engine written in Rust on OpenGL. Points and glyphs are moved by differential equations (the Lorenz attractor and six other strange attractors), force fields and physics, then drawn through a half-float HDR pipeline with bloom and an ACES tonemap.

Download

System Download
Windows proof-lorenz.exe: double-click it. Or all 10 demos and the editor (.zip).
macOS (Apple silicon / Intel) demos for arm64 / demos for x64
Linux (x86_64) proof-engine-demos-linux-x64.tar.gz
Your own Rust program cargo add proof-engine

No Rust needed for the downloads, just a GPU with OpenGL 3.3 or newer. Unsigned files: on Windows click More info, then Run anyway; the macOS and Linux notes are in docs/INSTALL.md.

Math screensaver

Ten of the engine's strange attractors as a Windows screensaver, one after another, every point moved by its equations live. Download proof-screensaver.scr, put it somewhere it can stay, then right-click it and choose Install (or copy it into C:\Windows\System32 and pick proof-screensaver in Screen Saver Settings). Settings... there opens its own options. More, including uninstalling: docs/SCREENSAVER.md.

How it works

Every frame: your code moves the points with plain math, the engine turns each point into a glyph, the GPU adds up their light in an HDR buffer, and the composite turns that light into the picture. Here is the same real frame captured after each stage:

Examples

Each one is a real capture of cargo run --release --example <name> (or the matching proof-<name>.exe).

lorenz strange_attractors
40,000 points riding the Lorenz equations. Nobody drew the wings; the equations put the points there. Seven chaotic systems side by side, 1,500 points each. Colour is speed.
sky math_rain
A day passing. Every sky cell is a Rayleigh and Mie scattering integral, every frame. Falling math symbols; speeds from a sine, flicker from a logistic map.

All 21 demos and their controls: docs/DEMOS.md.

Use it in 3 steps

1. Make a project and add the engine.

cargo new lorenz-demo && cd lorenz-demo
cargo add proof-engine

2. Replace src/main.rs with this (also in the repo as examples/quickstart.rs):

use proof_engine::math::attractors::rk4_step;
use proof_engine::prelude::*;
use proof_engine::render::ui_layer::UiParticle;

fn main() {
    let mut engine = ProofEngine::new(EngineConfig::default());

    // 5,000 points in a line 2 units long, each 0.0004 from the next.
    let mut points: Vec<Vec3> = (0..5000)
        .map(|i| Vec3::new(1.0 + i as f32 * 4e-4, 1.0, 1.0))
        .collect();

    engine.run_ui(move |engine, dt| {
        // Advance every point along the Lorenz equations.
        for p in points.iter_mut() {
            *p = rk4_step(AttractorType::Lorenz, *p, dt);
        }
        // Draw them: x across, z up, centred in the window.
        let (w, h) = engine.render_size();
        let (cx, cy, s) = (w as f32 / 2.0, h as f32 / 2.0, h as f32 / 60.0);
        let color = Vec4::new(0.5, 1.2, 1.6, 1.0);
        let dots = points
            .iter()
            .map(|p| UiParticle::new(cx + p.x * s, cy - (p.z - 25.0) * s, 3.0, 3.0, '●', color))
            .collect();
        engine.ui.draw_particles(dots);
    });
}

3. Run it with cargo run --release. The points travel together as one streak for about ten seconds, then chaos pulls them apart into the Lorenz butterfly:

Linux needs the ALSA headers first (sudo apt install libasound2-dev pkg-config). Always build with --release.

Documentation

Doc What is in it
Install and run Every download, macOS/Linux notes, building from source, project status
Demos All 21 examples with pictures and controls, the sky and Lorenz write-ups
How it works The frame pipeline, engine.fx, lights, GPU density, sound, what each module holds
Capture frames PROOF_SHOT and PROOF_HIDDEN: record any program's frames without a window appearing
Proof Editor The scene editor, its download and keys
Screensaver Proof Saver: install, settings, live-art mode, building the .scr
docs.rs The full API
Changelog · Contributing Release history and how to send a change

chaos-rpg is a roguelike whose graphical frontend runs on Proof Engine; CHAOS_RPG_API_CONTRACT.md documents what it needs.

License

MIT, see LICENSE.

Hire the author

Need this kind of engineering on your product? I take on a small number of client builds: LLM features, iOS apps and performance work, fixed price. Services and pricing · Email · LinkedIn