The Perfect Valentine

Today the New York Times published the article “The Perfect Valentine? A Math Formula” featuring a widget which allows you to visualise the equation

$(x^2 + (1+b)^2y^2 +z^2 -1)^3 -(x^2 +ay^2 )z^3 $

where $a$ and $b$ are parameters. This equation may not seem romantic at first but as soon as we see the visualisation we cannot help but agreeing with the article first sentence:

“Nothing says I love you like a customisable algebraic equation”

Image created by Süss widget.

You can customise your equation within the Süss — German for “sweet” — widget created for Valentine’s Day by Imaginary, a nonprofit organisation in Berlin that designs open-source mathematics programs and exhibitions.

Or if you are a true romantic, you can make your very own heart (in your favourite palette) for that especial person in Python using only numpy, pandas, and plotly.

Heart using a = 9/200 and b = 1/2 in twilight scale.

Python Code here:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw Valentine.ipynb hosted with ❤ by GitHub

Happy Valentine’s Day!

Quant Girl

I write about Mathematics, Statistics, Finance, Programming, and the relationships among them. I enjoy learning, listening to music and podcasts, practicing yoga, reading magazines, and watching documentaries.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.