how to make a heart in desmos

How to Create a Heart Shape in Desmos

By Hannah Martinez
AD

Ever wanted to express your love or design a striking visual on Desmos? Creating a heart might seem tricky at first, but with the right approach, you can make this popular symbol in just a few steps. Let's dive into creating a heart in Desmos, using simple slider, graph, and equation manipulations.

Desmos is an incredibly versatile online graphing calculator. It allows you to graph functions, plot data, and even create simple animations. So, let's turn it into a love letter with this heart guide.

Understanding the Heart Graph

The classic Valentine's heart is an intersection of two sine waves. By manipulating these waves, we create a heart shape. Let's break down this equation:

AD
the graphing function on an iphone screen shows that it is very difficult to see
the graphing function on an iphone screen shows that it is very difficult to see
Desmos heart ☺️☺️☺️
Desmos heart ☺️☺️☺️
heart triangle in desmos
heart triangle in desmos

`y = (3 + sin(7x))/(4 + cos(7x)) + 0.5 * sin(3x)`

Basic Sinusoidal Wave

The core of our heart is a typical sine wave, `sin(x)`. In our equation, `sin(7x)` and `sin(3x)` represent these waveforms, with different speeds (7 and 3) to create our heart's shape.

a heart is drawn on the coordinate line
a heart is drawn on the coordinate line
❣️
❣️
a heart is shown on the screen with an arrow pointing up to it's center
a heart is shown on the screen with an arrow pointing up to it's center

For `sin(7x)`, changing `x` by a small amount results in a large change in `y`, making it oscillate quickly. `sin(3x)` oscillates more slowly, creating the heart's narrow bottom.

Modifying Sine Waves for the Heart

To create our heart, we modify these sine waves. $(3 + sin(7x))$ scales `sin(7x)`, and `(4 + cos(7x))` changes the amplitude of `sin(7x)`. The addition of `0.5 * sin(3x)` creates the fat bottom of our heart.

AD

Each term is then divided or added to rescale the graph. The final `+ 0.5 * sin(3x)` moves the graph up and down to center our heart symmetrically.

a heart is drawn on a graph paper with the coordinates marked in red and black
a heart is drawn on a graph paper with the coordinates marked in red and black
the graphing tool is showing an image of a flower with a heart on it
the graphing tool is showing an image of a flower with a heart on it
a heart is shown in the center of a graph paper with coordinatess on it
a heart is shown in the center of a graph paper with coordinatess on it
a computer screen with a heart drawn on it
a computer screen with a heart drawn on it
a heart is drawn on the coordinate line
a heart is drawn on the coordinate line
❤️🧡💙💚Happy Valentine's Day💓 Show your love with math graph! #heartequation #romantic
❤️🧡💙💚Happy Valentine's Day💓 Show your love with math graph! #heartequation #romantic

Graphing and Manipulating the Heart

Once you have the equation, input it into Desmos. Click graph, and your heart should appear. Now, let's manipulate it!

Adjusting the Sliders

We've added sliders to adjust various parameters like `a`, `b`, and `c` in `y = (a + sin(bx))/(c + cos(bx)) + d * sin(ex)`. Adjust these sliders to see how they affect your heart's shape, size, and position.

AD

The beauty of Desmos lies in its interactivity. Experimenting with these sliders provides a hands-on understanding of sine waves and graph manipulation.

an image of a sound wave with the slope labeled
an image of a sound wave with the slope labeled
heart formula (maths)
heart formula (maths)
Chosen
Chosen

Color, Style, and Labels

Desmos allows you to customize the appearance of your heart. You can change its color, line style, and add labels for a more polished look. Click the graph to open the edit panel, where you can make these changes.

Clicking on the 'SHOW CODE' button helps understand how these changes affect the HTML and CSS code, providing insights into web design.

AD

Creating a heart in Desmos isn't just about making a symbol; it's about understanding and experimenting with mathematical functions and trigonometric equations. So, why stop at a heart? Keep exploring, and who knows, you might just create your next masterpiece!

AD