Skip to content

tkz-fn examples

Heart curve

Heart curve
View TeX code
% !TEX TS-program = lualatex
% heart.tex -- the heart curve (x^2+y^2-1)^3 = x^2 y^3, an implicit
% curve of degree 6 with two cusps on the y-axis, at (0,1) and (0,-1).
% The equation is not solved: \tkzFnImplicit finds the curve in Lua.
\documentclass[border=12pt]{standalone}
\usepackage{tkz-fn}
\begin{document}
\begin{tikzpicture}[scale=1.6]
  \tkzFnInit[xmin=-1.5,xmax=1.5,ymin=-1.5,ymax=1.5,xstep=.5,ystep=.5]
  \tkzFnGrid
  \tkzFnImplicit[very thick,red,fill=red!20,samples=200]
    {(x^2+y^2-1)^3 = x^2*y^3}
  \tkzFnAxes
  \tkzFnText[text=red,fill=white](0.75,-1.3){$(x^2+y^2-1)^3=x^2y^3$}
\end{tikzpicture}
\end{document}