How to make a heart in Desmos
To make a heart in Desmos, type (x^2 + y^2 - 1)^3 = x^2 y^3. For a filled heart, change the equals sign to ≤ (type <=).
(x^2 + y^2 - 1)^3 = x^2 y^3(16 sin(t)^3, 13 cos(t) - 5 cos(2t) - 2 cos(3t) - cos(4t))Step by step
- 1On a new line, type
(x^2 + y^2 - 1)^3 = x^2 y^3. - 2Zoom in, because the heart is small. It fits between about −1.2 and 1.2.
- 3To fill it in, use
(x^2 + y^2 - 1)^3 <= x^2 y^3.
A smoother parametric heart
This classic version has a nicer shape, with a pointier base. Type it, and set t from 0 to 2π, as Desmos starts t at 0 to 1:
(16 sin(t)^3, 13 cos(t) - 5 cos(2t) - 2 cos(3t) - cos(4t))
It is about 32 units wide, so zoom out to see all of it.
Moving and resizing it
Replace x with (x − h)/a and y with (y − k)/a to move the centre to (h, k) and scale it by a. With sliders for h, k and a, you can drag your heart around, or animate it to beat.
Why it works, and more hearts
Our heart curve page has four equations, with an explanation of how each produces the shape.
Frequently asked questions
What is the equation for a heart in Desmos?
Why can’t I see my heart?
How do I make a heart red?
Keep going
Four equations, and how they work.
More pictures from equations.
How the smoother heart is drawn.
Type a new letter and click “add slider”, then press play.
Type y = mx + b, then add a restriction for a segment.
Type cbrt for ∛, and how to type other symbols.
The same equations work here, with algebra, steps and exports built in. It is free, with no account.