How to make shapes in Desmos
The easiest way to make a shape in Desmos is the polygon function. List the corners in order, and Desmos joins them and fills the shape in: polygon((0,0),(2,0),(2,2),(0,2)) makes a square.
polygon((0,0),(2,0),(2,2),(0,2))polygon((0,0),(4,0),(2,3))x^2/9 + y^2/4 = 1Step by step
- 1Type
polygon(on a new line. - 2List the corners as points, separated by commas, going around the shape in order.
- 3Close the bracket. Desmos joins the last point back to the first, and shades the inside.
Shapes to copy
| Shape | Type this |
|---|---|
| Square | polygon((0,0),(2,0),(2,2),(0,2)) |
| Rectangle | polygon((0,0),(4,0),(4,2),(0,2)) |
| Triangle | polygon((0,0),(4,0),(2,3)) |
| Oval (ellipse) | x^2/9 + y^2/4 = 1 |
| Circle | x^2 + y^2 = 4 |
| Square, as an equation | max(abs(x), abs(y)) = 1 |
| Diamond | abs(x) + abs(y) = 1 |
Regular polygons
For a regular polygon with n sides, build its corners using a list: polygon([(cos(2pi k/n), sin(2pi k/n)) for k = [1...n]]). Define n with a slider, and the shape changes as you drag it.
Removing the fill
Click and hold the coloured icon next to the polygon, and set the fill opacity to 0. That leaves only the outline.
Frequently asked questions
How do I make a square in Desmos?
How do I make a triangle in Desmos?
How do I make an oval in Desmos?
Why does my polygon look twisted?
Keep going
Circles in detail.
Circles, ellipses, parabolas and hyperbolas.
Build pictures from shapes.
Three heart equations to copy, including a filled one.
Type a new letter and click “add slider”, then press play.
Type y = mx + b, then add a restriction for a segment.
The same equations work here, with algebra, steps and exports built in. It is free, with no account.