Kodeclik Logo

Our Programs

Courses

Gifting

Learn More

Schedule

Kodeclik Blog

How to make a heart in Desmos

Let us learn how to make a heart in Desmos! We will do it step by step so you can follow why the shapes turn out the way they do.

Step 1: Draw a circle

First, let us draw a circle by giving the implicit form of the equation for a circle:

How to draw a heart in Desmos

In the above equation, x^2+y^2=4 is the equation for a circle. The radius is 2 (ie the square root of 4) and the circle is centered at the origin.

Step 2: Move the circle around

To move the circle around, ie to have a different center, we need to update the equation as follows:

How to draw a heart in Desmos

Here, note that the x^2 term has been updated to (x-2)^2. Similarly, the y^2 term has been updated to (y+1)^2. This means that the center has been updated from (0,0) to (2, -1). But the radius stays the same, since the right side is still 4. Thus the circle has gotten shifted.

Similarly, you can update these values to move the circle to your desired location.

Step 3: Morph the circle into an ellipse

Now, we are going to modify the equation in a subtle manner. For the “x” term, we are going to go back to x^2. But for the “y” term, we are going to modify it as show below:

How to draw a heart in Desmos

What has happened so far? You can see that “y” by not having a fixed center, the shape has morphed into an ellipse.

Furthermore, if you look at the right side of the ellipse, i.e the portion to the right of the y-axis, it starts to look like a heart shaped figure.

Step 4: Create a half-heart figure

We will take the above idea and restrict the graph to only display the right portion:

How to draw a heart in Desmos

By adding a square root symbol (which is not defined for negative values of its input), we are restricting the shape to be situated only to the right portion of the y-axis.

Step 5: Convert the half-heart to a full heart

Now we are at the last step. How do we create a mirror reflection of the half heart so we get a full heart? It turns out that is not that difficult.

All we need to do is to add an absolute value symbol. By introducing an absolute value, we ensure that the graph is defined for both negative and positive values of x. Furthermore, by using an absolute value, we ensure that the graph is a mirror image of what you see on the right.

How to draw a heart in Desmos

Finally! We have arrived at our heart! Don’t you just love it?

Next time you want to draw a heart, follow these steps starting from a circle and you will be all set!

If you liked making a heart in Desmos, learn about more geometric designs in Desmos! Similar ideas can be used to create more complex shapes like spirals once you master polar coordinates in Desmos.

If you enjoyed this blogpost, learn about math quadrants next! Also see how to find the line of best fit in Desmos. Explore Kodeclik’s Math courses and bootcamps! For more math fun, checkout our blog post on generating random numbers and on 100+ middle school math games.

Kodeclik sidebar newsletter

Join our mailing list

Subscribe to get updates about our classes, camps, coupons, and more.

About

Kodeclik is an online coding academy for kids and teens to learn real world programming. Kids are introduced to coding in a fun and exciting way and are challeged to higher levels with engaging, high quality content.

Copyright @ Kodeclik 2024. All rights reserved.