Drawing an Artistic Poppy Flower using the TikZ Package in LaTeX

This article explores vector illustration techniques for an artistic Poppy Flower using the TikZ package in LaTeX, featuring Bézier curves, color gradients, fadings, and clipping techniques.
Introduction
The TikZ package in LaTeX is not limited to formal scientific diagrams, function plots, or rigid mathematical schemes. More than that, TikZ serves as a versatile digital medium for creating beautiful, organic botanical illustrations.
A prime example of this artistic capability is the Poppy Flower (Papaver rhoeas) illustration created by Elena Botoeva. Combining smooth Bézier curves, rich custom color palettes, and multi-layered lighting effects via fadings and clipping, Elena achieves a lifelike, dynamic botanical artwork purely using LaTeX code.
LaTeX Source Code
Here is the complete LaTeX code to generate three variations of the poppy flower (full shaded, uniform color, and black-and-white):
% Poppy flower
% Author: Elena Botoeva
\documentclass{article}
\usepackage[margin=0.3cm, paperwidth=9.5cm, paperheight=9.5cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{fadings}
% Define Custom Poppy Color Palette
\definecolor{darkgreen}{rgb}{0.2,0.6,0.2}
\definecolor{poppyred}{rgb}{0.89,0.08,0.3}
\definecolor{poppyredd}{rgb}{0.78,0.0,0.09}
\definecolor{poppyreddd}{rgb}{0.63,0.0,0.0}
% Define Petal Shapes using Bézier Curves
\def\petala{
[rounded corners=3] (0,0)
.. controls (-0.25,-0.5) and (-1.25,0.3) .. (-1.6,0)
.. controls (-1.6,0.75) and (-1.25,0.65) .. (-1.1,1)
.. controls (-1.05,0.65) and (-0.05,0.7) .. (0,0)
}
\def\petalb{
[rounded corners=3] (0,0)
.. controls (-0.55,-0.2) and (-1.25,0.7) .. (-1.5,0.6)
.. controls (-1.4,1.1) and (-1.15,0.9) .. (-0.75,1.4)
.. controls (-0.5,1.5) and (-0.05,1.45) .. (0.05,1.3)
.. controls (-0.15,1.1) and (0.25,0.05) .. (0,0)
}
\def\petalc{[rotate=-30] \petalb}
\def\petald{[rotate=-90] \petala}
% Define Petiole / Stem Shapes
\def\petiolea{
[rounded corners=2] (0.25,-7)
.. controls (0.7,-5.5) and (0.3,-3) .. (0.25,-2)
.. controls (0.2,-1.5) and (0.33,-0.4) .. (0,0)
.. controls (0.34,-0.4) and (0.21,-1.5) .. (0.27,-2)
.. controls (0.4,-3) and (0.82,-5.5) .. (0.42,-7)
}
\def\petioleb{
[rounded corners=2] (0.1,-7)
.. controls (0.3,-3) and (-0.85,-1.05) .. (-2.3,-1)
arc (270:230:0.2)
.. controls (-2.7,-1) and (-3.05,-1.05) .. (-3.35,-1.3)
.. controls (-3.35,-1.5) and (-3.45,-1.75) .. (-3.65,-1.75)
.. controls (-3.7,-1.25) and (-3.4,-1.35) .. (-3.4,-1.25)
.. controls (-3.05,-0.95) and (-2.7,-0.9) .. (-2.4,-0.85)
.. controls (-1.1,-0.75) and (0.4,-2.45) .. (0.2,-7)
}
\def\petiolec{
[rounded corners=2] (-0.3,-7)
.. controls (-0.9,-3.5) and (-1.5,-2.7) .. (-2,-2.5)
.. controls (-2.5,-2.3) and (-3.2,-2.35) .. (-3.47,-3.5)
.. controls (-3.68,-3.85) and (-3.75,-4.2) .. (-3.9,-4.15)
.. controls (-4.0,-3.9) and (-3.8,-3.8) .. (-3.7,-3.8)
.. controls (-3.65,-3.75) and (-3.6,-3.7) .. (-3.5,-3.47)
.. controls (-3.2,-2.3) and (-2.5,-2.25) .. (-2,-2.45)
.. controls (-1.48,-2.65) and (-0.86,-3.5) .. (-0.26,-7)
}
% Transparency / Fading Configurations
\tikzfading[name=fade inside, inner color=transparent!100, outer color=transparent!30]
\tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!100]
% Shaded Flower Definition with Overlapping Shadows
\def\flower{
% 1. Draw Each Petal Independently
\foreach \a in {\petala,\petalb,\petalc,\petald} {
\filldraw[draw=none,color=poppyred,opacity=0.8]
[postaction={path fading=south,fading angle=30,fill=poppyreddd,opacity=.2}] \a;
}
% 2. Draw All Petals Combined
\draw[draw=none,rounded corners=3]
[postaction={path fading=north,fading angle=30,fill=poppyreddd,opacity=.7}]
\petala \petalb \petalc [rotate=30] \petald;
% 3. Emphasize Overlapping Areas Between 2 Petals (Clipping)
\begin{scope}
\foreach \a/\b in {\petala/\petalb,\petalb/\petalc,\petalc/\petald} {
\begin{scope}
\clip \a;
\draw [draw=none]
[postaction={path fading=fade inside,fill=poppyredd,opacity=.7}] \b;
\end{scope}
}
\end{scope}
% 4. Emphasize Overlapping Areas Between 3 Petals
\begin{scope}
\foreach \a/\b/\c in {\petala/\petalb/\petalc,\petalb/\petalc/\petald} {
\begin{scope}
\clip \a;
\clip \b;
\draw [draw=none]
[postaction={path fading=fade out,fill=poppyreddd,opacity=.4}] \c;
\end{scope}
}
\end{scope}
}
\def\petioles[#1]{
\foreach \a in {\petiolea,\petioleb,\petiolec} {
\draw[fill,color=#1] \a;
}
}
% Full Shaded Poppy Command
\def\poppy[#1,#2]{
\begin{scope}[shift={#1},scale=#2]
\flower;
\petioles[darkgreen]
\end{scope}
}
% Uniform Color Poppy Command
\def\poppyu[#1,#2]{
\begin{scope}[shift={#1},scale=#2]
\foreach \a in {\petala,\petalb,\petalc,\petald} {
\filldraw[draw=none,color=poppyred,opacity=0.8] \a;
}
\petioles[darkgreen]
\end{scope}
}
% Black and White Poppy Command
\def\poppybw[#1,#2]{
\begin{scope}[shift={#1},scale=#2]
\foreach \a in {\petala,\petalb,\petalc,\petald} {
\filldraw[draw=none,color=gray!80,opacity=1] \a;
}
\petioles[gray!80]
\end{scope}
}
\begin{document}
\thispagestyle{empty}
\begin{center}
\tikz\poppy[{(0cm,0cm)},1];
\tikz\poppyu[{(4cm,0cm)},1];
\tikz\poppybw[{(7cm,0cm)},0.8];
\end{center}
\end{document}Output Produced
The compiled graphical output displays three elegant variations of the poppy flower:
Detailed Code Analysis
1. Smooth Bézier Curves (.. controls ..)
The organic contours of the petals and stems are generated using cubic Bézier curves:
(0,0) .. controls (x1,y1) and (x2,y2) .. (x3,y3)Control points and smoothly pull the paths to craft natural petal curves and sweeping stem lines.
2. Transparency & Fadings Library
The fadings TikZ library creates gradual color transitions from opaque to transparent:
\tikzfading[name=fade inside, inner color=transparent!100, outer color=transparent!30]Combined with postaction={path fading=...}, this technique generates natural lighting highlights on petal folds.
3. Multi-Layer Clipping Technique
The highlight of Elena Botoeva’s design is the use of TikZ clipping to create realistic overlapping shadows:
\begin{scope}
\clip \a;
\draw [draw=none] [postaction={...}] \b;
\end{scope}- Command
\clip \a;restricts drawing strictly within the boundary of the first petal (\petala). - Command
\draw ... \b;then renders the second petal (\petalb) inside that restricted area. - As a result, dark shadow shading is rendered only where two or three petals intersect, giving the flower convincing 3D depth.
TikZ Experimentation
Try these modifications for creative variations:
- Custom Flower Palette:
Modify
poppyredto create roses (rgb{0.9,0.1,0.1}), lavender blossoms (rgb{0.6,0.3,0.8}), or sunflowers (rgb{0.95,0.75,0.1}). - Scale & Rotation Adjustments:
Use
\poppy[{(x,y)}, scale]with different values to assemble a multi-flower bouquet.
Conclusion
Elena Botoeva’s TikZ poppy code is a masterclass in how advanced vector features—such as Bézier curves, custom color palettes, fadings, and clipping—can be combined to create gallery-quality botanical art.
References
- Elena Botoeva, Poppy flower, TeXample.net
- Till Tantau, The TikZ and PGF Manual, v3.1.10, 2024.
Written by: Aan Triono
License: CC BY-SA 4.0





