Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
ThatPainter
Actions

Making a Drawing Application on the Desmos Graphing Calculator

Learn how to make a Desmos point-sampling sketcher with a draggable cursor, coordinate lists, clickable capture controls, and polygon rendering. The guide also covers separate strokes, reset controls, tracing images, and the limits of this approach.

By ThatPainter Team 8 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ThatPainter is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn More

Yes—you can turn the Desmos Graphing Calculator into a small interactive sketching tool. Drag a movable point, click to capture its coordinates, and let Desmos render the captured points as a polygon or connected line. It is a point-sampling sketcher, not a continuous brush-based paint program.

The project is a lesson in coordinate geometry, lists, state, and interactive actions. The original project was published by HackerNoon on October 27, 2024, and demonstrated by tracing Bowser from Super Mario Bros. (original tutorial).

How the Desmos drawing tool works

Movable point → sampled coordinates → lists → polygon or connected line

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Texas Instruments TI-84 Plus CE Color Graphing Calculator, Black
  • Makes understanding math and science topics quicker and easier — ideal for middle school through college
  • Built-in MathPrint feature allows you to input and view math symbols, formulas and stacked fractions exactly as they appear in textbooks
  • Graph in vibrant colors to make faster, stronger connections. Powered by a TI Rechargeable Battery that can last up to one month on a single charge.
  • 4-year subscription for the TI-84 Plus CE online calculator included with purchase
  • Lightweight yet durable enough to withstand the demands of the classroom year after year

A point such as (a,b) acts as the cursor. Dragging it changes its current coordinates. A clickable Capture control copies those coordinates into two lists. Desmos then uses the lists as vertices for a polygon or as points in a connected path.

Dragging alone does not leave a trail. This is a click-to-sample interface, so the number and placement of captured points determine how smooth or angular the result looks.

What you need

  • The Desmos Graphing Calculator.
  • A signed-in Desmos account if you want to use Actions.
  • Basic familiarity with coordinate pairs and lists.
  • An optional image that you own or are permitted to trace.

Actions are enabled at the account level. In the current Desmos interface, sign in, open Account Settings, choose Advanced, and enable Actions. The official documentation does not indicate that a paid subscription is needed. See Desmos Actions documentation for availability and interface details.

Build a minimal one-stroke sketcher

1. Organize the graph

Create folders for Controls, Cursor, Current stroke, Completed strokes, and, if needed, Stencil image. Folders make the expression list easier to understand and let you duplicate a clean template. See Desmos’s Add an Item guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set a sensible graph window before drawing. A fixed canvas range helps keep the cursor and controls in the intended workspace.

2. Create a draggable cursor

Add a point with two variables: P=(a,b). Open the point’s options and enable dragging. Give it a large size, a high-contrast color, and a label such as cursor. Desmos explains movable points in Sliders and Movable Points.

The variables a and b represent only the cursor’s current position. They are not the drawing history.

Rank #2
Sale
Texas Instruments TI-Nspire CX II CAS Color Graphing Calculator with Student Software (PC/Mac)
  • Color Screen. The screen size is 320 x 240 pixels (3.5 inches diagonal) and the screen resolution is 125 DPI; 16-bit color
  • Rechargeable battery included. Can last up to two weeks on a single charge
  • Handheld-Software Bundle. Includes the TI-Inspire CX Student Software delivering enhanced graphing capabilities and other functionality.
  • Thin Design and lightweight with easy touchpad navigation.Quick alpha keys
  • Six different graph styles and 15 colors to select from for differentiating the look of each graph drawn

3. Store captured coordinates

Create two empty lists: currentX=[ ] and currentY=[ ]. When the cursor is at (a,b), append its coordinates with Actions: currentX → join(currentX,[a]) and currentY → join(currentY,[b]).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The square brackets around a and b matter. join() combines lists, so [a] is a one-element list while a is a scalar. See Desmos’s Lists and Supported Functions references.

4. Add a Capture control

Create a separate point, curve, or other graph object outside the canvas and label it Capture. In its options, add these update rules to the On Click field: currentX → join(currentX,[a]) and currentY → join(currentY,[b]).

Move the cursor, click Capture, and repeat. Each click adds one vertex to the current stroke. Keep the control visually distinct from the cursor.

5. Render the stroke as a polygon

Add polygon(currentX,currentY). Desmos interprets the paired list entries as polygon vertices and closes the shape. Use the style menu to choose fill, outline width, and opacity. A transparent or lightly transparent fill with a thin outline can be easier to read while experimenting. See Desmos’s polygon documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture a few points around a simple shape and watch the polygon update. This gives you a working one-stroke coordinate sampler.

Why multiple strokes are harder

If every point is appended to the same currentX and currentY lists, the next stroke becomes part of the same polygon. Desmos connects the entire sequence and closes it, often producing a tangled shape.

Rank #3
Sale
Casio fx-9750GIII Graphing Calculator, Python Programming, Black
  • USER-FRIENDLY DISPLAY – Natural Textbook Display℠ shows expressions and results exactly as they appear in textbooks, simplifying writing and interpreting complex math.
  • STUDENT FRIENDLY - Combines ease of use with advanced functionality—ideal for courses from Pre-Algebra to AP Statistics. Supports graph plotting, vectors, probability distributions, spreadsheets, eActivities, integrals, and more for a full range of math and science applications.
  • PYTHON INTEGRATION – Program with MicroPython directly on the calculator, or connect to a PC to transfer, store, or share your programs.
  • EXAM-APPROVED – Approved for use in AP, SAT, ACT, IB, and other standardized exams, making it a reliable choice for students.
  • USB CONNECTIVITY: Easily store and transfer files to and from a computer using the included USB cable.

The application therefore needs two kinds of state:

  • Current stroke: the x- and y-lists that receive new captures.
  • Completed strokes: earlier data that remains visible but no longer changes.

Conceptually, a New Shape action saves currentX and currentY, then sets both working lists to [ ]. The original tutorial describes a completed-strokes collection represented conceptually by shapes → join(shapes,[currentX,currentY]).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Nested-list storage is the fragile part of this project. Desmos expression syntax and list behavior make an unrestricted collection of separately rendered polygons difficult to maintain as a clean, text-only recipe. For a dependable classroom or personal template, use a fixed number of stroke slots: reserve separate x/y lists and a polygon expression for each planned stroke, then have New Shape copy the current data into the next slot and clear the working lists. A stroke counter can select the next slot. This is less elegant than unlimited nested storage, but easier to inspect, reset, and repair.

Do not claim unlimited shapes. Expression count, nested state, accumulated points, and graph responsiveness impose practical limits.

Add New Shape and Reset

Make a clickable control labeled New. In a fixed-slot design, its action sequence is:

  1. Copy currentX and currentY into the next completed-stroke variables.
  2. Advance the stroke counter.
  3. Set currentX and currentY to empty lists.

Make a second clickable control labeled Reset. It should clear the current lists, reset the stroke counter, and clear every completed-stroke slot used by the graph. Clearing only currentX and currentY will leave older polygons visible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A dedicated reset is safer than relying on Undo, which may reverse unrelated expression edits, styling changes, or setup work.

Rank #4
Sale
TI-84 Evo Graphing Calculator Texas Instruments, White
  • Newest in the TI-84 series: Built for everyday classroom use
  • Icon-based home screen: Popular math tools are front and center for faster, more intuitive navigation
  • 3x faster performance: A powerful processor delivers quicker calculations and smoother graphing
  • Bigger, clearer graphs: 50% more graphing space makes it easier to see patterns and relationships
  • Simplified keypad design: Larger buttons and reduced clutter help you work faster with fewer steps

Using an image as a tracing stencil

Choose Add Item → Image, upload an image, lower its opacity, and place it behind the plotted objects. Drag its center to reposition it and use its outer handles to resize it; image options also control layering and opacity. See Desmos’s Add an Item guide.

The image is only a visual reference. Desmos does not automatically convert it into coordinates, vector paths, or expressions. Use images you created, have licensed, or are otherwise permitted to use. Permission to view an image does not automatically grant permission to redistribute a traced result.

Use connected points for open strokes

A polygon is closed by definition. If you want a line-like mark rather than a filled closed contour, use connected points or a table with lines enabled. Desmos documents this approach in Graphing and Connecting Coordinate Points.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rendering method Best for Limitation
Polygon Filled geometric shapes or closed contours Closes the path between the last and first points
Connected points Open outlines and line-like marks Still uses sampled points, not continuous brush input

Common visual problems

Unwanted diagonal edge

Because polygon() closes the path, it adds a segment from the final point back to the first. End close to the starting point, split the mark into smaller shapes, use an outline, or switch to connected points.

Strange or unexpected fills

A self-intersecting polygon can produce a fill that does not resemble a brush stroke. Capture simpler contours, draw shorter shapes, lower fill opacity, or use outline-only styling.

Angular results

The tool records only the positions you explicitly capture. More samples improve fidelity but increase list size and editing complexity. Fast dragging does not create additional points automatically.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Useful improvements

  • Make Capture, New, and Reset controls large and high contrast.
  • Place controls outside the drawing area.
  • Use a consistent canvas range and a visible grid while learning.
  • Keep fill opacity low so overlapping shapes remain legible.
  • Duplicate a clean template before making structural changes.
  • Reserve separate folders for controls, state, and visible artwork.
  • Use separate colors or polygon styles for different stroke types.
  • Keep demonstrations modest in size so the graph remains responsive.

Actions can also drive repeated updates with a ticker, which opens possibilities such as animated playback of saved points. Tickers do not turn this design into continuous pointer input. See the Actions reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Texas Instruments TI-84 Plus Graphics Calculator, Black 320 x 240 pixels (2.8" diagonal)
  • Preloaded with software, including Cabri Jr. interactive geometry software.
  • Up to ten graphing functions defined, saved, graphed and analyzed at one time.
  • Advanced functions accessed through pull-down display menus.
  • Horizontal and vertical split screen options. Vibrant backlit color screen
  • I/o port for communication with other TI products.Seven different graph styles for differentiating the look of each graph drawn. Fourteen interactive zoom features

Troubleshooting

Problem Likely cause Recovery
The cursor will not move Dragging is disabled. Open the point options and enable dragging.
The action arrow or On Click field is missing You are signed out or Actions are disabled. Sign in, enable Actions under Account Settings → Advanced, and reload if necessary.
join() behaves unexpectedly A scalar was supplied. Append [a] and [b], not a and b.
New drawings merge with old ones The working lists were not saved and cleared. Preserve the current stroke before resetting the working lists.
The polygon has a diagonal closing edge Polygons are closed. Close the contour, use an outline, or use connected points.
The fill looks wrong The polygon crosses itself. Use simpler contours, shorter shapes, or outline-only styling.
An image hides the drawing The image is layered in front. Change its layering in the image options.
Reset clears only the latest line Completed strokes use separate state. Reset every slot or state variable, not only the current lists.
The graph becomes difficult to edit Too many expressions or samples have accumulated. Duplicate a clean template and keep the working drawing small.

What this project is—and is not

This is best understood as a point-sampling polygon sketcher. It is useful for exploring coordinate pairs, geometric representation, lists, mutable state, event-driven updates, interactive math-art projects, and tracing simple shapes in a self-contained graph.

It is a poor replacement for a conventional drawing application if you need continuous brush input, layers, erasers, pressure sensitivity, anti-aliasing, open strokes, color palettes, text tools, selection and transformation, or reliable raster/vector export. A conventional canvas or digital-art application is substantially better for those tasks.

Desmos’s version is valuable because the drawing is exposed as mathematical data. Every captured point is visible in the model, and every action changes an inspectable list.

Frequently asked questions

Can Desmos draw continuously while I drag the cursor?

No. This method records coordinates when you click the Capture control. Dragging the point changes its current position but does not automatically create a trail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does my polygon add a line across the drawing?

Polygons are closed, so Desmos connects the last captured point back to the first. Use connected points for an open outline or break the drawing into smaller shapes.

How do I keep a new stroke from joining the previous one?

Store completed strokes separately from the current x- and y-lists. A fixed number of stroke slots is often easier to manage than unrestricted nested lists.

Do I need a paid Desmos account to use Actions?

The official Actions documentation describes Actions as an account setting and does not indicate that a paid subscription is required. Sign in and enable Actions under Account Settings → Advanced.

Can Desmos turn my tracing image into a drawing automatically?

No. An added image is a visual stencil only; you must capture points yourself to create the plotted shape.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Further project ideas

  • Use different polygon colors for different stroke types.
  • Simulate thicker marks with narrow, parallel polygons.
  • Add a fixed-slot undo system by preserving previous list states.
  • Animate point playback with a ticker.
  • Compare polygon closure with connected-point rendering.
  • Have students design the data model before building the controls.
  • Export a screenshot when the graph reaches a finished state.

Save or share the graph as a Desmos graph, but remember that its drawing exists as variables and lists inside that graph. It is not automatically an independent image file or a conventional drawing-project format.

Quick Recap

Bestseller No. 1
Texas Instruments TI-84 Plus CE Color Graphing Calculator, Black
Texas Instruments TI-84 Plus CE Color Graphing Calculator, Black
4-year subscription for the TI-84 Plus CE online calculator included with purchase; Lightweight yet durable enough to withstand the demands of the classroom year after year
$110.59
SaleBestseller No. 2
Texas Instruments TI-Nspire CX II CAS Color Graphing Calculator with Student Software (PC/Mac)
Texas Instruments TI-Nspire CX II CAS Color Graphing Calculator with Student Software (PC/Mac)
Rechargeable battery included. Can last up to two weeks on a single charge; Thin Design and lightweight with easy touchpad navigation.Quick alpha keys
$155.99
SaleBestseller No. 4
TI-84 Evo Graphing Calculator Texas Instruments, White
TI-84 Evo Graphing Calculator Texas Instruments, White
Newest in the TI-84 series: Built for everyday classroom use
$82.00
Bestseller No. 5
Texas Instruments TI-84 Plus Graphics Calculator, Black 320 x 240 pixels (2.8' diagonal)
Texas Instruments TI-84 Plus Graphics Calculator, Black 320 x 240 pixels (2.8" diagonal)
Preloaded with software, including Cabri Jr. interactive geometry software.; Up to ten graphing functions defined, saved, graphed and analyzed at one time.
$97.50

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

More from the Paint Desk

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.