# How to draw a maple leaf in TikZ?

This blog shows some math parametrized functions that can be used to "plot" symmetric leaves like the one below:

Is it possible to implement such functions and draw the leaf using TikZ?

• Probably. Can you? Or is this a do-it-all-for-me without even the it? – cfr Jan 11 '17 at 4:06
• I can't draw it. – Thumbolt Jan 11 '17 at 5:00
• @Thumbolt, now perhaps you can't. Though what crf probably means is should you try to do it then one day you'll be able to draw it. If you never try you never will. :) – Guilherme Zanotelli Jan 11 '17 at 7:01
• I was reading the pgfplots example gallery but I was unable to find an example that has x(t)=, y(t)= ... of that kind. – Thumbolt Jan 11 '17 at 7:30
• There are several questions about parametric plots here on the site, e.g. tex.stackexchange.com/questions/319739 or tex.stackexchange.com/questions/65719/… and more – Torbjørn T. Jan 11 '17 at 9:11

Simply based on rpapa's answer and the formulas in the question, here is a working .tex file which can be compiled with pdflatex:

\documentclass{article}
\usepackage[margin=2cm]{geometry}

\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw[scale=3, domain=0:180, variable=\t, samples=500, fill=red]
plot (%
{
(
1
+
(cos(6*\t))^2
+
(1/5)*(cos(6*\t)*cos(24*\t))^10
+
( (1/4)*(cos(30*\t))^2 + (1/9)*(cos(30*\t))^12) *  (1-(sin(6*\t))^10)
)
*(sin(2*\t))
*(1-(cos(\t))^4)
*(1 - (cos(\t))^10 * (cos(3*\t))^2)
+(1/70)*(cos(\t))^9
}
,
{
(-21/20)*cos(2*\t)*(1 - (cos(\t))^4 + (1/2)*(cos(\t)*cos(3*\t))^10)
*
(
1
+
(cos(6*\t))^2
+
(1/5)*(cos(6*\t)*cos(18*\t))^10
+
( (1/4)*(cos(30*\t))^4 + (1/10)*(cos(30*\t))^12 )
*
( 1 - ((cos(\t))^10) * (cos(3*\t))^2 )
*
( 1 - (sin(6*\t))^10 )
)
}
);
\end{tikzpicture}
\end{document}


I left in my original line-breaks and potentially unnecessary parentheses.

Notes:

I recommend qtikz or ktikz on GNU/Linux to easily preview TikZ pictures.

Also, when copying the formulas, make sure to always add a "*" between numbers and "\t". I am not sure why it is necessary, but TikZ seems to read things like "6\t" wrong without giving any errors.

• Very nice rendering. – Steven B. Segletes Jan 11 '17 at 15:12
• Can we color this leaf? – Reza Nov 28 '18 at 14:07
• Yes, we can! Simply add ",fill=red" for example to the \draw command. Check the tikz documentation for more infos. :) – KIAaze Dec 4 '18 at 12:34

Oak Leaf only with basic function of Tikz

\documentclass{article}
\usepackage[margin=2cm]{geometry}

\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\draw[scale=3,domain=0:180,variable=\t, samples=500]
plot (%
{1/100*(cos(\t))^9*(cos(5*\t))^10 +1/4*sin(2*\t)*(1-1/2*(sin(10*\t))^2)*(1-(cos(\t)*cos(3*\t))^8)
},{
sin(\t)*(1-1/5*(sin(10*\t)^2*(1/2+(sin(2*\t)^2)
});
\end{tikzpicture}
\end{document}


• But if you are from Canada, an oak leaf just won't do.... – Steven B. Segletes Jan 11 '17 at 11:18