ToolSphere
All Desmos art

Desmos Pumpkin: Jack-o'-Lantern Equations

Three overlapping ellipses make the ribbed pumpkin, four lines make the stem, and triangles and a zigzag make the face. Every piece is a parametric curve, so the whole drawing pastes in one go.

Jack-o'-lantern drawn from its Desmos equations
24 equations, t from 0 to 1

The picture above is drawn from exactly these equations. Paste them into the first empty line of the Desmos graphing calculator; each line becomes its own curve.

How it is built

The body is one ellipse in the middle and the outer halves of two more on each side. An ellipse centred at (h, k) is

(h + a·cos(2πt), k + b·sin(2πt))

and drawing only part of it (here the left half of the left lobe and the right half of the right lobe) leaves the ribs where they overlap.

The face is straight segments. A segment from (x₀, y₀) to (x₁, y₁) is (x₀ + (x₁ − x₀)t, y₀ + (y₁ − y₀)t), so a triangle is three of them and the mouth is a closed zigzag.

Press Copy all equations, open the Desmos graphing calculator, click into the first empty expression line and paste: each line becomes its own curve. Every curve uses t from 0 to 1, which is Desmos's default, so there is nothing to set up. Then turn on Fill for the face pieces and colour them black, and switch off the grid from the wrench menu.

Make your own

Frequently asked questions

How do I draw a pumpkin in Desmos?

Overlap three ellipses for the body, use four line segments for the stem, and triangles for the eyes and nose. The equations on this page paste straight into Desmos.

How do I make the pumpkin orange?

Click the colour circle beside each body equation in Desmos and choose orange; give the stem green and fill the face pieces black.

Can I change the face?

Yes. Each face piece is a straight segment between two points; edit the numbers to move a corner, or add segments for more teeth.