MThread Draw

It turns an ordinary photograph into touch strokes and draws it on an Android phone, over ADB, with nothing installed on the device. You watch the phone's screen while you place the drawing on it, and a drawing of five hundred points lands in about a second and a half.

Trace it yourself

These are the actual strokes the program sends to a phone, in the order it sends them. Drag along the grey lines and try to cover them. The clock starts when you do.

0%covered
0.0syour time
—MThread Draw

Drag on the drawing to start.

What it does

Everything below is in the released build, and every claim on this page was measured rather than estimated.

It shows you the phone

The screen, live, in its own shape, with the drawing lying over exactly where it will land. About three frames a second: the phone scales and compresses each one, so the cable carries 27 kB instead of a sixteen-megabyte framebuffer.

Put it where you want it

Drag it over the live view, wheel to resize, Shift and wheel to turn, and flip it either way. Held in fractions of the screen, so it survives the phone being turned and means the same thing on a different device.

Layers

Several pictures arranged against each other before anything is drawn, each with its own position and its own tracer settings. Hide one, reorder them, remove one.

An eraser

Drag across the strokes you do not want and they come out. Which ones count as under the cursor is decided after placement, because the cursor is over a picture of the phone rather than over a coordinate space.

Record and replay

Record what you do on the phone and play it back, on that phone or another one. The file holds each touch as a fraction of the screen, so replaying it elsewhere scales it to that screen rather than refusing.

Or draw with no picture at all

mthread shape heart, mthread shape star --points 7, mthread text "hello". Seven shapes from equations, and text in any font the machine has.

Why it is quick

Every touch on Android normally costs a process. Sending a thousand of them that way takes minutes, which is why anything continuous - a gesture, a line, a signature - is unusable through the obvious route.

RoutePer point1,500 points
adb shell input~110 ms2 min 45 s
raw /dev/inputmicrosecondsrefused by any recent Pixel
on-device injectormicrosecondsabout 4.5 s, and the pacing is ours

The last row is the one that matters: when the time between points belongs to us, a drawing can arrive instantly or it can arrive the way a hand would have made it, tremor and overshoot included.

Get it

WindowsAn installer, or a folder you unzip. Nothing else to install: Python, OpenCV and adb all travel inside it.
macOSA disk image, for Apple Silicon and Intel.
LinuxFrom source, three commands.
Releases Read the docs