ToolSphere

Drawing to Equations

Desmos art

Draw on a graph or upload a picture and get the parametric equations that draw it, ready to paste into Desmos as graph art. Free.

Drawing to equations

Draw on the graph, or turn a picture into equations, and paste them into Desmos as graph art.

Draw here

40 equations

Detail
Smooth makes fewer equations; Detailed follows your hand more closely.
A photo, logo or sketch. It stays on your device.

Equations to paste into Desmos

  1. Copy all equations.
  2. Open the Desmos graphing calculator and click into the first empty line.
  3. Paste. Each line becomes its own curve, and together they redraw your picture.

Each line is a parametric curve (x(t), y(t)) for t from 0 to 1, Desmos's default range. Desmos is a trademark of its owner; this page just writes equations it can read.

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use Drawing to Equations

  1. 1Draw on the graph with your mouse or finger, or press Turn a picture into equations and choose a photo, logo or sketch.
  2. 2For a picture, pick Photo / logo (traces outlines) or Line art (follows pen lines), and Less, Medium or More picture detail.
  3. 3Choose Smooth, Balanced or Detailed. Smooth makes fewer equations; Detailed follows your hand more closely.
  4. 4Press Copy all equations.
  5. 5Open the Desmos graphing calculator, click into the first empty line and paste. Each line becomes its own curve, and together they redraw your picture.

About Drawing to Equations

Graph art without hand-tuning every curve

Graph art is drawing a picture out of equations: a face made of circles and parabolas, a character traced curve by curve in a graphing calculator. Doing it by hand means guessing an equation, nudging its numbers until it lines up, and repeating that dozens of times. This tool does the fitting for you. You draw, it writes the equations, and the picture you see on the grid is plotted from those exact equations, so what you paste is what you get.

How a drawing becomes equations

Each stroke is first simplified, keeping only the points that matter to its shape (the Ramer–Douglas–Peucker algorithm). A smooth curve is then threaded through those points as a chain of cubic Bézier curves, the same curves vector drawing programs use. Each piece is written as a parametric equation: a pair of cubic polynomials, one for x and one for y, as t runs from 0 to 1. For example (1.5t^{3}-2t^{2}+3t-4, -t^{3}+0.5t+2) traces one short arc.

Turning a picture into equations

Upload a photo, logo or sketch and the tool traces its lines for you. Photo / logo mode finds outlines with Canny edge detection, the standard method for finding where light meets dark. Line art mode is for drawings and handwriting: it picks out the dark ink and thins every pen line to a single stroke, so a line becomes one curve instead of two outlines. The traced lines then go through the same smoothing as a drawing, and the longest lines are kept first so the equation count stays manageable for Desmos. The picture never leaves your device, and a faint copy sits under the curves so you can compare.

Simple, high-contrast pictures work best: a cartoon, an emoji, a logo or a bold sketch. A busy photo makes many short lines; use Less picture detail and Smooth to tame it.

Why parametric equations

An ordinary function y = f(x) can't draw a circle, a loop or a stroke that doubles back, because it can only have one y for each x. A parametric curve (x(t), y(t)) can go anywhere, which is why graph artists use them for anything more complicated than a smile. Desmos plots a parametric pair over 0 ≤ t ≤ 1 by default, so the equations work as soon as you paste them, with no sliders or domain restrictions to set up.

Smooth, Balanced or Detailed

The detail setting controls how closely the curves follow your hand. Smooth drops more points, giving fewer equations and cleaner lines, which is usually what you want for graph art. Detailed keeps the wobbles of a hand-drawn line. Fewer, longer strokes always make fewer equations than many short ones.

For students and creators

It is a quick way to see that any drawing can be described exactly by maths, which makes it a good classroom demonstration of parametric curves and splines. It is also how a lot of graph art you see online gets made: sketch the outline, then style it in the graphing calculator.

Guides and tutorials

Frequently asked questions

How do I paste the equations into Desmos?

Press Copy all equations, open the Desmos graphing calculator, click into the first empty expression line and paste. Each line becomes a separate parametric curve, and together they draw your picture.

Why are the equations parametric instead of y = something?

A function y = f(x) can only have one y for each x, so it can't draw loops, circles or strokes that double back. A parametric curve (x(t), y(t)) can trace any path, which is what a drawing needs.

Why does my drawing use so many equations?

Each smooth piece between kept points is one equation. Switch the detail to Smooth, or draw with fewer, longer strokes, to cut the count down. Desmos handles a few hundred curves comfortably.

Will the pasted graph look exactly like the preview?

Yes. The preview is plotted from the same rounded equations you copy, not from your raw strokes, so it shows exactly what the equations draw.

Can I turn a photo or picture into Desmos equations?

Yes. Press Turn a picture into equations and choose an image. Photo / logo traces the outlines; Line art follows dark pen lines as single strokes. The picture is processed in your browser and never uploaded. Simple, high-contrast images like cartoons, logos and sketches give the cleanest results.

Why does my traced photo have so many tiny lines?

Every edge in a busy photo becomes a line. Choose Less picture detail and the Smooth setting, crop to the subject, or use a picture with a plain background. The tool also keeps the longest lines first and leaves out the shortest once the equation count gets high.

What kind of curves does it use?

Cubic Bézier curves through the simplified points of each stroke (a Catmull–Rom spline), with each one written out as a pair of cubic polynomials in t.

Have a suggestion for Drawing to Equations?Share your feedback ↗