Heart function
Hello,
while going through my old University notes, I discovered this nice function.
A college of mine (hi Michael!) wanted to build a function which forms a heart and this is our result.
Obviously, a function cannot do this as you have multiple -values for one -value but combining two functions in two regimes, you can get close ( it is still missing that the first derivative must converge agains for ).
Here is the result:
Failed to render the following block of LaTeX:
\documentclass[standalone]{article}
\usepackage{tikz}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}
\draw[->] (-1.1,0) -- (1.1,0) node[right] {$x$};
\draw[->] (0,-1.1) -- (0,1.1) node[above] {$y$};
\draw[samples=100, domain=0:1,smooth,variable=\x,blue] plot ({\x}, {-sqrt(1-1/3*(\x^2+2*abs(\x)))});
\draw[samples=100, domain=0:1,smooth,variable=\x,blue] plot ({-\x}, {-sqrt(1-1/3*(\x^2+2*abs(\x)))});
\draw[samples=100, domain=0:1,smooth,variable=\x,red] plot ({\x}, {sqrt(abs(\x)-\x^2)});
\draw[samples=100, domain=0:1,smooth,variable=\x,red] plot ({-\x}, {sqrt(abs(\x)-\x^2)});
\end{tikzpicture}
\end{document}