ToolSphere
All Desmos art

Desmos Candy Cane Equations

A rounded candy cane made from concentric semicircles, parallel stem edges and red stripes. Every visible stroke is a separate editable equation.

Candy cane drawn from its Desmos equations
15 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

Build the hook. Start with concentric upper semicircles. Their shared centre keeps the candy the same thickness around the bend. The outer arc meets the outside edge of the stem; the inner arc meets the inside edge.

Close the ends. Straight segments extend the stem downward. Small lower semicircles round off the bottom of the stem and the open end of the hook, so neither end is a sharp rectangular corner.

Add stripes. On the straight stem, each stripe is a diagonal segment between its edges. On the hook, each stripe runs radially between corresponding points on the inner and outer circles. Those radial stripes rotate with the bend instead of cutting arbitrarily across it.

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. Set the outlines to a dark colour and the stripe equations to red in Desmos; pasted equations do not carry the preview's colours. Keep the same centre when resizing both hook arcs.

Make your own

Frequently asked questions

How do I make a candy cane in Desmos?

Use an outer and inner semicircle for the hook, two parallel lines for the stem, and small arcs to close the ends. Copy the equations here, then colour the stripe lines red.

Why do the stripes change direction on the hook?

They connect matching angles on the two concentric arcs. This keeps each stripe across the width of the candy as the hook bends.

Can I move the whole candy cane?

Add the same horizontal offset to every x-coordinate and the same vertical offset to every y-coordinate. Moving only one arc will disconnect the hook from the stem.