Doodle Lab

Draw an experiment. Watch it run.

Sketch a ramp, a pendulum or two balls about to collide. Take a photo. Gemini reads the drawing, a real physics engine runs it, and your own pencil lines start to move.

Pencil on plain, lined or squared paper works. Write masses (2 kg), friction (μ = 0.3), spring constants (k = 50 N/m), speeds on arrows (4 m/s) and one length (1 m) to set the scale.

A sample drawing, read by Gemini and run by the engine.

Start from a sample drawing

    How it works

    1. Gemini reads the drawing

      The photo goes to Gemini 3 Flash with a strict JSON schema: every ball, box, surface, rope and spring, where it is, and the numbers written next to it. When the free daily quota runs out, a faster Gemini Flash-Lite model reads it instead, and the page says which one did. Gemini only describes; it never decides how anything moves.

    2. Code checks the reading

      Code snaps each circle, box and line onto the pencil marks in the photo, then fixes what is left: it moves a ball out of a floor it was placed inside, lines a block up with its ramp, drops links to things that are not there, and fills in missing values. Every change is listed, so you can see it.

    3. A physics engine runs it

      Planck.js, a port of the Box2D engine, runs the scene in SI units. Your own lines are lifted off the photo and moved to where the engine puts them. Compare it with the textbook formula, or with your own guess.

    Tested on 45 generated pencil drawings with known answers, including drawings that are not physics and hard ones that fail. See the test report and the failures.