Endless heart equation
As you can see from the start, this blog post is different from my usual ones. First, it is written in English, and second, it is all about math. Or its popular side. Topic of this post is heart shaped curve.
Two hundred and fifty years later, while working on algebraic surface visualization algorithms, Gabriel Taubin formulated implicit equation for “heart surface“: $$! (x^2 + (1.5)^2\cdot y^2 + z^2 – 1)^3 – x^2 z^3 – \frac{(1.5)^2}{20} y^2 z^3 = 0$$ If we intersect that surface with plane $$y=0$$ (and substitute $$y$$ for $$z$$), we get probably best known formula for heartlike curve, $$(x^2+y^2-1)^3-x^2y^3=0$$.
Math can be found anywhere, if you choose to look the world around you that way. This time, I found inspiration in a sculpture installation, named “Europa’s solar plexus”, which is located on lake Jarun in Zagreb, Croatia. Among others there is work of Miroslav Juraj, marked with the sign of three nested hearts. But, why stop on three? And, is there mathematical equation which describes such curve? Well, answer is – there is. First thing is to see that nested heart curve is made of two parts – to be more precise, two ellipsoid spirals. Without going into “too much math”, such curves are described with parametric equations $$! r_{1,2}= \left[ \begin{array}{c} \pm \, e^{\alpha t} \cdot \cos t \pm k\cdot e^{\alpha t} \cdot \sin t\\ – e^{\alpha t}\cdot\cos t + k\cdot e^{\alpha t}\cdot \sin t \end{array} \right] $$
As we can see, hearts shrink too fast, so we should choose different (greater) value for $$\alpha$$ if we want hearts to be nested, one into another. One other thing, visual complaint could be that heart shape is too “spiky”. If we want more “rounded” shape, $$k$$ should be smaller. If you want to try out drawing endless heart curve for different values of $$k$$ and $$\alpha$$, you can use following code in Wolfram Mathematica: a = -0.2; k = 2; p = ArcCos[-k/Sqrt[1 + k^2]] – Pi; ParametricPlot[{{Exp[a*t] Cos[t] + k*Exp[a*t] Sin[t], -Exp[a*t] Cos[t] + k*Exp[a*t] Sin[t]}, {-Exp[a*t] Cos[t] – k*Exp[a*t] Sin[t], -Exp[a*t] Cos[t] + k*Exp[a*t] Sin[t]}}, {t, p, p + 12 Pi}, PlotRange -> 2, PlotStyle -> {Black, Thick}] Here are some examples for several combinations of $$k$$ and $$\alpha$$:
So, which is your favorite one? In the end, it is impossible not to notice appearance of Euler extension of exponential functions for complex numbers in equation of curve, $$e^{\alpha + \beta i}=e^{\alpha}\cdot (\cos \beta + i \sin \beta)$$. If we rewrite formula using Euler’s notation (and for $$k=\frac{\Pi}{2}$$, $$\alpha = – 0.098$$), we get: $$! r_{1,2} = \left[ \begin{array}{l} \pm \text{Re } e^{t(i-0.098)} \pm \pi / 2\cdot \text{Im } e^{t(i-0.098)}\\ – \text{Re } e^{t(i-0.098)}+\pi / 2 \cdot \text{Im } e^{t(i-0.098)} \end{array} \right]$$ Let this equation, and its animation below, serve as a little token of dedication to Euler and its beutifull equation, $$e^{i \Pi} -1 =0$$. Animate[ParametricPlot[{{Exp[-0.098 t] Cos[t] + Pi/2*Exp[-0.098 t] Sin[t], -Exp[-0.098 t] Cos[t] + Pi/2*Exp[-0.098 t] Sin[t]}, {-Exp[-0.098 t] Cos[t] – Pi/2*Exp[-0.098 t] Sin[t], -Exp[-0.098 t] Cos[t] + Pi/2*Exp[-0.098 t] Sin[t]}}, {t, -0.567, a}, PlotRange -> 2.0], {a, -0.567, -0.567 + 12 Pi}] [youtube ]https://www.youtube.com/watch?v=2x0acxLYVNw[/youtube] PS: Main inspiration came from love for my wife and son. <3 |