% tikzlibraryflorilegium.code.tex -- florilegium's species in pure TikZ: \usetikzlibrary{florilegium}
% Copyright (c) 2026 Kevin Raymond. MIT License: see LICENSE or florilegium.sty.
%
% A species is a plant sampled from a genome: its body plan (lily, rose, pea, daisy,
% umbellifer ...), the visitor its flowers are for, then the flower, its cluster, the leaf
% and the fruit, each trait drawn from the plan's distribution in a fixed order. The
% tables are generated from florilegium-species.lua (tools/tikztables.lua) and drawn
% with pgf's own random generator, so that florilegium's Lua side, which replays that
% generator exactly, finds the same species for the same seed. pgfmath computes, TikZ
% draws, under pdfLaTeX or LuaLaTeX; nothing here needs Lua.
%
%   \florilegiumspecies{<seed>}{<role>}   seed 1..2147483646; role hero, spray, monocot or any
%   \florilegiumspecies[compound=palmate, leaflets=7]{<seed>}{<role>}   those traits fixed
%   \florilegiumtrait{<trait>}            a trait of the species last drawn, e.g. {plan}, {merosity}
%   \florilegiumvisitor{<seed>}{<role>}   a visitor: a butterfly, a bee, a snail ... (see below)

\ifdefined\ProvidesFile
  \ProvidesFile{tikzlibraryflorilegium.code.tex}[2026/11/05 v2.0.1 florilegium species in pure TikZ]
\fi

\input tikzlibraryflorilegium.tables.code.tex
\usepgflibrary{fpu}

% pgfmath's number scanner (pgfmathparser.code.tex, \pgfmath@parse@@number) looks up
% \csname pgfmath@base@<the number so far><next token>\endcsname after every number, to
% catch the base prefixes 0x and 0b; every distinct number thereby leaves a name behind,
% and under pdfLaTeX (fixed string pool) a few thousand parsed coordinates fill the pool.
% Here the lookup is made only when the number so far is 0 (the only case a prefix can
% follow), which changes nothing else. Applied only if that line is found as one of the
% two forms pgf has written it in: 3.1.10 looks up \pgfmath@number\pgfmath@token, 3.1.12
% \expandafter\pgfmath@number\expandafter\string\pgfmath@token (TeX Live 2026); each is
% replaced by the same line with the test around it. pgf's own fix (pgf-tikz/pgf#1489, after
% 3.1.12) tests the name with \unless\ifcsname, which creates nothing: that line is left as
% it is, without a warning. Under another pgf nothing is changed either, and a page of plants
% may then fill pdfTeX's string pool.
% The change is florilegium's, made at load time in documents that load this library; pgf's
% files are not changed, and pgf's authors do not support it: report problems with it to
% florilegium. pgf itself, unmodified, is at https://ctan.org/pkg/pgf (LPPL 1.3c or GPL 2).
\def\flo@pgfpatch#1\csname pgfmath@base@\pgfmath@number\pgfmath@token\endcsname\relax#2\flo@pgfpatch@end{%
  \def\flo@tmp{#2}%
  \ifx\flo@tmp\pgfutil@empty\else
    \flo@pgfpatch@b#2\flo@pgfpatch@end
    \expandafter\flo@pgfpatch@c\expandafter{\flo@tmpb}{#1}%
  \fi}
\def\flo@pgfpatch@b#1\csname pgfmath@base@\pgfmath@number\pgfmath@token\endcsname\relax\flo@pgfpatch@end{\def\flo@tmpb{#1}}
\def\flo@pgfpatch@c#1#2{\def\pgfmath@parse@@number{#2%
  \csname pgfmath@base@\ifx\pgfmath@number\pgfmath@char@zero0\pgfmath@token\else-\fi\endcsname\relax#1}}
% pgf 3.1.12's form of the same line
\def\flo@pgfpatchs#1\csname pgfmath@base@\expandafter\pgfmath@number\expandafter\string\pgfmath@token\endcsname\relax#2\flo@pgfpatch@end{%
  \def\flo@tmp{#2}%
  \ifx\flo@tmp\pgfutil@empty\else
    \flo@pgfpatchs@b#2\flo@pgfpatch@end
    \expandafter\flo@pgfpatchs@c\expandafter{\flo@tmpb}{#1}%
  \fi}
\def\flo@pgfpatchs@b#1\csname pgfmath@base@\expandafter\pgfmath@number\expandafter\string\pgfmath@token\endcsname\relax\flo@pgfpatch@end{\def\flo@tmpb{#1}}
\def\flo@pgfpatchs@c#1#2{\def\pgfmath@parse@@number{#2%
  \csname pgfmath@base@\ifx\pgfmath@number\pgfmath@char@zero0\expandafter\string\pgfmath@token\else-\fi\endcsname\relax#1}}
% pgf's fixed form: \flo@tmp is left nonempty if the scanner has it. Kept out of the
% conditionals below, since TeX counts an \ifcsname in a skipped branch as an \if.
\def\flo@pgffixed#1\unless\ifcsname pgfmath@base@#2\flo@pgfpatch@end{\def\flo@tmp{#2}}
\def\flo@pgffixedtest{\expandafter\flo@pgffixed\pgfmath@parse@@number
  \unless\ifcsname pgfmath@base@\flo@pgfpatch@end}
\let\flo@tmp\pgfutil@empty
\ifdefined\pgfmath@parse@@number
  \expandafter\flo@pgfpatch\pgfmath@parse@@number
    \csname pgfmath@base@\pgfmath@number\pgfmath@token\endcsname\relax\flo@pgfpatch@end
  \ifx\flo@tmp\pgfutil@empty
    \expandafter\flo@pgfpatchs\pgfmath@parse@@number
      \csname pgfmath@base@\expandafter\pgfmath@number\expandafter\string\pgfmath@token\endcsname\relax\flo@pgfpatch@end
  \fi
  \ifx\flo@tmp\pgfutil@empty
    \flo@pgffixedtest
  \fi
\fi
% none of the three forms, or no scanner by that name: say so under pdfTeX, whose string
% pool is fixed (LuaTeX's grows)
\ifx\flo@tmp\pgfutil@empty\ifdefined\directlua\else
  \pgfutil@packagewarning{florilegium}{pgf \pgfversion's number scanner is not in a form
    this library knows, so it is left as it is; a page of plants may then fill pdfTeX's
    string pool (TeX capacity exceeded, pool size)}%
\fi\fi

% ---------------------------------------------------------------- traits
\def\flo@set#1#2{\expandafter\edef\csname flo@v@#1\endcsname{#2}}
\def\flo@get#1{\csname flo@v@#1\endcsname}
\let\florilegiumtrait\flo@get

% ---------------------------------------------------------------- one draw
% each leaves its value in \flo@val; the four kinds match florilegium-species.lua
\def\flo@C#1{\edef\flo@val{#1}}
\def\flo@I#1#2{\pgfmathrandominteger\flo@val{#1}{#2}}
\def\flo@R#1#2{\pgfmathparse{#1+#2*rnd}\let\flo@val\pgfmathresult}
% a weighted choice: #2 is {value}{cumulative weight} pairs, #1 the total
\def\flo@W#1#2{\pgfmathrandominteger\flo@k{1}{#1}\flo@Wscan#2\flo@stop}
\def\flo@Wscan#1#2{%
  \ifnum\flo@k>#2\relax
    \expandafter\flo@Wscan
  \else
    \def\flo@val{#1}\expandafter\flo@Wgobble
  \fi}
\def\flo@Wgobble#1\flo@stop{}
% the distribution for the value of an earlier trait #1, from the macros \flo@d@#2@<value>
\def\flo@BY#1#2{%
  \edef\flo@key{flo@d@#2@\flo@get{#1}}%
  \ifcsname\flo@key\endcsname\else\edef\flo@key{flo@d@#2@_}\fi
  \csname\flo@key\endcsname}
% draw trait #1 with distribution #2, keep it (or the value it is fixed to), and log it if asked
\def\flo@T#1#2{#2\ifcsname flo@fix@#1\endcsname\edef\flo@val{\csname flo@fix@#1\endcsname}\fi
  \flo@set{#1}{\flo@val}\flo@logT{#1}}

% ---------------------------------------------------------------- a genome of your own
% Traits fixed by name ([compound=palmate, leaflets=7]), the rest sampled. A fixed trait
% still takes its draw, then its value is the fixed one, and a trait that depends on it
% follows it, as florilegium-species.lua's M.fixes and M.sample do. A trait the genome
% lacks, or a value no plan (or kind) can draw, is an error: \flo@<ns>ok@<trait> holds its
% names, the range of a number, and whether that number is real (the tables). \flo@fixns is
% empty for a species, v for a visitor; clade and group follow from the plan and the kind.
% A whole number is kept as one (7.0 and 07 as 7), as Lua keeps it. After an error the
% species or visitor is sampled without any of the traits, and so is the rest of the pic
% (\flo@o@traits emptied), as the Lua engine draws it.
\newif\ifflo@fixbad
\def\flo@fixset#1#2{\def\flo@fixns{#1}\def\flo@fixlist{}\flo@fixbadfalse
  \edef\flo@tmp{\noexpand\pgfkeys{/florilegium/fix,#2}}\flo@tmp
  \ifflo@fixbad\flo@fixclear\let\flo@o@traits\pgfutil@empty\fi}
\def\flo@fixclear{\pgfutil@for\flo@t:=\flo@fixlist\do{\ifx\flo@t\pgfutil@empty\else
  \expandafter\let\csname flo@\flo@fixns fix@\flo@t\endcsname\flo@undefined\fi}\def\flo@fixlist{}}
\pgfkeys{/florilegium/fix/.is family, /florilegium/fix/.unknown/.code={%
  \edef\flo@fixval{#1}%
  \flo@fixcheck{\pgfkeyscurrentname}{#1}%
  \expandafter\let\csname flo@\flo@fixns fix@\pgfkeyscurrentname\endcsname\flo@fixval
  \edef\flo@fixlist{\flo@fixlist,\pgfkeyscurrentname}}}
\def\flo@fixwhat{\ifx\flo@fixns\pgfutil@empty a species\else a visitor\fi}
\def\flo@fixcheck#1#2{%
  \ifcsname flo@\flo@fixns ok@#1\endcsname
    \expandafter\expandafter\expandafter\flo@fixcheck@\csname flo@\flo@fixns ok@#1\endcsname{#1}{#2}%
  \else
    \flo@fixbadtrue
    \pgfutil@packageerror{florilegium}{\flo@fixwhat\space has no trait `#1'}{docs/traits.md (and the
      manual, florilegium-doc.pdf) lists every trait and what it may be. Press return to
      draw it as sampled, without the traits.}%
  \fi}
% #1 the names, #2 #3 the range of a number (empty if none), #4 1 for a real number, #5 the
% trait, #6 its value
\def\flo@fixcheck@#1#2#3#4#5#6{%
  \def\flo@tmp{#6}%
  \ifx\flo@tmp\pgfutil@empty\pgfutil@in@false\else\pgfutil@in@{,#6,}{,#1,}\fi
  \ifpgfutil@in@\else
    \flo@yesfalse
    \def\flo@t{#2}%
    \ifx\flo@t\pgfutil@empty\else\ifx\flo@tmp\pgfutil@empty\else
      \flo@isnum{#6}%
      \ifflo@yes
        \pgfmathparse{and(and((#6)>=(#2),(#6)<=(#3)),or(#4==1,(#6)==int(#6)))}%
        \ifdim\pgfmathresult pt>0pt \else\flo@yesfalse\fi
      \fi
    \fi\fi
    \ifflo@yes
      \ifnum#4=1 \else\pgfmathtruncatemacro\flo@fixval{#6}\fi
    \else
      \flo@fixbadtrue
      \def\flo@tmp{#1}%
      \ifx\flo@t\pgfutil@empty\def\flo@fixmsg{one of #1}%
      \else
        \ifnum#4=1 \def\flo@fixmsg{a number from #2 to #3}\else\def\flo@fixmsg{a whole number from #2 to #3}\fi
        \ifx\flo@tmp\pgfutil@empty\else\edef\flo@fixmsg{one of #1, or \flo@fixmsg}\fi
      \fi
      \pgfutil@packageerror{florilegium}{#5=#6 cannot be drawn: #5 is \flo@fixmsg}{Press
        return to draw it as sampled, without the traits.}%
    \fi
  \fi}
% \ifflo@yes when #1 is a plain decimal number, as florilegium-species.lua's M.fixes reads
% one: a minus sign first or none, digits with at most one point among them, and at least
% one digit (no +, exponent, hexadecimal or expression)
\newif\ifflo@numpt \newif\ifflo@numdig \newif\ifflo@numfirst
\def\flo@isnum#1{\flo@yestrue\flo@numptfalse\flo@numdigfalse\flo@numfirsttrue
  \flo@isnum@#1\flo@stop\ifflo@numdig\else\flo@yesfalse\fi}
\def\flo@isnum@#1{\ifx#1\flo@stop\expandafter\pgfutil@gobble\else
  \if-\noexpand#1\ifflo@numfirst\else\flo@yesfalse\fi
  \else\if.\noexpand#1\ifflo@numpt\flo@yesfalse\fi\flo@numpttrue
  \else\pgfutil@in@{#1}{0123456789}\ifpgfutil@in@\flo@numdigtrue\else\flo@yesfalse\fi\fi\fi
  \flo@numfirstfalse\fi\flo@isnum@}

% ---------------------------------------------------------------- a log of the choices
% \florilegiumspecieslogtrue collects "trait=value" for the species last drawn in
% \florilegiumspecieslog (for tools/tikzcheck.lua)
\newif\ifflorilegiumspecieslog
\def\flo@logT#1{\ifflorilegiumspecieslog\edef\florilegiumspecieslog{\florilegiumspecieslog\space#1=\flo@val}\fi}

% ---------------------------------------------------------------- a species
% Lehmer's generator answers seeds 1, 2, 3 ... with nearly proportional first values,
% so the first two are thrown away, as in florilegium-species.lua (M.WARM)
% A seed is a whole number from 1 to 2147483646, as pgf's generator takes it (pgfmanual,
% "a pseudo-random integer between 1 and 2^31 - 1"); another is an error and seed 1 is drawn,
% as the Lua engine does (\flo@badseed: #1 a macro holding the seed)
\def\flo@badseed#1{\pgfutil@packageerror{florilegium}{A seed is a whole number from 1 to
  2147483646, not #1}{Press return to draw seed 1}\def#1{1}}
\def\flo@seedcheck{\ifnum\pgfmath@rnd@z<1 \flo@seedreset\else
  \ifnum\pgfmath@rnd@z>2147483646 \flo@seedreset\fi\fi}
\def\flo@seedreset{\flo@badseed\flo@seedval\pgfmathsetseed{1}}
% \ifflo@roleok when #2 names a role in the table #1 (flo@role@ or flo@vrole@). \ifcsname
% stops a name at the first unexpandable token, so rose\relax would pass as rose: a role
% that passes is expanded (\flo@rq) and looked up again as a string
\newif\ifflo@roleok
\def\flo@isrole#1#2{\flo@roleokfalse
  \ifcsname #1#2\endcsname
    \protected@edef\flo@rq{#2}%
    \ifcsname #1\detokenize\expandafter{\flo@rq}\endcsname\flo@roleoktrue\fi
  \fi}
\def\florilegiumspecies{\pgfutil@ifnextchar[\flo@sample@species{\flo@sample@species[]}}
\def\flo@sample@species[#1]#2#3{%
  \flo@fixset{}{#1}%
  \flo@sample@plan{#2}{#3}%
  \flo@planfixcheck
  \ifflo@planbad
    \flo@fixclear\let\flo@o@traits\pgfutil@empty
    \edef\flo@tmp{\noexpand\flo@sample@plan{\flo@get{seed}}{\flo@get{role}}}\flo@tmp
  \fi
  \flo@set{plan}{\flo@val}\flo@logT{plan}%
  \csname flo@plan@\flo@val\endcsname
  \flo@fixclear}
% the seed, the role and the plan, into \flo@val
\def\flo@sample@plan#1#2{%
  \pgfmathsetseed{#1}\edef\flo@seedval{#1}\flo@seedcheck
  \pgfmathgeneratepseudorandomnumber\pgfmathgeneratepseudorandomnumber
  \flo@set{seed}{\flo@seedval}%
  \edef\florilegiumspecieslog{seed=\flo@seedval}%
  \flo@isrole{flo@role@}{#2}%
  \ifflo@roleok\flo@set{role}{\flo@rq}\else
    \flo@roleerror{#2}%
    \flo@set{role}{any}%
  \fi
  \csname flo@role@\flo@get{role}\endcsname
  \ifcsname flo@fix@plan\endcsname\edef\flo@val{\flo@fix@plan}\fi}
\def\flo@roleerror#1{\pgfutil@packageerror{florilegium}{No plant has the role `#1'}{A plant's
  role is hero, spray, monocot, any, or a body plan (rose, lily, pea, fern, ...); see
  docs/species.md. Press return to draw one of role any}}
\def\flo@vroleerror#1{\pgfutil@packageerror{florilegium}{No visitor has the role `#1'}{A
  visitor's role is bee, butterfly, moth, bird, beetle, fly, leaf, stem, perch, any, or a kind
  (ladybird, snail, ...); see docs/species.md. Press return to draw one of role any}}
% A fixed value that the plan's kind of plant cannot draw, as florilegium-species.lua's
% M.refused finds it: a name only the fern draws (\flo@fernonly@<trait>) on a flowering
% plant, or on a fern a leaf tip, edge or outline its frond has no table entry for
% (\flo@fernok@<trait>). The first, in the order the traits are drawn, is an error; the
% species is then sampled as without traits, and so is the rest of the pic. \flo@val is
% the plan.
\newif\ifflo@planbad
\def\flo@planfixcheck{\flo@planbadfalse
  \edef\flo@tmp{\noexpand\pgfutil@in@{,\flo@val,}{\flo@fernplans}}\flo@tmp
  \ifpgfutil@in@\def\flo@pffern{1}\else\def\flo@pffern{0}\fi
  \pgfutil@for\flo@pft:=\flo@traits\do{\ifflo@planbad\else
    \ifcsname flo@fix@\flo@pft\endcsname\flo@planfixone\fi\fi}}
\def\flo@planfixone{\edef\flo@pfv{\csname flo@fix@\flo@pft\endcsname}%
  \ifnum\flo@pffern=1
    \ifcsname flo@fernok@\flo@pft\endcsname
      \edef\flo@tmp{\noexpand\pgfutil@in@{,\flo@pfv,}{,\csname flo@fernok@\flo@pft\endcsname,}}\flo@tmp
      \ifpgfutil@in@\else
        \flo@planbadtrue
        \pgfutil@packageerror{florilegium}{\flo@pft=\flo@pfv\space is a flowering plant's; a
          fern's \flo@pft\space is one of \csname flo@fernok@\flo@pft\endcsname}{Press return
          to draw it as sampled, without the traits.}%
      \fi
    \fi
  \else
    \ifcsname flo@fernonly@\flo@pft\endcsname
      \expandafter\expandafter\expandafter\flo@planfixfl\csname flo@fernonly@\flo@pft\endcsname
    \fi
  \fi}
\def\flo@planfixfl#1#2{%
  \edef\flo@tmp{\noexpand\pgfutil@in@{,\flo@pfv,}{,#1,}}\flo@tmp
  \ifpgfutil@in@
    \flo@planbadtrue
    \pgfutil@packageerror{florilegium}{\flo@pft=\flo@pfv\space is a fern's; a flowering plant's
      \flo@pft\space is one of #2}{Press return to draw it as sampled, without the traits.}%
  \fi}

% ---------------------------------------------------------------- a visitor
% A visitor (a butterfly, a bee, a snail ...) is sampled as a plant is, its kind first,
% then its traits, into a namespace of its own: plants and visitors share trait names.
%
%   \florilegiumvisitor[<traits>]{<seed>}{<role>}   role: a flower's visitor (bee, butterfly, moth, bird,
%                                         beetle, fly), one off the flowers (leaf, stem, perch),
%                                         any, or a kind (ladybird)
%   \florilegiumvisitortrait{<trait>}     a trait of the visitor last drawn, e.g. {kind}, {spots}
\def\flo@xset#1#2{\expandafter\edef\csname flo@x@#1\endcsname{#2}}
\def\flo@xget#1{\csname flo@x@#1\endcsname}
\let\florilegiumvisitortrait\flo@xget
\def\flo@VT#1#2{#2\ifcsname flo@vfix@#1\endcsname\edef\flo@val{\csname flo@vfix@#1\endcsname}\fi
  \flo@xset{#1}{\flo@val}\flo@logT{#1}}
\def\flo@VBY#1#2{%
  \edef\flo@key{flo@d@#2@\flo@xget{#1}}%
  \ifcsname\flo@key\endcsname\else\edef\flo@key{flo@d@#2@_}\fi
  \csname\flo@key\endcsname}
\def\florilegiumvisitor{\pgfutil@ifnextchar[\flo@sample@visitor{\flo@sample@visitor[]}}
\def\flo@sample@visitor[#1]#2#3{%
  \flo@fixset{v}{#1}%
  \pgfmathsetseed{#2}\edef\flo@seedval{#2}\flo@seedcheck
  \pgfmathgeneratepseudorandomnumber\pgfmathgeneratepseudorandomnumber
  \flo@xset{seed}{\flo@seedval}%
  \edef\florilegiumspecieslog{seed=\flo@seedval}%
  \flo@isrole{flo@vrole@}{#3}%
  \ifflo@roleok\flo@xset{role}{\flo@rq}\else
    \flo@vroleerror{#3}%
    \flo@xset{role}{any}%
  \fi
  \csname flo@vrole@\flo@xget{role}\endcsname
  \ifcsname flo@vfix@kind\endcsname\edef\flo@val{\flo@vfix@kind}\fi
  \flo@xset{kind}{\flo@val}\flo@logT{kind}%
  \csname flo@vkind@\flo@val\endcsname
  \flo@fixclear}

% ================================================================ drawing
% Everything below draws through pgf's basic layer (\pgfpathmoveto, \pgfpathcurveto,
% \pgfusepath ...), with every control point computed here, one random draw per line, so
% that florilegium's Lua side can follow it step for step (florilegium-native.lua). A drawing
% works in local units (written as pt) that one \pgftransformscale maps to its size;
% line widths are absolute, as in florilegium-ink.lua.

% ---------------------------------------------------------------- loops and draws
\newcount\flo@i \newcount\flo@j \newcount\flo@n \newcount\flo@m \newcount\flo@p \newcount\flo@tdi
% \flo@loop{name}{\count}{from}{to}{body}: an ungrouped loop; each loop site has its own name
\def\flo@loop#1#2#3#4#5{%
  \expandafter\def\csname flo@b@#1\endcsname{#5}%
  #2=\numexpr#3\relax
  \flo@loop@{#1}#2{#4}}
\def\flo@loop@#1#2#3{%
  \ifnum#2>\numexpr#3\relax\expandafter\pgfutil@gobble\else\expandafter\pgfutil@firstofone\fi
  {\csname flo@b@#1\endcsname\advance#2 by1 \flo@loop@{#1}#2{#3}}}
% one draw each, so that the order of draws is the order of these lines (Lua mirrors it)
\def\flo@rnd#1{\pgfmathparse{rnd}\let#1\pgfmathresult}
\def\flo@range#1#2#3{\pgfmathparse{#2+(#3-(#2))*rnd}\let#1\pgfmathresult}
\def\flo@sym#1#2{\pgfmathparse{(#2)*rand}\let#1\pgfmathresult}
\def\flo@int#1#2#3{\pgfmathrandominteger#1{#2}{#3}}
\def\flo@calc#1#2{\pgfmathparse{#2}\let#1\pgfmathresult}
\def\flo@drawseed#1{\pgfmathsetseed{#1}\pgfmathgeneratepseudorandomnumber\pgfmathgeneratepseudorandomnumber}

% ---------------------------------------------------------------- points and paths
\def\flo@P#1#2{\pgfqpoint{#1pt}{#2pt}}
\def\flo@put#1#2#3{\expandafter\edef\csname flo@X#1\endcsname{#2}\expandafter\edef\csname flo@Y#1\endcsname{#3}}
\def\flo@x#1{\csname flo@X#1\endcsname}
\def\flo@y#1{\csname flo@Y#1\endcsname}
% control points of a closed Catmull-Rom curve through points 1..#1 (tension 1/6),
% kept in flo@A/B (first) and flo@C/D (second control point of the segment from i)
\def\flo@smoothprep#1{%
  \edef\flo@N{\the\numexpr#1\relax}%
  \flo@loop{sp}\flo@i{1}{\flo@N}{%
    \edef\flo@ia{\the\numexpr\ifnum\flo@i=1 \flo@N\else\flo@i-1\fi\relax}%
    \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@N\space 1\else\flo@i+1\fi\relax}%
    \edef\flo@ic{\the\numexpr\ifnum\flo@ib=\flo@N\space 1\else\flo@ib+1\fi\relax}%
    \edef\flo@xi{\flo@x{\the\flo@i}}\edef\flo@yi{\flo@y{\the\flo@i}}%
    \edef\flo@xa{\flo@x\flo@ia}\edef\flo@ya{\flo@y\flo@ia}%
    \edef\flo@xb{\flo@x\flo@ib}\edef\flo@yb{\flo@y\flo@ib}%
    \edef\flo@xc{\flo@x\flo@ic}\edef\flo@yc{\flo@y\flo@ic}%
    \flo@calc\flo@t{\flo@xi+(\flo@xb-(\flo@xa))/6}\expandafter\let\csname flo@A\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@yi+(\flo@yb-(\flo@ya))/6}\expandafter\let\csname flo@B\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@xb-(\flo@xc-(\flo@xi))/6}\expandafter\let\csname flo@C\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@yb-(\flo@yc-(\flo@yi))/6}\expandafter\let\csname flo@D\the\flo@i\endcsname\flo@t}}
% the path of the curve prepared last
\def\flo@smoothpath{%
  \pgfpathmoveto{\flo@P{\flo@x1}{\flo@y1}}%
  \flo@loop{spp}\flo@i{1}{\flo@N}{%
    \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@N\space 1\else\flo@i+1\fi\relax}%
    \pgfpathcurveto{\flo@P{\csname flo@A\the\flo@i\endcsname}{\csname flo@B\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@C\the\flo@i\endcsname}{\csname flo@D\the\flo@i\endcsname}}%
      {\flo@P{\flo@x\flo@ib}{\flo@y\flo@ib}}}%
  \pgfpathclose}
% a closed blob around (#1,#2), radii #3 #4, six points; draws 6 numbers
\def\flo@blob#1#2#3#4{%
  \flo@loop{blob}\flo@j{1}{6}{%
    \flo@range\flo@t{0.7}{1.3}%
    \flo@calc\flo@bx{#1+(#3)*\flo@t*cos(60*\the\flo@j)}%
    \flo@calc\flo@by{#2+(#4)*\flo@t*sin(60*\the\flo@j)}%
    \flo@put{\the\flo@j}{\flo@bx}{\flo@by}}%
  \flo@smoothprep{6}\flo@smoothpath}
% a tapered streak from (#1,#2) (width #5) to (#3,#4), bowed sideways by #6
\def\flo@streak#1#2#3#4#5#6{%
  \flo@calc\flo@sa{#1-(#5)/2}\flo@calc\flo@sb{#1+(#5)/2}%
  \flo@calc\flo@sm{(#1+#3)/2+(#6)}\flo@calc\flo@sn{(#2+#4)/2}%
  \pgfpathmoveto{\flo@P{\flo@sa}{#2}}%
  \pgfpathcurveto{\flo@P{\flo@sa}{#2}}{\flo@P{\flo@sm}{\flo@sn}}{\flo@P{#3}{#4}}%
  \pgfpathcurveto{\flo@P{\flo@sm}{\flo@sn}}{\flo@P{\flo@sb}{#2}}{\flo@P{\flo@sb}{#2}}%
  \pgfpathclose}

% ---------------------------------------------------------------- color
% tone #2 (0 darkest, 1 palest) of the ink's ramp, or of the accent's when #3 is flo@accent
\def\flo@tone#1#2#3{%
  \def\flo@tmp{#3}\def\flo@tmpb{flo@accent}%
  \ifx\flo@tmp\flo@tmpb\let\flo@savedramp\flo@rampname\def\flo@rampname{flo@aramp}%
    \flo@vtone{#1}{#2}\let\flo@rampname\flo@savedramp
  \else\flo@vtone{#1}{#2}\fi}
% the document's ink and accent (florilegium.sty defines them), else florilegium's own;
% read again by every drawing, so a \definecolor{ink} later in the document counts. The
% tone ramp is computed from the ink when it changes (\flo@ramp, below).
\def\flo@colors{%
  \pgfutil@ifundefined{\string\color@ink}{\definecolor{flo@ink}{HTML}{2456C4}}{\colorlet{flo@ink}{ink}}%
  \pgfutil@ifundefined{\string\color@accent}{\definecolor{flo@accent}{HTML}{B4662F}}{\colorlet{flo@accent}{accent}}%
  \extractcolorspecs{flo@ink}{\flo@cmodel}{\flo@cspec}\convertcolorspec{\flo@cmodel}{\flo@cspec}{rgb}\flo@crgb
  \ifx\flo@crgb\flo@rampfor\else\global\let\flo@rampfor\flo@crgb\flo@ramp{flo@ramp}\fi
  \extractcolorspecs{flo@accent}{\flo@cmodel}{\flo@cspec}\convertcolorspec{\flo@cmodel}{\flo@cspec}{rgb}\flo@crgb
  \ifx\flo@crgb\flo@arampfor\else\global\let\flo@arampfor\flo@crgb\flo@ramp{flo@aramp}\fi
  \def\flo@rampname{flo@ramp}}
\def\flo@rampfor{}\def\flo@arampfor{}\def\flo@rampname{flo@ramp}

% #2 pairs of leaflets on a rachis above a short petiole, sized to peak mid-rachis, the
% upper turned further forward, none longer than #3 and short enough that neighbors barely
% overlap, then a terminal leaflet (odd-pinnate) or, where \flo@ptend is 1, a tendril,
% often forked, each branch coiling its own way (even-pinnate); along +y, length 1; #1 the
% leaf on the page in pt
\def\flo@pinnate#1#2#3{%
  \edef\flo@plpt{#1}\edef\flo@pk{#2}\edef\flo@pl{#3}%
  % the leaflets' half-width \flo@plw (as \flo@sshape@ has it): the largest pmax is as wide
  % as 0.9 of the gap between pairs; a terminal leaflet 1.1 times as long ends the rachis,
  % pairs from 0.2 to 0.03 below it
  \flo@calc\flo@plw{max(0.035,min(0.6,0.5/\flo@get{leafaspect}))}%
  \ifnum\flo@ptend=1
    \def\flo@pend{0.92}\flo@calc\flo@pgap{0.68/max(1,\flo@pk-1)}%
    \flo@calc\flo@pmax{min(\flo@pl,0.45*\flo@pgap/\flo@plw)}%
  \else
    \flo@calc\flo@pmax{min(\flo@pl,0.3465/(max(1,\flo@pk-1)*\flo@plw+0.495))}%
    \flo@calc\flo@pterm{min(\flo@pl,1.1*\flo@pmax)}\flo@calc\flo@pend{1-\flo@pterm}%
    \flo@calc\flo@pgap{(\flo@pend-0.23)/max(1,\flo@pk-1)}%
  \fi
  \pgfpathmoveto{\flo@P00}\pgfpathlineto{\flo@P0\flo@pend}\pgfusepath{stroke}%
  \flo@loop{pin}\flo@j{1}{\flo@pk}{%
    \flo@calc\flo@v{0.2+\flo@pgap*(\the\flo@j-1)}%
    \flo@calc\flo@ll{\flo@pmax*(0.72+0.28*sin(180*(\the\flo@j-0.5)/\flo@pk))}%
    \flo@loop{pinside}\flo@n{0}{1}{%
      \flo@range\flo@ang{50}{68}\flo@calc\flo@ang{\flo@ang-14*(\the\flo@j-1)/\flo@pk}\flo@sym\flo@dv{0.015}%
      \begin{pgfscope}%
        \flo@calc\flo@t{\flo@v+\flo@dv}\pgftransformshift{\flo@P0\flo@t}%
        \ifnum\flo@n=0 \pgftransformrotate{\flo@ang}\else\pgftransformrotate{-\flo@ang}\fi
        \pgftransformscale{\flo@ll}\flo@calc\flo@vl@u{\flo@plpt*\flo@ll/28.45276}%
        \flo@range\flo@tp{\flo@lt-0.07}{\flo@lt+0.07}\flo@sleaflet\flo@tp
      \end{pgfscope}}}%
  \ifnum\flo@ptend=1
    \flo@tone{flo@c}{0.22}{flo@ink}\pgfsetstrokecolor{flo@c}\pgfsetlinewidth{0.25pt}%
    \flo@chance{0.4}\ifflo@yes\def\flo@tdn{2}\else\def\flo@tdn{1}\fi
    \flo@loop{ten}\flo@tdi{1}{\flo@tdn}{%
      \begin{pgfscope}\pgftransformshift{\flo@P0\flo@pend}%
        \ifnum\flo@tdn=1 \flo@sym\flo@t{15}\else\flo@range\flo@t{10}{30}\ifnum\flo@tdi=2 \flo@calc\flo@t{-\flo@t}\fi\fi
        \pgftransformrotate{\flo@t}%
        \flo@range\flo@t{0.35}{0.55}\flo@vcurl\flo@t\flo@smoothopen{45}\pgfusepath{stroke}%
      \end{pgfscope}}%
  \else
    \begin{pgfscope}%
      \pgftransformshift{\flo@P0\flo@pend}\pgftransformscale{\flo@pterm}%
      \flo@calc\flo@vl@u{\flo@plpt*\flo@pterm/28.45276}\flo@sleaflet\flo@lt
    \end{pgfscope}%
  \fi}
% twice divided: two or three pairs of pinnae, themselves odd-pinnate, the lowest the
% longest with the most pinnules, and a terminal pinna: a feathery triangle (an
% umbellifer's leaf); #1 the leaf on the page in pt
\def\flo@bipinnate#1{%
  \edef\flo@bpt{#1}\def\flo@ptend{0}%
  \flo@calc\flo@bk{int(min(3,max(2,(\flo@get{leaflets}+1)/3)))}\flo@calc\flo@bl{int(min(7,max(3,\flo@get{leaflets})))}%
  \flo@calc\flo@lt{\flo@lt+0.06}%
  \pgfpathmoveto{\flo@P00}\pgfpathlineto{\flo@P0{0.7}}\pgfusepath{stroke}%
  \flo@loop{bip}\flo@m{1}{\flo@bk}{%
    \flo@calc\flo@bv{0.16+0.44*(\the\flo@m-1)/max(1,\flo@bk-1)}%
    \flo@calc\flo@bs{0.48*(1-0.5*(\the\flo@m-1)/\flo@bk)}%
    \flo@calc\flo@bpn{int(max(2,\flo@bl-\the\flo@m+1))}%
    \flo@loop{bipside}\flo@p{0}{1}{%
      \flo@range\flo@bang{48}{64}\flo@calc\flo@bang{\flo@bang-12*(\the\flo@m-1)/\flo@bk}%
      \begin{pgfscope}%
        \pgftransformshift{\flo@P0\flo@bv}%
        \ifnum\flo@p=0 \pgftransformrotate{\flo@bang}\else\pgftransformrotate{-\flo@bang}\fi
        \pgftransformscale{\flo@bs}\flo@calc\flo@t{\flo@bpt*\flo@bs}%
        \flo@pinnate\flo@t\flo@bpn{0.4}%
      \end{pgfscope}}}%
  \begin{pgfscope}%
    \pgftransformshift{\flo@P0{0.66}}\pgftransformscale{0.34}\flo@calc\flo@t{\flo@bpt*0.34}%
    \flo@calc\flo@bpn{int(max(2,\flo@bl-\flo@bk))}\flo@pinnate\flo@t\flo@bpn{0.4}%
  \end{pgfscope}}
% #2 leaflets from the tip of a petiole, spread wider the more there are, the center one
% the largest, drawn from the outside in; #1 the leaf on the page in pt
\def\flo@palmate#1#2{%
  \edef\flo@plpt{#1}\edef\flo@pk{#2}\flo@range\flo@pp{0.3}{0.38}%
  \pgfpathmoveto{\flo@P00}\pgfpathlineto{\flo@P0\flo@pp}\pgfusepath{stroke}%
  \flo@calc\flo@hs{min(135,20*\flo@pk-10)}%
  \flo@loop{palm}\flo@n{1}{\flo@pk}{%
    \ifodd\flo@n\edef\flo@pj{\the\numexpr(\flo@n+1)/2\relax}\else\edef\flo@pj{\the\numexpr\flo@pk+1-\flo@n/2\relax}\fi
    \flo@calc\flo@f{(\flo@pj-(\flo@pk+1)/2)/max(1,(\flo@pk-1)/2)}%
    \flo@sym\flo@dv{6}\flo@calc\flo@ang{-\flo@f*\flo@hs+\flo@dv}\flo@calc\flo@ll{(1-\flo@pp)*(1-0.45*\flo@f*\flo@f)}%
    \begin{pgfscope}%
      \pgftransformshift{\flo@P0\flo@pp}\pgftransformrotate{\flo@ang}\pgftransformscale{\flo@ll}%
      \flo@calc\flo@vl@u{\flo@plpt*\flo@ll/28.45276}%
      \flo@range\flo@tp{\flo@lt-0.06}{\flo@lt+0.06}\flo@sleaflet\flo@tp
    \end{pgfscope}}}
% three leaflets, two to the sides and a larger one at the end on a short stalk of its own;
% #1 the leaf on the page in pt
\def\flo@trifoliate#1{%
  \edef\flo@plpt{#1}\flo@range\flo@pp{0.3}{0.4}\flo@range\flo@pst{0}{0.1}%
  \flo@calc\flo@t{\flo@pp+\flo@pst}\pgfpathmoveto{\flo@P00}\pgfpathlineto{\flo@P0\flo@t}\pgfusepath{stroke}%
  \flo@loop{tri}\flo@n{0}{2}{%
    \ifnum\flo@n<2
      \flo@range\flo@ang{48}{68}\ifnum\flo@n=1 \flo@calc\flo@ang{-\flo@ang}\fi
      \flo@calc\flo@ll{0.8*(1-\flo@pp)}\edef\flo@pv{\flo@pp}%
    \else\def\flo@ang{0}\flo@calc\flo@ll{1-\flo@pp-\flo@pst}\flo@calc\flo@pv{\flo@pp+\flo@pst}\fi
    \begin{pgfscope}%
      \pgftransformshift{\flo@P0\flo@pv}\pgftransformrotate{\flo@ang}\pgftransformscale{\flo@ll}%
      \flo@calc\flo@vl@u{\flo@plpt*\flo@ll/28.45276}%
      \flo@range\flo@tp{\flo@lt-0.06}{\flo@lt+0.06}\flo@sleaflet\flo@tp
    \end{pgfscope}}}

% ---------------------------------------------------------------- stems, buds, fruits
\newcount\flo@ka \newcount\flo@kb \newcount\flo@kc
% a tapered stem from (#1,#2) to (#3,#4), bowed sideways by #5, widths #6 to #7
\def\flo@taper#1#2#3#4#5#6#7{%
  \flo@calc\flo@ta{#1-(#6)/2}\flo@calc\flo@tb{#1+(#6)/2}%
  \flo@calc\flo@tc{#3-(#7)/2}\flo@calc\flo@td{#3+(#7)/2}%
  \flo@calc\flo@tx{(2*(#1)+(#3))/3+(#5)}\flo@calc\flo@ty{(2*(#2)+(#4))/3}%
  \flo@calc\flo@tu{((#1)+2*(#3))/3+(#5)}\flo@calc\flo@tv{((#2)+2*(#4))/3}%
  \flo@calc\flo@te{\flo@tx-(#6)/2}\flo@calc\flo@tf{\flo@tu-(#7)/2}%
  \flo@calc\flo@tg{\flo@tu+(#7)/2}\flo@calc\flo@th{\flo@tx+(#6)/2}%
  \pgfpathmoveto{\flo@P\flo@ta{#2}}%
  \pgfpathcurveto{\flo@P\flo@te\flo@ty}{\flo@P\flo@tf\flo@tv}{\flo@P\flo@tc{#4}}%
  \pgfpathlineto{\flo@P\flo@td{#4}}%
  \pgfpathcurveto{\flo@P\flo@tg\flo@tv}{\flo@P\flo@th\flo@ty}{\flo@P\flo@tb{#2}}%
  \pgfpathclose}
% a thin stalk (a stroke) from (#1,#2) to (#3,#4), bowed by #5
\def\flo@stalk#1#2#3#4#5{%
  \flo@calc\flo@tx{((#1)+(#3))/2+(#5)}\flo@calc\flo@ty{((#2)+(#4))/2}%
  \pgfpathmoveto{\flo@P{#1}{#2}}\pgfpathcurveto{\flo@P\flo@tx\flo@ty}{\flo@P\flo@tx\flo@ty}{\flo@P{#3}{#4}}%
  \pgfusepath{stroke}}
% the fruit along +y, length 1, in v1.3's hand, by the species' fruit; \flo@fu its cm per
% unit (for line widths). A hip is flora's bud turned over in the accent, its sepals a
% crown on top; a capsule the bud upright with pale seams; pods, mericarps and achenes
% flora's leaflet blade; a pappus a seed clock (flora.seedhead's rays and tufts)
\def\flo@fruit{%
  \edef\flo@fr{\flo@get{fruit}}\def\flo@vf@tone{}%
  \def\flo@tmp{hip}\ifx\flo@fr\flo@tmp
    \begin{pgfscope}\def\flo@rampname{flo@aramp}\def\flo@vf@tone{0.36}%
      \pgftransformshift{\flo@P0{1}}\pgftransformrotate{180}\flo@vbud\flo@fu\end{pgfscope}%
  \else\def\flo@tmp{capsule}\ifx\flo@fr\flo@tmp
    \begin{pgfscope}\def\flo@vf@tone{0.38}\flo@vbud\flo@fu
      \def\flo@twa{0.025}\def\flo@twb{0.004}%
      \flo@vfill{white}{0.55}{0}{\flo@vtaper{-0.06}{0.15}{-0.1}{0.4}{-0.08}{0.7}{-0.02}{0.95}}%
      \flo@vfill{white}{0.4}{0}{\flo@vtaper{0.06}{0.15}{0.1}{0.4}{0.08}{0.7}{0.02}{0.95}}\end{pgfscope}%
  \else\def\flo@tmp{pappus}\ifx\flo@fr\flo@tmp
    \begin{pgfscope}\pgftransformshift{\flo@P0{0.5}}\flo@vclock\end{pgfscope}%
  \else
    % a pod (silique), a round pod (silicle), paired mericarps, or a seed: leaflet blades
    \def\flo@vl@tone{}\edef\flo@vl@u{\flo@fu}%
    \def\flo@tmp{silique}\ifx\flo@fr\flo@tmp
      \def\flo@vl@W{0.07}\flo@range\flo@vl@tone{0.3}{0.4}\flo@vleaflet
    \else\def\flo@tmp{silicle}\ifx\flo@fr\flo@tmp
      \begin{pgfscope}\pgftransformscale{0.6}\def\flo@vl@W{0.32}\flo@range\flo@vl@tone{0.42}{0.52}\flo@vleaflet\end{pgfscope}%
    \else\def\flo@tmp{schizocarp}\ifx\flo@fr\flo@tmp
      \begin{pgfscope}\pgftransformscale{0.7}\pgftransformrotate{12}\def\flo@vl@W{0.18}\flo@vleaflet\end{pgfscope}%
      \begin{pgfscope}\pgftransformscale{0.7}\pgftransformrotate{-12}\def\flo@vl@W{0.18}\flo@vleaflet\end{pgfscope}%
    \else
      \begin{pgfscope}\pgftransformscale{0.55}\def\flo@vl@W{0.22}\flo@range\flo@vl@tone{0.12}{0.2}\flo@vleaflet\end{pgfscope}%
    \fi\fi\fi
  \fi\fi\fi}
% a seed clock (flora.seedhead), radius 1 around the origin: hairline rays, each ending
% in a tuft, a gap where seeds have gone, a small dark head
\def\flo@vclock{%
  \flo@int\flo@cn{18}{26}\flo@range\flo@gone{0}{360}\flo@spk={}%
  \flo@loop{clk}\flo@Gc{1}{\flo@cn}{%
    \flo@sym\flo@t{0.3}\flo@calc\flo@a{360*(\the\flo@Gc+\flo@t)/\flo@cn}%
    \flo@rnd\flo@t\flo@calc\flo@t{abs(mod(\flo@a-\flo@gone+540,360)-180)<30 && \flo@t<0.7 ? 0 : 1}%
    \flo@range\flo@L{0.72}{0.86}%
    \ifdim\flo@t pt>0.5pt
      \flo@calc\flo@xa{0.1*cos(\flo@a)}\flo@calc\flo@ya{0.1*sin(\flo@a)}%
      \flo@calc\flo@xb{\flo@L*cos(\flo@a)}\flo@calc\flo@yb{\flo@L*sin(\flo@a)}%
      \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@ya}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xb}{\flo@yb}}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}%
      \flo@loop{tft}\flo@Gd{-2}{2}{%
        \flo@calc\flo@b{\flo@a+18*\the\flo@Gd}%
        \flo@calc\flo@xa{\flo@xb+0.16*cos(\flo@b)}\flo@calc\flo@ya{\flo@yb+0.16*sin(\flo@b)}%
        \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xb}{\flo@yb}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xa}{\flo@ya}}}%
        \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \fi}%
  \flo@vtone{flo@c}{0.16}\flo@vstroke{flo@c}{0.22}{0.85}{0}{\the\flo@spk}%
  \flo@vtone{flo@c}{0.12}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.13pt}}}

% ================================================================ plants in v1.3's manner
% The plant pics draw in centimeters, as florilegium-grow.lua lays out the margin, so that
% stems, leaves and flowers keep v1.3's sizes whatever the plant's height. A plant is a wavy
% main stem (a tapered ribbon), leaves at its nodes, branches that arc out to flowers,
% clusters, buds and curls, and its own inflorescence at the top. Several plants from one
% root are drawn a layer at a time (a pale ghost, stems, leaves, sprays, flowers), so that a
% flower lies over the next plant's leaves, as in the margin.
\newcount\flo@Ga \newcount\flo@Gb \newcount\flo@Gc \newcount\flo@Gd \newcount\flo@Np \newcount\flo@Ge \newcount\flo@Gf
\newif\ifflo@draw
% the layers, numbered as in florilegium-grow.lua; \flo@at{layer}: draw on that layer's walk
\def\flo@Lghost{1}\def\flo@Lstem{2}\def\flo@Lleaf{3}\def\flo@Lairy{4}\def\flo@Lbloom{5}
\def\flo@layer{0}
\def\flo@at#1{\ifnum\flo@layer=#1 \flo@drawtrue\else\flo@drawfalse\fi}

% ---------------------------------------------------------------- one stream per organ
% An organ draws from a stream of its own, started from one number of the plant's layout
% stream, which then goes on where it left off: what an organ draws never moves the layout,
% and each walk of a plant (one per layer) lays it out the same. The new state is the
% layout's, half the generator's cycle away; pgf's own seed parser stops at 16383.
\def\flo@seedorgan{\pgfmathgeneratepseudorandomnumber
  \edef\flo@os{\the\numexpr\ifnum\pgfmath@rnd@z>1073741823 \pgfmath@rnd@z-1073741823\else\pgfmath@rnd@z+1073741823\fi\relax}}
\def\flo@drawstate#1{\xdef\pgfmath@rnd@z{#1}\pgfmathgeneratepseudorandomnumber\pgfmathgeneratepseudorandomnumber}
\def\flo@organ#1{\let\flo@savez\pgfmath@rnd@z\flo@drawstate\flo@os
  \begin{pgfscope}#1\end{pgfscope}\global\let\pgfmath@rnd@z\flo@savez}

% ---------------------------------------------------------------- stems (flora.stem)
% an open Catmull-Rom curve through points 1..#1 of flo@X/Y (ink.smooth, open)
\def\flo@smoothopen#1{%
  \edef\flo@N{\the\numexpr#1\relax}%
  \pgfpathmoveto{\flo@P{\flo@x1}{\flo@y1}}%
  \flo@loop{so}\flo@i{1}{\flo@N-1}{%
    \edef\flo@ia{\the\numexpr\ifnum\flo@i=1 1\else\flo@i-1\fi\relax}%
    \edef\flo@ib{\the\numexpr\flo@i+1\relax}%
    \edef\flo@ic{\the\numexpr\ifnum\flo@ib=\flo@N\space\flo@N\else\flo@ib+1\fi\relax}%
    \flo@calc\flo@ca{\flo@x{\the\flo@i}+(\flo@x\flo@ib-(\flo@x\flo@ia))/6}%
    \flo@calc\flo@cb{\flo@y{\the\flo@i}+(\flo@y\flo@ib-(\flo@y\flo@ia))/6}%
    \flo@calc\flo@cc{\flo@x\flo@ib-(\flo@x\flo@ic-(\flo@x{\the\flo@i}))/6}%
    \flo@calc\flo@cd{\flo@y\flo@ib-(\flo@y\flo@ic-(\flo@y{\the\flo@i}))/6}%
    \pgfpathcurveto{\flo@P\flo@ca\flo@cb}{\flo@P\flo@cc\flo@cd}{\flo@P{\flo@x\flo@ib}{\flo@y\flo@ib}}}}
% flora.stem: along points 1..#1 of flo@X/Y (cm), full width #2 at the start to #3 at the
% end, tone #4: a filled ribbon, or a stroke where that would be under 0.7 bp wide
\def\flo@vstem#1#2#3#4{%
  \edef\flo@sn{\the\numexpr#1\relax}%
  \flo@calc\flo@t{((#2)+(#3))/2*28.3465}%
  \flo@vtone{flo@c}{#4}%
  \ifdim\flo@t pt<0.7pt
    \flo@vstroke{flo@c}{\flo@t}{1}{0}{\flo@smoothopen\flo@sn}%
  \else
    \flo@normals\flo@sn
    \def\flo@acc{0}\expandafter\def\csname flo@S1\endcsname{0}%
    \flo@loop{vsa}\flo@kb{2}{\flo@sn}{%
      \edef\flo@ia{\the\numexpr\flo@kb-1\relax}%
      \flo@calc\flo@acc{\flo@acc+veclen(\flo@x{\the\flo@kb}-(\flo@x\flo@ia),\flo@y{\the\flo@kb}-(\flo@y\flo@ia))}%
      \expandafter\let\csname flo@S\the\flo@kb\endcsname\flo@acc}%
    \flo@loop{vsr}\flo@kb{1}{\flo@sn}{%
      \flo@calc\flo@w{((#2)+((#3)-(#2))*\csname flo@S\the\flo@kb\endcsname/\flo@acc)/2}%
      \flo@calc\flo@xl{\flo@x{\the\flo@kb}+\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
      \flo@calc\flo@yl{\flo@y{\the\flo@kb}+\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
      \flo@calc\flo@xr{\flo@x{\the\flo@kb}-\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
      \flo@calc\flo@yr{\flo@y{\the\flo@kb}-\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
      \expandafter\let\csname flo@RX\the\flo@kb\endcsname\flo@xl\expandafter\let\csname flo@RY\the\flo@kb\endcsname\flo@yl
      \expandafter\let\csname flo@QX\the\flo@kb\endcsname\flo@xr\expandafter\let\csname flo@QY\the\flo@kb\endcsname\flo@yr}%
    \flo@loop{vso}\flo@kb{1}{\flo@sn}{%
      \flo@put{\the\flo@kb}{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}%
      \flo@put{\the\numexpr2*\flo@sn+1-\flo@kb\relax}{\csname flo@QX\the\flo@kb\endcsname}{\csname flo@QY\the\flo@kb\endcsname}}%
    \flo@smoothprep{\the\numexpr2*\flo@sn\relax}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}%
  \fi}
% a stem along the cubic \flo@bxa,\flo@bya .. \flo@bxd,\flo@byd, widths #1 to #2 (cm), tone
% 0.07: ink.taper's two Béziers, or a stroke where under 0.7 bp
\def\flo@cubicstem#1#2{%
  \flo@calc\flo@t{((#1)+(#2))/2*28.3465}\flo@vtone{flo@c}{0.07}%
  \ifdim\flo@t pt<0.7pt
    \flo@vstroke{flo@c}{\flo@t}{1}{0}{\pgfpathmoveto{\flo@P\flo@bxa\flo@bya}%
      \pgfpathcurveto{\flo@P\flo@bxb\flo@byb}{\flo@P\flo@bxc\flo@byc}{\flo@P\flo@bxd\flo@byd}}%
  \else
    \edef\flo@twa{#1}\edef\flo@twb{#2}%
    \flo@vfill{flo@c}{1}{0}{\flo@vtaper\flo@bxa\flo@bya\flo@bxb\flo@byb\flo@bxc\flo@byc\flo@bxd\flo@byd}%
  \fi}

% ---------------------------------------------------------------- branches (flora.branch_path)
% from the stem point (#1,#2), whose stem runs along (#3,#4), to (#5,#6), arriving along
% (#7,#8): it leaves along the stem (or against it, if the target lies behind) turned 28..48
% degrees toward the target. One draw. The cubic: \flo@bxa,\flo@bya .. \flo@bxd,\flo@byd
\def\flo@branchpath#1#2#3#4#5#6#7#8{%
  \flo@calc\flo@dx{(#5)-(#1)}\flo@calc\flo@dy{(#6)-(#2)}\flo@calc\flo@d{veclen(\flo@dx,\flo@dy)}%
  \flo@calc\flo@t{(#3)*\flo@dx+(#4)*\flo@dy<-0.3*\flo@d ? -1 : 1}%
  \flo@calc\flo@tx{\flo@t*(#3)}\flo@calc\flo@ty{\flo@t*(#4)}%
  \flo@range\flo@turn{28}{48}%
  \flo@calc\flo@turn{(\flo@tx*\flo@dy-\flo@ty*\flo@dx>0 ? 1 : -1)*\flo@turn}%
  \flo@calc\flo@ox{\flo@tx*cos(\flo@turn)-\flo@ty*sin(\flo@turn)}%
  \flo@calc\flo@oy{\flo@tx*sin(\flo@turn)+\flo@ty*cos(\flo@turn)}%
  \edef\flo@bxa{#1}\edef\flo@bya{#2}\edef\flo@bxd{#5}\edef\flo@byd{#6}%
  \flo@calc\flo@bxb{(#1)+\flo@ox*\flo@d*0.45}\flo@calc\flo@byb{(#2)+\flo@oy*\flo@d*0.45}%
  \flo@calc\flo@bxc{(#5)-(#7)*\flo@d*0.4}\flo@calc\flo@byc{(#6)-(#8)*\flo@d*0.4}}
% the point at #1 on that cubic, \flo@cx,\flo@cy, and the direction there in degrees, \flo@ca
\def\flo@cubicat#1{%
  \flo@calc\flo@cu{1-(#1)}\edef\flo@cv{#1}%
  \flo@calc\flo@cwa{\flo@cu*\flo@cu*\flo@cu}\flo@calc\flo@cwb{3*\flo@cu*\flo@cu*\flo@cv}%
  \flo@calc\flo@cwc{3*\flo@cu*\flo@cv*\flo@cv}\flo@calc\flo@cwd{\flo@cv*\flo@cv*\flo@cv}%
  \flo@calc\flo@cx{\flo@cwa*\flo@bxa+\flo@cwb*\flo@bxb+\flo@cwc*\flo@bxc+\flo@cwd*\flo@bxd}%
  \flo@calc\flo@cy{\flo@cwa*\flo@bya+\flo@cwb*\flo@byb+\flo@cwc*\flo@byc+\flo@cwd*\flo@byd}%
  \flo@calc\flo@cwa{\flo@cu*\flo@cu}\flo@calc\flo@cwb{2*\flo@cu*\flo@cv}\flo@calc\flo@cwc{\flo@cv*\flo@cv}%
  \flo@calc\flo@dx{\flo@cwa*(\flo@bxb-\flo@bxa)+\flo@cwb*(\flo@bxc-\flo@bxb)+\flo@cwc*(\flo@bxd-\flo@bxc)}%
  \flo@calc\flo@dy{\flo@cwa*(\flo@byb-\flo@bya)+\flo@cwb*(\flo@byc-\flo@byb)+\flo@cwc*(\flo@byd-\flo@byc)}%
  \flo@calc\flo@ca{atan2(\flo@dy,\flo@dx)}}

% ---------------------------------------------------------------- flowers, buds, clusters
% one flower of the species at the origin, diameter #1 cm, at stage #2: below 0.3 a bud,
% above 1.15 its fruit, opening in between, past its best above 1 (paler and a little
% smaller as it fades). How it is seen follows its form and how it is held (\flo@bview):
% face on, at a tilt, from behind with its calyx, or in profile (bells, urns, tubes,
% trumpets, and flat-faced tubes held sideways)
\def\flo@bloom#1#2{%
  \edef\flo@bd{#1}\edef\flo@bst{#2}\flo@stone\flo@bview
  \ifdim\flo@bst pt<0.3pt
    \flo@calc\flo@oarg{0.55*\flo@bd}%
    \begin{pgfscope}\ifx\flo@vw\flo@Vface\else\pgftransformrotate{\flo@bturn}\fi
      \pgftransformscale{\flo@oarg}\flo@vbud\flo@oarg\end{pgfscope}%
  \else\ifdim\flo@bst pt>1.15pt
    \flo@calc\flo@fu{0.35*\flo@bd}%
    \begin{pgfscope}\pgftransformscale{\flo@fu}\flo@fruit\end{pgfscope}%
  \else
    \flo@sym\flo@t{30}\flo@calc\flo@bd{\flo@bd*min(1,0.55+(\flo@bst-0.3)*0.9)}%
    \ifdim\flo@bst pt>1pt \flo@calc\flo@bd{\flo@bd*(1-0.8*(\flo@bst-1))}\fi
    \begin{pgfscope}\ifx\flo@vw\flo@Vface\else\pgftransformrotate{\flo@bturn}\fi
      \ifdim\flo@bst pt>1pt \flo@calc\flo@lift{1-(1-\flo@lift)*(1-3*(\flo@bst-1))}\fi
      \ifx\flo@vw\flo@Vtube
        \flo@calc\flo@oarg{0.8*\flo@bd}\pgftransformscale{\flo@oarg}\flo@vtube\flo@oarg{}%
      \else\ifx\flo@vw\flo@Vtrumpet
        \flo@calc\flo@oarg{0.62*\flo@bd}\pgftransformscale{\flo@oarg}\flo@vtube\flo@oarg{lilytube}%
      \else\ifx\flo@vw\flo@Vturk
        \flo@calc\flo@oarg{0.42*\flo@bd}\pgftransformscale{\flo@oarg}\flo@vturkscap\flo@oarg
      \else\ifx\flo@vw\flo@Vsalver
        \pgftransformscale{\flo@bd}\flo@vsalver\flo@bd
      \else\ifx\flo@vw\flo@Vpea
        \flo@calc\flo@oarg{0.8*\flo@bd}\pgftransformscale{\flo@oarg}%
        \ifdim\flo@bturn pt<0pt \pgftransformxscale{-1}\fi\flo@vpea\flo@oarg
      \else\ifx\flo@vw\flo@Vlips
        \let\flo@oarg\flo@bd\pgftransformscale{\flo@oarg}%
        \ifdim\flo@bturn pt<0pt \pgftransformxscale{-1}\fi\flo@vlips\flo@oarg
      \else\ifx\flo@vw\flo@Vorchid
        \flo@upright\flo@calc\flo@oarg{0.4*\flo@t}\pgftransformrotate{\flo@oarg}%
        \flo@range\flo@oarg{0.75}{0.95}\pgftransformxscale{\flo@oarg}%
        \pgftransformscale{\flo@bd}\flo@vorchid\flo@bd
      \else\ifx\flo@vw\flo@Vspur
        \flo@calc\flo@oarg{0.75*\flo@bd}\pgftransformscale{\flo@oarg}\flo@vaquilegia\flo@oarg
      \else
        \def\flo@ys{1}%
        \ifx\flo@vw\flo@Vtilt\flo@range\flo@ys{0.5}{0.7}\fi
        \ifx\flo@vw\flo@Vback\flo@range\flo@ys{0.55}{0.75}\flo@calc\flo@lift{1-(1-\flo@lift)*0.85}\fi
        \ifdim\flo@ys pt<1pt
          \flo@calc\flo@oarg{0.12*\flo@bd}\pgftransformshift{\flo@P0\flo@oarg}\pgftransformyscale{\flo@ys}\fi
        \def\flo@tmp{iris}\ifx\flo@fm\flo@tmp\flo@upright\flo@calc\flo@t{0.6*\flo@t}\fi
        \pgftransformrotate{\flo@t}%
        \ifx\flo@fm\flo@tmp\flo@range\flo@oarg{0.72}{1}\pgftransformxscale{\flo@oarg}\fi
        \pgftransformscale{\flo@bd}%
        \flo@calc\flo@oarg{\flo@bd*28.45276}\flo@sflower\flo@oarg
        \ifx\flo@vw\flo@Vback\flo@vcalyx\fi
      \fi\fi\fi\fi\fi\fi\fi\fi
    \end{pgfscope}%
  \fi\fi}
% how a flower of the species is seen, \flo@vw: face (held erect), tilt (sideways), back
% (nodding), lily (a lily held sideways or nodding: flora's lily is drawn at a tilt
% already), tube (bells, urns, tubes and trumpets, always in profile), salver (a
% flat-faced tube held sideways or nodding), pea or lips (pea and two-lipped flowers,
% always in profile, their upper side toward the way they turn), orchid (face on, upright on
% the page, \flo@upright, leaning a little) or spur (a columbine held
% sideways or nodding, in profile); and how far it turns from its stalk,
% \flo@bturn degrees: a little for an erect tube, 50 to 80 when held sideways, 100 to 140
% when it nods, toward \flo@bside (1 its stalk's left, -1 its right; empty: one draw);
% in a head (\flo@bfan 1), where each flower already points away from the center, 5 to 25
% stand the current frame upright on the page (+y up), keeping its origin, its scale (the
% geometric mean of its axes') and its handedness: for flowers with an up and a down, an
% iris or an orchid, whichever way their stalk points. (No determinant: pgfmath overflows
% above 16384.) Its temporaries (\flo@ura to \flo@ury) are its own.
\def\flo@upright{%
  \pgfgettransformentries\flo@ura\flo@urb\flo@urc\flo@urd\flo@urx\flo@ury
  \flo@calc\flo@urp{veclen(\flo@ura,\flo@urb)}\flo@calc\flo@urq{veclen(\flo@urc,\flo@urd)}%
  \flo@calc\flo@urs{sqrt(\flo@urp)*sqrt(\flo@urq)}%
  \flo@calc\flo@urt{(\flo@ura/\flo@urp)*(\flo@urd/\flo@urq)-(\flo@urb/\flo@urp)*(\flo@urc/\flo@urq)}%
  \ifdim\flo@urt pt<0pt \flo@calc\flo@ura{-\flo@urs}\else\let\flo@ura\flo@urs\fi
  \pgfsettransformentries\flo@ura{0}{0}\flo@urs\flo@urx\flo@ury}
\def\flo@Vface{face}\def\flo@Vtilt{tilt}\def\flo@Vback{back}\def\flo@Vlily{lily}\def\flo@Vtube{tube}
\def\flo@Vturk{turk}\def\flo@Vtrumpet{trumpet}\def\flo@Vsalver{salver}\def\flo@Vpea{pea}\def\flo@Vlips{lips}\def\flo@Vorchid{orchid}\def\flo@Vspur{spur}\def\flo@Oerect{erect}\def\flo@Onod{nodding}\def\flo@bside{}
\def\flo@bfan{0}
\def\flo@bview{%
  \edef\flo@or{\flo@get{orient}}\edef\flo@fm{\flo@get{form}}\def\flo@bturn{0}%
  \ifx\flo@or\flo@Oerect\def\flo@vw{face}\else\ifx\flo@or\flo@Onod\def\flo@vw{back}\else\def\flo@vw{tilt}\fi
    \def\flo@tmp{lily}\ifx\flo@fm\flo@tmp\def\flo@vw{lily}%
      \ifdim\flo@get{reflex}pt<-40pt \def\flo@vw{turk}\else\ifdim\flo@get{cup}pt>0.6pt \def\flo@vw{trumpet}\fi\fi\fi
    \def\flo@tmp{salverform}\ifx\flo@fm\flo@tmp\def\flo@vw{salver}\fi\fi
  \def\flo@tmp{campanulate}\ifx\flo@fm\flo@tmp\def\flo@vw{tube}\fi
  \def\flo@tmp{urceolate}\ifx\flo@fm\flo@tmp\def\flo@vw{tube}\fi
  \def\flo@tmp{tubular}\ifx\flo@fm\flo@tmp\def\flo@vw{tube}\fi
  \def\flo@tmp{funnelform}\ifx\flo@fm\flo@tmp\def\flo@vw{tube}\fi
  \def\flo@tmp{papilionaceous}\ifx\flo@fm\flo@tmp\def\flo@vw{pea}\fi
  \def\flo@tmp{bilabiate}\ifx\flo@fm\flo@tmp\def\flo@vw{lips}\fi
  \def\flo@tmp{orchid}\ifx\flo@fm\flo@tmp\def\flo@vw{orchid}\fi
  \ifx\flo@or\flo@Oerect\else\def\flo@tmp{spurred}\ifx\flo@fm\flo@tmp\def\flo@vw{spur}\fi\fi
  \ifx\flo@or\flo@Oerect
    \ifx\flo@vw\flo@Vtube\flo@sym\flo@bturn{15}\fi
  \else
    \ifx\flo@bside\pgfutil@empty\flo@chance{0.5}\ifflo@yes\def\flo@bsd{1}\else\def\flo@bsd{-1}\fi
    \else\let\flo@bsd\flo@bside\fi
    \ifnum\flo@bfan=1 \flo@range\flo@t{5}{25}%
    \else\ifx\flo@or\flo@Onod\flo@range\flo@t{100}{140}\else\flo@range\flo@t{50}{80}\fi\fi
    \flo@calc\flo@bturn{\flo@bsd*\flo@t}%
  \fi}
% the calyx of a flower seen from behind, in its diameter-1 units: sepals radiating from
% the stalk, as many as its parts (three to six)
\def\flo@vcalyx{%
  \flo@calc\flo@bcn{int(max(3,min(6,\flo@get{merosity})))}\flo@range\flo@bca{0}{360}%
  \def\flo@twa{0.08}\def\flo@twb{0.004}\flo@vtone{flo@c}{0.1}%
  \flo@loop{bcx}\flo@ka{1}{\flo@bcn}{%
    \flo@sym\flo@t{8}\flo@calc\flo@a{\flo@bca+360*\the\flo@ka/\flo@bcn+\flo@t}%
    \flo@range\flo@t{0.26}{0.34}%
    \flo@calc\flo@xa{\flo@t*cos(\flo@a)}\flo@calc\flo@ya{\flo@t*sin(\flo@a)}%
    \flo@calc\flo@xb{0.4*\flo@xa-0.06*\flo@ya}\flo@calc\flo@yb{0.4*\flo@ya+0.06*\flo@xa}%
    \flo@calc\flo@xc{0.75*\flo@xa-0.04*\flo@ya}\flo@calc\flo@yc{0.75*\flo@ya+0.04*\flo@xa}%
    \flo@vfill{flo@c}{0.95}{0}{\flo@vtaper{0}{0}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xa\flo@ya}}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.05pt}}}
% the species' corolla in profile, from its base at the origin toward +y, about 1 long:
% a bell, an urn, a tube or a trumpet (#2 empty: the species' form; salvertube: a flat-faced
% flower's tube), drawn as flora's bell is (body and lobed rim one shape, mottle, streaks
% along it, a shaded side, a pooled edge), bent a little, stamens that stand out, its sepals at the base; #1 cm per unit,
% tone \flo@vf@tone (empty: drawn). Its half-width at v (0 base, 1 the rim's sinuses) is
% \flo@tua+\flo@tub*v^\flo@tuc+\flo@tuw*sin(180*min(1,v/0.92)^0.85)+\flo@tuh*(1-(1-v)^2.5)+\flo@tue*v^6:
% a bell has a shoulder (\flo@tuh) and a flaring rim (\flo@tue), its lobes barely past it
\def\flo@vtube#1#2{%
  \edef\flo@tufm{#2}\ifx\flo@tufm\pgfutil@empty\edef\flo@tufm{\flo@get{form}}\fi
  \def\flo@tua{0.1}\def\flo@tub{0.24}\def\flo@tuc{1.3}\def\flo@tuw{0}\def\flo@tue{0}\def\flo@tuh{0}%
  \def\flo@tuL{0.85}\def\flo@tut{0.14}\def\flo@tusep{1}%
  \flo@range\flo@tuf{0.06}{0.12}\flo@calc\flo@tun{int(\flo@get{merosity}/2+1.5)}\ifnum\flo@tun=1 \def\flo@tun{0}\fi\flo@sym\flo@tubd{0.08}%
  \def\flo@tmp{campanulate}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.06}\def\flo@tub{0}\def\flo@tuh{0.26}\def\flo@tue{0.07}\flo@calc\flo@tuf{0.35*\flo@tuf}\fi
  \def\flo@tmp{urceolate}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.09}\def\flo@tub{0}\def\flo@tuw{0.25}\def\flo@tuL{0.8}\def\flo@tut{0.08}\def\flo@tuf{0.07}\fi
  \def\flo@tmp{tubular}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.07}\def\flo@tub{0.07}\def\flo@tuc{1.5}\def\flo@tuw{0.025}\def\flo@tue{0.035}%
    \def\flo@tuL{0.95}\def\flo@tut{0.08}\def\flo@tuf{0.05}\flo@calc\flo@tubd{1.8*\flo@tubd}\fi
  \def\flo@tmp{funnelform}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.05}\def\flo@tub{0.4}\def\flo@tuc{2.4}\def\flo@tuL{0.85}\def\flo@tut{0.1}\def\flo@tuf{0.1}\fi
  \def\flo@tmp{lilytube}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.045}\def\flo@tub{0.32}\def\flo@tuc{2.8}\def\flo@tuL{0.95}\def\flo@tut{0.16}\def\flo@tuf{0.08}\def\flo@tun{4}\fi
  \def\flo@tmp{salvertube}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.035}\def\flo@tub{0.02}\def\flo@tuc{1}\def\flo@tuL{0.55}\def\flo@tun{0}\fi
  \def\flo@tmp{liptube}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.04}\def\flo@tub{0.06}\def\flo@tuc{1.6}\let\flo@tuL\flo@lpL\def\flo@tun{0}\let\flo@tubd\flo@lpb
    \def\flo@tusep{0}\fi
  \def\flo@tmp{aqcup}\ifx\flo@tufm\flo@tmp
    \def\flo@tua{0.12}\def\flo@tub{0.04}\def\flo@tuc{1}\def\flo@tuL{0.32}\def\flo@tut{0.08}\def\flo@tusep{0}\fi
  \edef\flo@t{\flo@get{apex}}\def\flo@tutk{0.7}%
  \def\flo@tmp{rounded}\ifx\flo@t\flo@tmp\def\flo@tutk{1}\flo@calc\flo@tut{0.7*\flo@tut}\fi
  \def\flo@tmp{emarginate}\ifx\flo@t\flo@tmp\def\flo@tutk{1}\flo@calc\flo@tut{0.7*\flo@tut}\fi
  % the outline: the right side up, the lobes along the rim from right to left, the left down;
  % a large one's sides waver as a petal's edge does
  \ifdim#1pt>0.45pt \flo@vfbm\def\flo@tuwob{0.015}\else\def\flo@tuwob{0}\fi
  \flo@loop{tur}\flo@kb{0}{10}{%
    \flo@calc\flo@v{\the\flo@kb/10}\flo@turad\flo@v\flo@calc\flo@tuy{\flo@tuL*\flo@v}%
    \flo@calc\flo@xa{\flo@tur+\flo@tubd*\flo@v*\flo@v}%
    \ifdim\flo@tuwob pt>0pt \flo@calc\flo@tuwx{\flo@v*6}\flo@vwave\flo@tuwx\flo@calc\flo@xa{\flo@xa+\flo@tuwob*\flo@wv*\flo@v}\fi
    \flo@put{\the\numexpr\flo@kb+1\relax}\flo@xa\flo@tuy}%
  \flo@calc\flo@tuR{\flo@tur+\flo@tuf}\def\flo@tuk{11}%
  \ifnum\flo@tun>0
    \flo@loop{tut}\flo@kc{1}{\flo@tun}{%
      \flo@calc\flo@v{1-2*(\the\flo@kc-1)/(\flo@tun-1)}%
      \flo@sym\flo@t{0.03}\flo@calc\flo@xa{\flo@tuR*\flo@v+\flo@tubd+\flo@t}%
      \flo@sym\flo@t{0.02}\flo@calc\flo@ya{\flo@tuL+\flo@tut*(1-0.55*\flo@v*\flo@v)+\flo@t}%
      \edef\flo@tuk{\the\numexpr\flo@tuk+1\relax}\flo@put\flo@tuk\flo@xa\flo@ya
      \ifnum\flo@kc<\flo@tun
        \flo@calc\flo@xa{\flo@tuR*0.85*(\flo@v-1/(\flo@tun-1))+\flo@tubd}%
        \flo@sym\flo@t{0.015}\flo@calc\flo@ya{\flo@tuL+0.025+\flo@t}%
        \edef\flo@tuk{\the\numexpr\flo@tuk+1\relax}\flo@put\flo@tuk\flo@xa\flo@ya
      \fi}%
  \fi
  \flo@loop{tul}\flo@kb{0}{10}{%
    \flo@calc\flo@v{(10-\the\flo@kb)/10}\flo@turad\flo@v\flo@calc\flo@tuy{\flo@tuL*\flo@v}\flo@calc\flo@tur{\flo@tubd*\flo@v*\flo@v-\flo@tur}%
    \ifdim\flo@tuwob pt>0pt \flo@calc\flo@tuwx{\flo@v*6+40}\flo@vwave\flo@tuwx\flo@calc\flo@tur{\flo@tur+\flo@tuwob*\flo@wv*\flo@v}\fi
    \edef\flo@tuk{\the\numexpr\flo@tuk+1\relax}\flo@put\flo@tuk\flo@tur\flo@tuy}%
  \flo@smoothprepT\flo@tuk\flo@tutk\flo@keep{tb}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tuq{0.3}{0.4}\else\edef\flo@tuq{\flo@vf@tone}\fi
  \flo@vtone{flo@c}{\flo@tuq}\flo@vfill{flo@c}{1}{0}{\flo@kept{tb}}%
  \ifdim#1pt>0.15pt
    \begin{pgfscope}\flo@kept{tb}\pgfusepath{clip}%
      \flo@calc\flo@tuqa{\flo@tuq-0.2}\flo@calc\flo@tuqb{\flo@tuq+0.2}\flo@calc\flo@tuy{\flo@tuL+0.2}%
      \ifdim#1pt>0.45pt \flo@vmottle{-0.5}{0}{0.5}\flo@tuy{10}{0.12}\flo@tuqa\flo@tuqb{10}%
      \else\flo@vmottle{-0.5}{0}{0.5}\flo@tuy{5}{0.12}\flo@tuqa\flo@tuqb{0}\fi
      % the far side in shadow, deepening toward its edge, the shade's edge following the
      % body's curve (at 0.12 and 0.6 of its half-width)
      \flo@chance{0.5}\ifflo@yes\def\flo@sd{1}\else\def\flo@sd{-1}\fi
      \flo@calc\flo@xc{2*\flo@sd}\flo@vtone{flo@c}{0.12}\flo@calc\flo@yc{\flo@tuL+\flo@tut+0.1}%
      \flo@tushade{0.12}{0.2}\flo@tushade{0.6}{0.16}%
      % streaks along the body, white and dark by turns
      \def\flo@twa{0.02}\def\flo@twb{0.012}%
      \flo@loop{tus}\flo@ka{-2}{2}{%
        \flo@calc\flo@f{\the\flo@ka/2.5}%
        \flo@turad{0.05}\flo@calc\flo@xa{\flo@f*\flo@tur*0.9+\flo@tubd*0.0025}\flo@calc\flo@ya{0.05*\flo@tuL}%
        \flo@turad{0.4}\flo@calc\flo@xb{\flo@f*\flo@tur*0.9+\flo@tubd*0.16}\flo@calc\flo@yb{0.4*\flo@tuL}%
        \flo@turad{0.75}\flo@calc\flo@xc{\flo@f*\flo@tur*0.9+\flo@tubd*0.5625}\flo@calc\flo@yc{0.75*\flo@tuL}%
        \flo@sym\flo@t{0.03}\flo@calc\flo@xd{\flo@f*\flo@tuR*0.95+\flo@tubd+\flo@t}\flo@calc\flo@yd{\flo@tuL+0.06}%
        \ifodd\flo@ka
          \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.3}{1}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}%
        \else\flo@vfill{white}{0.55}{0}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}\fi}%
      \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.5*(#1)}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{tb}}%
    \end{pgfscope}%
  \fi
  \flo@vtone{flo@c}{0.08}\flo@vstroke{flo@c}{0.18}{0.35}{0}{\flo@kept{tb}}%
  % stamens that stand out of the mouth
  \edef\flo@t{\flo@get{stamens}}\def\flo@tmp{exserted}%
  \ifx\flo@t\flo@tmp\ifnum\flo@tun>0
    \flo@loop{tum}\flo@ka{-1}{1}{%
      \flo@calc\flo@xa{\the\flo@ka*0.02+0.36*\flo@tubd}\flo@calc\flo@ya{0.6*\flo@tuL}%
      \flo@sym\flo@t{0.02}\flo@calc\flo@xb{\the\flo@ka*0.08+1.2*\flo@tubd+\flo@t}%
      \flo@range\flo@t{0.18}{0.32}\flo@calc\flo@yb{\flo@tuL+\flo@t}%
      \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.85}{0}{\pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}}%
      \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xb\flo@yb}{0.018pt}}}%
  \fi\fi
  % the sepals, hugging the base (a two-lipped flower's calyx is its own)
  \ifnum\flo@tusep=1
    \def\flo@twa{0.07}\def\flo@twb{0.004}\flo@vtone{flo@c}{0.1}%
    \flo@loop{tuc}\flo@ka{-1}{1}{%
      \flo@sym\flo@t{0.03}%
      \flo@calc\flo@xa{\the\flo@ka*0.04}\flo@calc\flo@xb{\the\flo@ka*0.07}%
      \flo@calc\flo@xd{\the\flo@ka*(\flo@tua+0.07)+\flo@t}\flo@calc\flo@xc{0.9*\flo@xd}%
      \flo@vfill{flo@c}{0.95}{0}{\flo@vtaper\flo@xa{-0.03}\flo@xb{0.06}\flo@xc{0.14}\flo@xd{0.22}}}%
    \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P0{-0.02}}{0.05pt}}%
  \fi}
% the half-width of \flo@vtube's body at #1 (0..1): \flo@tur
\def\flo@turad#1{%
  \edef\flo@tur{\flo@tua}%
  \ifdim#1pt>0pt
    \ifdim\flo@tub pt>0pt \flo@calc\flo@tur{\flo@tur+\flo@tub*pow(#1,\flo@tuc)}\fi
    \ifdim\flo@tuw pt>0pt \flo@calc\flo@tur{\flo@tur+\flo@tuw*sin(180*pow(min(1,(#1)/0.92),0.85))}\fi
    \ifdim\flo@tuh pt>0pt \flo@calc\flo@tur{\flo@tur+\flo@tuh*(1-pow(1-(#1),2.5))}\fi
    \ifdim\flo@tue pt>0pt \flo@calc\flo@tur{\flo@tur+\flo@tue*pow(#1,6)}\fi
  \fi}
% \flo@vtube's shade from #1 of the half-width on the side \flo@sd out to \flo@xc, opacity #2
% (multiplied), in \flo@c
\def\flo@tushade#1#2{%
  \flo@calc\flo@xa{\flo@sd*(#1)*\flo@tua}%
  \flo@vfill{flo@c}{#2}{1}{\pgfpathmoveto{\flo@P\flo@xa{-0.1}}%
    \flo@loop{tsh}\flo@kb{0}{10}{%
      \flo@calc\flo@v{\the\flo@kb/10}\flo@turad\flo@v
      \flo@calc\flo@xa{\flo@sd*(#1)*\flo@tur+\flo@tubd*\flo@v*\flo@v}\flo@calc\flo@ya{\flo@tuL*\flo@v}%
      \pgfpathlineto{\flo@P\flo@xa\flo@ya}}%
    \flo@calc\flo@xa{\flo@sd*(#1)*\flo@tuR+\flo@tubd}%
    \pgfpathlineto{\flo@P\flo@xa\flo@yc}\pgfpathlineto{\flo@P\flo@xc\flo@yc}\pgfpathlineto{\flo@P\flo@xc{-0.1}}\pgfpathclose}}
% a flat-faced tube (salverform) held sideways: a slender tube, its face at a tilt on top,
% in diameter-1 units; #1 the diameter in cm
\def\flo@vsalver#1{%
  \edef\flo@sva{#1}\flo@vtube\flo@sva{salvertube}%
  \flo@range\flo@t{0.3}{0.45}%
  \begin{pgfscope}\pgftransformshift{\flo@P0{0.55}}\pgftransformyscale{\flo@t}\flo@sym\flo@t{30}\pgftransformrotate{\flo@t}%
    \flo@calc\flo@oarg{\flo@sva*28.45276}\flo@sflower\flo@oarg\end{pgfscope}}
% a pea flower in profile (papilionaceous), in \flo@vtube's units: its base at the origin,
% toward +y, about 1 long, its standard on the +x side (the upper side: \flo@bloom
% mirrors it). Flora's petals: the standard broad and notched, raised and bent back, the
% keel a pointed boat that curves up to its beak, the near wing over it, a toothed calyx
% in front; #1 cm per unit
\def\flo@vpea#1{%
  \edef\flo@pvu{#1}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@pvq{0.3}{0.4}\else\edef\flo@pvq{\flo@vf@tone}\fi
  \def\flo@vp@ns{}\def\flo@vp@heart{0}%
  % the standard
  \flo@range\flo@pva{8}{28}\flo@range\flo@pvl{0.55}{0.7}\flo@range\flo@pvw{0.75}{0.95}%
  \begin{pgfscope}\pgftransformshift{\flo@P{0.04}{0.2}}\flo@calc\flo@t{-90-\flo@pva}\pgftransformrotate{\flo@t}%
    \pgftransformscale{\flo@pvl}\pgftransformxscale{\flo@pvw}%
    \def\flo@vp@pointed{0}\def\flo@vp@W{0.5}\def\flo@vp@bend{}\def\flo@vp@heart{1}%
    \def\flo@vp@notchp{0.8}\def\flo@vp@notchk{1.4}\edef\flo@vp@tone{\flo@pvq}%
    \flo@calc\flo@vp@u{\flo@pvu*\flo@pvl}\flo@vpetal
    % guides: dark lines from its base
    \edef\flo@t{\flo@get{guides}}\def\flo@tmp{none}%
    \ifx\flo@t\flo@tmp\else\ifdim\flo@vp@u pt>0.12pt
      \flo@vtone{flo@c}{0.06}\def\flo@twb{0.004}%
      \flo@loop{pvg}\flo@ka{-2}{2}{%
        \flo@sym\flo@t{0.03}\flo@calc\flo@f{\the\flo@ka*0.1+\flo@t}\flo@range\flo@len{0.3}{0.45}%
        \flo@calc\flo@len{\flo@len*(1-1.5*\flo@f*\flo@f)}\def\flo@twa{0.04}%
        \flo@calc\flo@xa{0.2*\flo@f}\flo@calc\flo@xb{0.6*\flo@f}\flo@calc\flo@xc{0.9*\flo@f}\flo@calc\flo@xd{1.1*\flo@f}%
        \flo@calc\flo@yb{0.35*\flo@len+0.05}\flo@calc\flo@yc{0.7*\flo@len+0.05}\flo@calc\flo@yd{\flo@len+0.05}%
        \flo@vfill{flo@c}{0.45}{1}{\flo@vtaper\flo@xa{0.05}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}%
    \fi\fi
  \end{pgfscope}%
  % the keel, paler
  \flo@range\flo@pvk{0.58}{0.68}\flo@range\flo@t{8}{16}%
  \begin{pgfscope}\pgftransformshift{\flo@P{-0.03}{0.2}}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@pvk}%
    \def\flo@vp@pointed{1}\def\flo@vp@W{0.12}\flo@range\flo@vp@bend{0.22}{0.32}%
    \flo@calc\flo@vp@tone{\flo@pvq+0.12}\flo@calc\flo@vp@u{\flo@pvu*\flo@pvk}\flo@vpetal\end{pgfscope}%
  % the near wing, along the keel
  \flo@range\flo@pvn{0.44}{0.52}\flo@range\flo@t{0}{8}%
  \begin{pgfscope}\pgftransformshift{\flo@P{0.02}{0.21}}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@pvn}%
    \def\flo@vp@pointed{0}\def\flo@vp@W{0.26}\flo@range\flo@vp@bend{0}{0.08}\def\flo@vp@notchp{0}\def\flo@vp@ns{3}%
    \flo@calc\flo@vp@tone{\flo@pvq-0.03}\flo@calc\flo@vp@u{\flo@pvu*\flo@pvn}\flo@vpetal\end{pgfscope}%
  \flo@vcup\flo@pvu{0.9}}
% the calyx of a flower in profile: a cup, three of its five teeth seen, from the
% origin toward +y, about 0.27 long times #2; #1 cm per unit
\def\flo@vcup#1#2{%
  \edef\flo@cuy{#2}%
  \flo@calc\flo@ya{0.08*\flo@cuy}\flo@calc\flo@yb{0.17*\flo@cuy}\flo@calc\flo@yc{0.2*\flo@cuy}%
  \flo@put1{0.03}{-0.03}\flo@put2{0.068}\flo@ya\flo@put3{0.085}\flo@yb
  \flo@sym\flo@t{0.02}\flo@calc\flo@yd{0.25*\flo@cuy+\flo@t}\flo@put4{0.11}\flo@yd
  \flo@put5{0.055}\flo@yc
  \flo@sym\flo@t{0.02}\flo@calc\flo@yd{0.27*\flo@cuy+\flo@t}\flo@put6{0.013}\flo@yd
  \flo@put7{-0.03}\flo@yc
  \flo@sym\flo@t{0.02}\flo@calc\flo@yd{0.26*\flo@cuy+\flo@t}\flo@put8{-0.08}\flo@yd
  \flo@calc\flo@yd{0.15*\flo@cuy}\flo@put9{-0.085}\flo@yd\flo@calc\flo@yd{0.06*\flo@cuy}\flo@put{10}{-0.064}\flo@yd
  \flo@put{11}{-0.03}{-0.03}%
  \flo@smoothprepT{11}{0.7}\flo@keep{cup}%
  \flo@vtone{flo@c}{0.12}\flo@vfill{flo@c}{0.95}{0}{\flo@kept{cup}}%
  \ifdim#1pt>0.15pt
    \def\flo@twa{0.03}\def\flo@twb{0.004}\flo@calc\flo@yb{0.08*\flo@cuy}\flo@calc\flo@yc{0.14*\flo@cuy}\flo@calc\flo@yd{0.22*\flo@cuy}%
    \flo@vfill{white}{0.4}{0}{\flo@vtaper{0.034}{0.01}{0.055}\flo@yb{0.068}\flo@yc{0.085}\flo@yd}%
    \flo@vtone{flo@c}{0.06}\flo@vstroke{flo@c}{0.18}{0.4}{0}{\flo@kept{cup}}%
  \fi
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P0{-0.02}}{0.045pt}}}
% a two-lipped flower in profile (bilabiate), in \flo@vtube's units, its hood on the +x
% side: flora's petals, a broad lower lip that spreads forward and droops, with the
% species' guides on it, and a hood that arches forward over the mouth, stamens under it
% when they stand out; then the tube and the calyx (\flo@vtube's liptube, as long as
% \flo@lpL); #1 cm per unit
\def\flo@vlips#1{%
  \edef\flo@lpu{#1}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@lpq{0.3}{0.4}\else\edef\flo@lpq{\flo@vf@tone}\fi
  \flo@range\flo@lpL{0.55}{0.68}\flo@sym\flo@lpb{0.06}%
  \def\flo@vp@ns{}\def\flo@vp@heart{0}\def\flo@vp@pointed{0}%
  % the lower lip
  \flo@range\flo@lpa{35}{55}\flo@range\flo@lpl{0.3}{0.4}%
  \begin{pgfscope}\flo@calc\flo@xa{\flo@lpb-0.05}\flo@calc\flo@ya{\flo@lpL-0.03}\pgftransformshift{\flo@P\flo@xa\flo@ya}%
    \pgftransformrotate{\flo@lpa}\pgftransformscale{\flo@lpl}%
    \def\flo@vp@W{0.42}\flo@range\flo@vp@bend{-0.25}{-0.1}\def\flo@vp@notchp{0.6}\def\flo@vp@notchk{1.4}\def\flo@vp@ns{5}%
    \flo@calc\flo@vp@tone{\flo@lpq+0.05}\flo@calc\flo@vp@u{\flo@lpu*\flo@lpl}\flo@vpetal
    \edef\flo@t{\flo@get{guides}}%
    \ifdim\flo@vp@u pt>0.1pt
      \def\flo@tmp{dots}\ifx\flo@t\flo@tmp
        \flo@spk={}%
        \flo@loop{lpd}\flo@ka{1}{7}{%
          \flo@sym\flo@xa{0.22}\flo@range\flo@ya{0.12}{0.55}\flo@range\flo@r{0.025}{0.045}%
          \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@r pt}}%
          \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
        \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.7}{1}{\the\flo@spk}\fi
      \def\flo@tmp{lines}\ifx\flo@t\flo@tmp
        \flo@vtone{flo@c}{0.06}\def\flo@twa{0.035}\def\flo@twb{0.004}%
        \flo@loop{lpg}\flo@ka{-1}{1}{%
          \flo@sym\flo@t{0.03}\flo@calc\flo@f{\the\flo@ka*0.12+\flo@t}\flo@range\flo@len{0.35}{0.5}%
          \flo@calc\flo@xb{0.5*\flo@f}\flo@calc\flo@xc{0.8*\flo@f}\flo@calc\flo@xd{\flo@f}%
          \flo@calc\flo@yb{0.35*\flo@len+0.05}\flo@calc\flo@yc{0.7*\flo@len+0.05}\flo@calc\flo@yd{\flo@len+0.05}%
          \flo@vfill{flo@c}{0.5}{1}{\flo@vtaper{0}{0.05}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}\fi
    \fi
  \end{pgfscope}%
  % the hood
  \flo@range\flo@lpa{-80}{-68}\flo@range\flo@lph{0.36}{0.44}%
  \begin{pgfscope}\flo@calc\flo@xa{\flo@lpb+0.05}\flo@calc\flo@ya{\flo@lpL-0.04}\pgftransformshift{\flo@P\flo@xa\flo@ya}%
    \pgftransformrotate{\flo@lpa}\pgftransformscale{\flo@lph}%
    \def\flo@vp@W{0.26}\flo@range\flo@vp@bend{-1.1}{-0.85}\def\flo@vp@notchp{0.4}\def\flo@vp@notchk{1}\def\flo@vp@ns{3}%
    \edef\flo@vp@tone{\flo@lpq}\flo@calc\flo@vp@u{\flo@lpu*\flo@lph}\flo@vpetal\end{pgfscope}%
  % stamens that stand out, under the hood
  \edef\flo@t{\flo@get{stamens}}\def\flo@tmp{exserted}%
  \ifx\flo@t\flo@tmp
    \flo@loop{lps}\flo@ka{0}{1}{%
      \flo@calc\flo@xa{\flo@lpb+0.02}\flo@calc\flo@ya{\flo@lpL}%
      \flo@range\flo@t{0.1}{0.2}\flo@calc\flo@xb{\flo@xa+\flo@t+0.04*\the\flo@ka}%
      \flo@range\flo@t{0.3}{0.42}\flo@calc\flo@yb{\flo@ya+\flo@t-0.05*\the\flo@ka}%
      \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.85}{0}{\pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}}%
      \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xb\flo@yb}{0.018pt}}}%
  \fi
  \flo@vtube\flo@lpu{liptube}\flo@vcup\flo@lpu{1.1}}
% the species' flower diameter on the page, cm, times #1
\def\flo@fdiam#1{\flo@calc\flo@fd{min(2.8,0.7+0.032*\flo@get{size})*(#1)}}
% v1.3's blossoms: two to five flowers of the species on curved stalks from the origin,
% diameter #1, the stage #2 of the first to open; a bud at the fork
\def\flo@blossoms#1#2{%
  \edef\flo@bfd{#1}\edef\flo@bst{#2}\edef\flo@oo{\flo@get{openorder}}%
  \flo@int\flo@bn{2}{4}\ifnum\flo@get{count}>9 \edef\flo@bn{\the\numexpr\flo@bn+1\relax}\fi
  \flo@loop{blsm}\flo@Gc{1}{\flo@bn}{%
    \flo@calc\flo@f{\the\flo@Gc-(\flo@bn+1)/2}%
    \flo@sym\flo@t{10}\flo@calc\flo@a{\flo@f*38+\flo@t}%
    \flo@range\flo@t{0.55}{0.95}\flo@calc\flo@dd{\flo@bfd*\flo@t}%
    \ifnum\flo@Gc>1 \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@dd{\flo@dd*\flo@t}\fi
    \flo@calc\flo@xx{\flo@dd*sin(\flo@a)}\flo@calc\flo@yy{\flo@dd*cos(\flo@a)}%
    \flo@calc\flo@ya{0.4*\flo@dd}\flo@calc\flo@xb{0.6*\flo@xx}\flo@calc\flo@yb{0.7*\flo@yy}%
    \flo@vtone{flo@c}{0.1}\flo@vstroke{flo@c}{0.35}{1}{0}{\pgfpathmoveto{\flo@P00}%
      \pgfpathcurveto{\flo@P0\flo@ya}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xx\flo@yy}}%
    \def\flo@tmp{center}%
    \ifx\flo@oo\flo@tmp\flo@calc\flo@t{\flo@bst-0.3*abs(\flo@f)/max(1,(\flo@bn-1)/2)}%
    \else\flo@calc\flo@t{\flo@bst-0.3*(1-abs(\flo@f)/max(1,(\flo@bn-1)/2))}\fi
    \flo@range\flo@s{0.8}{1.05}\flo@calc\flo@s{\flo@bfd*\flo@s}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@xx\flo@yy}%
      \ifdim\flo@a pt<0pt \def\flo@bside{1}\else\def\flo@bside{-1}\fi\flo@bloom\flo@s\flo@t\end{pgfscope}}%
  \flo@chance{0.6}\ifflo@yes
    \flo@sym\flo@t{50}\flo@calc\flo@s{0.45*\flo@bfd}%
    \let\flo@oarg\flo@s\begin{pgfscope}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@oarg}\flo@stone\flo@vbud\flo@oarg\end{pgfscope}%
  \fi}
% v1.3's budding spray: two to four buds of the species on stalks, diameter #1
\def\flo@budding#1{%
  \edef\flo@bfd{#1}\flo@int\flo@bn{2}{4}\flo@stone
  \flo@loop{bud}\flo@Gc{1}{\flo@bn}{%
    \flo@sym\flo@t{10}\flo@calc\flo@a{(\the\flo@Gc-(\flo@bn+1)/2)*34+\flo@t}%
    \flo@range\flo@t{0.5}{0.85}\flo@calc\flo@dd{\flo@bfd*\flo@t}%
    \flo@calc\flo@xx{\flo@dd*sin(\flo@a)}\flo@calc\flo@yy{\flo@dd*cos(\flo@a)}%
    \flo@calc\flo@ya{0.4*\flo@dd}\flo@calc\flo@xb{0.6*\flo@xx}\flo@calc\flo@yb{0.7*\flo@yy}%
    \flo@vtone{flo@c}{0.1}\flo@vstroke{flo@c}{0.35}{1}{0}{\pgfpathmoveto{\flo@P00}%
      \pgfpathcurveto{\flo@P0\flo@ya}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xx\flo@yy}}%
    \flo@range\flo@s{0.45}{0.6}\flo@calc\flo@s{\flo@bfd*\flo@s}\flo@calc\flo@t{-0.6*\flo@a}%
    \let\flo@oarg\flo@s
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@xx\flo@yy}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@oarg}%
      \flo@vbud\flo@oarg\end{pgfscope}}}
% flora.umbel: rays fanning upward, each ending in an umbellet of starry florets, bracts at
% the base; reach #1 cm, stage #2 (buds: dots; fruit: paired seeds)
\def\flo@umbelunit#1#2{%
  \edef\flo@R{#1}\edef\flo@bst{#2}\flo@stone
  \flo@calc\flo@nr{int(max(8,min(13,\flo@get{count}+3)))}%
  \flo@calc\flo@ns{int(max(5,min(8,\flo@get{rays}/2)))}%
  \ifx\flo@vf@tone\pgfutil@empty\def\flo@tlo{0.25}\def\flo@thi{0.42}%
  \else\flo@calc\flo@tlo{min(0.5,\flo@vf@tone-0.05)}\flo@calc\flo@thi{min(0.62,\flo@vf@tone+0.05)}\fi
  \flo@loop{umr}\flo@Gc{1}{\flo@nr}{%
    \flo@sym\flo@t{4}\flo@calc\flo@a{90+(\the\flo@Gc-(\flo@nr+1)/2)*(110/\flo@nr)+\flo@t}%
    \flo@range\flo@t{0.78}{1}\flo@calc\flo@L{\flo@R*\flo@t*(1-0.15*abs(\flo@a-90)/55)}%
    \flo@calc\flo@ex{\flo@L*cos(\flo@a)}\flo@calc\flo@ey{\flo@L*sin(\flo@a)}%
    \flo@calc\flo@xa{0.15*\flo@ex}\flo@calc\flo@ya{0.5*\flo@ey}\flo@calc\flo@xb{0.6*\flo@ex}\flo@calc\flo@yb{0.95*\flo@ey}%
    \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.9}{0}{\pgfpathmoveto{\flo@P00}%
      \pgfpathcurveto{\flo@P\flo@xa\flo@ya}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@ex\flo@ey}}%
    \flo@loop{ums}\flo@Gd{1}{\flo@ns}{%
      \flo@sym\flo@t{5}\flo@calc\flo@b{\flo@a+(\the\flo@Gd-(\flo@ns+1)/2)*16+\flo@t}%
      \flo@range\flo@t{0.12}{0.2}\flo@calc\flo@l{\flo@R*\flo@t}%
      \flo@calc\flo@fx{\flo@ex+\flo@l*cos(\flo@b)}\flo@calc\flo@fy{\flo@ey+\flo@l*sin(\flo@b)}%
      \flo@vtone{flo@c}{0.14}\flo@vstroke{flo@c}{0.18}{0.85}{0}{\pgfpathmoveto{\flo@P\flo@ex\flo@ey}\pgfpathlineto{\flo@P\flo@fx\flo@fy}}%
      \flo@range\flo@t{0.035}{0.05}\flo@calc\flo@r{\flo@R*\flo@t}%
      \flo@range\flo@t{\flo@tlo}{\flo@thi}%
      \begin{pgfscope}\pgftransformshift{\flo@P\flo@fx\flo@fy}%
        \ifdim\flo@bst pt>1.15pt
          \flo@calc\flo@t{\flo@b-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@r}%
          \flo@vtone{flo@c}{0.16}\flo@vfill{flo@c}{1}{0}{\pgfpathellipse{\flo@P{-0.35}{0.9}}{\flo@P{0.32}0}{\flo@P0{0.9}}%
            \pgfpathellipse{\flo@P{0.35}{0.9}}{\flo@P{0.32}0}{\flo@P0{0.9}}}%
        \else\ifdim\flo@bst pt<0.3pt
          \flo@vtone{flo@c}{0.2}\flo@calc\flo@t{0.45*\flo@r}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{\flo@t pt}}%
        \else
          \edef\flo@vf@tone{\flo@t}\def\flo@vf@star{1}\let\flo@oarg\flo@r\pgftransformscale{\flo@oarg}\flo@vfloret\flo@oarg{5}%
        \fi\fi
      \end{pgfscope}}}%
  \flo@loop{umb}\flo@Gc{-1}{1}{%
    \flo@sym\flo@t{10}\flo@calc\flo@a{\the\flo@Gc*40+\flo@t+180}\flo@range\flo@s{0.15}{0.22}\flo@calc\flo@s{\flo@R*\flo@s}%
    \begin{pgfscope}\pgftransformrotate{\flo@a}\pgftransformscale{\flo@s}%
      \def\flo@vl@W{0.06}\def\flo@vl@tone{}\edef\flo@vl@u{\flo@s}\flo@vleaflet\end{pgfscope}}}
% flora's cyme turned raceme: an axis of #1 cm that bends toward its tip by #3 degrees, the
% species' flowers on pedicels up to #2 cm, alternating along it, the lowest open first and
% buds toward the tip; a coiled cyme when #3 is large. The stage of the oldest is \flo@ust
\def\flo@racemeunit#1#2#3{%
  \edef\flo@bst{\flo@ust}\edef\flo@L{#1}\edef\flo@ped{#2}%
  \flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
  \flo@range\flo@t{0.75}{1.25}\flo@calc\flo@turn{(#3)*\flo@t}%
  \flo@sym\flo@t{8}\flo@calc\flo@h{90+\flo@t}%
  \flo@put1{0}{0}\def\flo@xx{0}\def\flo@yy{0}\flo@calc\flo@ds{\flo@L/24}%
  \flo@loop{rcw}\flo@Gc{1}{24}{%
    \flo@calc\flo@v{(\the\flo@Gc-0.5)/24}%
    \flo@calc\flo@a{\flo@h+\flo@side*\flo@turn*\flo@v*\flo@v*sqrt(sqrt(\flo@v))}%
    \flo@calc\flo@xx{\flo@xx+\flo@ds*cos(\flo@a)}\flo@calc\flo@yy{\flo@yy+\flo@ds*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@Gc+1\relax}{\flo@xx}{\flo@yy}}%
  \flo@normals{25}%
  \flo@loop{rck}\flo@Gc{1}{25}{%
    \expandafter\edef\csname flo@AX\the\flo@Gc\endcsname{\flo@x{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AY\the\flo@Gc\endcsname{\flo@y{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AN\the\flo@Gc\endcsname{\csname flo@NX\the\flo@Gc\endcsname}%
    \expandafter\edef\csname flo@AM\the\flo@Gc\endcsname{\csname flo@NY\the\flo@Gc\endcsname}}%
  \flo@vstem{25}{0.03}{0.006}{0.1}%
  \flo@stone
  \flo@calc\flo@rfd{min(1.0,0.5+0.03*\flo@get{size})*0.8}%
  \ifdim#3pt>150pt \flo@calc\flo@rfd{min(0.32,\flo@rfd)}\fi
  \flo@int\flo@t{8}{12}\flo@calc\flo@rn{int(min(\flo@get{count},\flo@t))}%
  \flo@loop{rcf}\flo@Gc{1}{\flo@rn}{%
    \flo@calc\flo@v{\the\flo@Gc/\flo@rn}\flo@calc\flo@f{0.1+0.88*sqrt(\flo@v)*sqrt(sqrt(\flo@v))}%
    \flo@calc\flo@ri{int(max(2,min(25,floor(\flo@f*24+1.5))))}%
    \ifodd\flo@Gc\def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \edef\flo@px{\csname flo@AX\flo@ri\endcsname}\edef\flo@py{\csname flo@AY\flo@ri\endcsname}%
    \edef\flo@pnx{\csname flo@AN\flo@ri\endcsname}\edef\flo@pny{\csname flo@AM\flo@ri\endcsname}%
    \flo@range\flo@t{0.8}{1.2}\flo@calc\flo@stalk{(\flo@ped*(1-\flo@f)+0.03*\flo@f)*\flo@t}%
    % the pedicel leans up the axis: 0.75 across, 0.65 along (the tangent is (ny,-nx))
    \flo@calc\flo@qx{\flo@px+(\flo@pnx*\flo@sg*0.75+\flo@pny*0.65)*\flo@stalk}%
    \flo@calc\flo@qy{\flo@py+(\flo@pny*\flo@sg*0.75-\flo@pnx*0.65)*\flo@stalk}%
    \ifdim\flo@stalk pt>0.03pt
      \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.9}{0}{\pgfpathmoveto{\flo@P\flo@px\flo@py}\pgfpathlineto{\flo@P\flo@qx\flo@qy}}\fi
    \flo@calc\flo@t{\flo@bst+0.35-1.1*\flo@f}%
    \flo@range\flo@s{0.85}{1.15}\flo@calc\flo@s{\flo@rfd*(1-0.5*\flo@f)*\flo@s}%
    \flo@calc\flo@a{atan2(\flo@qy-\flo@py,\flo@qx-\flo@px)-90}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@qx\flo@qy}\pgftransformrotate{\flo@a}%
      \ifdim\flo@f pt>0.86pt
        \flo@calc\flo@t{0.18*\flo@s}\flo@vtone{flo@c}{0.2}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{\flo@t pt}}%
      \else\let\flo@bside\flo@sg\flo@bloom\flo@s\flo@t\fi
    \end{pgfscope}}}
% flora's cyme, the forget-me-not's, as the species' coiled cyme: an axis of #1 cm that
% curls at its end like a scorpion's tail, the more the species coils (\flo@get{coil}),
% with the species' flowers crowding along it, on the outside of the coil (siderule same)
% or on alternate sides, smaller toward the coil, where they are buds: the lowest opens
% first. Often a second, shorter curl forks off, a little younger. The stage of the
% oldest is \flo@ust
\def\flo@curlunit#1{%
  \edef\flo@bst{\flo@ust}\flo@stone
  \flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
  \flo@sym\flo@t{10}\flo@calc\flo@h{90+\flo@t}%
  \flo@calc\flo@cfd{min(0.4,0.17+0.014*\flo@get{size})}%
  \flo@calc\flo@ccn{int(max(9,min(17,\flo@get{count}+2)))}%
  \flo@curl{0}{0}{#1}{0.026}{0}%
  \flo@chance{0.6}\ifflo@yes
    \flo@range\flo@t{0.25}{0.4}\flo@calc\flo@ci{int(37*\flo@t)}%
    \edef\flo@xa{\csname flo@AX\flo@ci\endcsname}\edef\flo@ya{\csname flo@AY\flo@ci\endcsname}%
    \edef\flo@t{\the\numexpr\flo@ci+1\relax}%
    \edef\flo@xb{\csname flo@AX\flo@t\endcsname}\edef\flo@yb{\csname flo@AY\flo@t\endcsname}%
    \flo@range\flo@t{30}{50}\flo@calc\flo@h{atan2(\flo@yb-\flo@ya,\flo@xb-\flo@xa)-\flo@side*\flo@t}%
    \flo@range\flo@t{0.45}{0.65}\flo@calc\flo@L{(#1)*\flo@t}%
    \flo@calc\flo@side{-\flo@side}\flo@calc\flo@ccn{int(max(6,\flo@ccn*0.7))}%
    \flo@curl\flo@xa\flo@ya\flo@L{0.018}{0.15}%
  \fi}
\def\flo@same{same}
% one curl of \flo@curlunit: from (#1,#2) heading \flo@h, length #3 cm, #4 cm wide at its
% base, its flowers #5 younger than the unit's oldest; points in flo@AX/AY, normals in
% flo@AN/AM
\def\flo@curl#1#2#3#4#5{%
  \edef\flo@xx{#1}\edef\flo@yy{#2}\edef\flo@cL{#3}\edef\flo@clate{#5}%
  \flo@range\flo@t{0.85}{1.15}\flo@calc\flo@turn{(100+170*\flo@get{coil})*\flo@t}%
  \flo@put1\flo@xx\flo@yy\flo@calc\flo@ds{\flo@cL/36}%
  \flo@loop{cuw}\flo@Gc{1}{36}{%
    \flo@calc\flo@v{(\the\flo@Gc-0.5)/36}%
    \flo@calc\flo@a{\flo@h+\flo@side*\flo@turn*\flo@v*\flo@v*sqrt(sqrt(\flo@v))}%
    \flo@calc\flo@xx{\flo@xx+\flo@ds*cos(\flo@a)}\flo@calc\flo@yy{\flo@yy+\flo@ds*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@Gc+1\relax}{\flo@xx}{\flo@yy}}%
  \flo@normals{37}%
  \flo@loop{cuk}\flo@Gc{1}{37}{%
    \expandafter\edef\csname flo@AX\the\flo@Gc\endcsname{\flo@x{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AY\the\flo@Gc\endcsname{\flo@y{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AN\the\flo@Gc\endcsname{\csname flo@NX\the\flo@Gc\endcsname}%
    \expandafter\edef\csname flo@AM\the\flo@Gc\endcsname{\csname flo@NY\the\flo@Gc\endcsname}}%
  \flo@vstem{37}{#4}{0.006}{0.1}%
  \edef\flo@csr{\flo@get{siderule}}%
  \flo@loop{cuf}\flo@Gc{1}{\flo@ccn}{%
    \flo@calc\flo@v{\the\flo@Gc/\flo@ccn}\flo@calc\flo@f{0.18+0.82*sqrt(\flo@v)*sqrt(sqrt(\flo@v))}%
    \flo@calc\flo@ri{int(max(2,min(37,floor(\flo@f*36+1.5))))}%
    \ifx\flo@csr\flo@same\flo@calc\flo@sg{-\flo@side}\else\ifodd\flo@Gc\def\flo@sg{-1}\else\def\flo@sg{1}\fi\fi
    \edef\flo@px{\csname flo@AX\flo@ri\endcsname}\edef\flo@py{\csname flo@AY\flo@ri\endcsname}%
    \edef\flo@pnx{\csname flo@AN\flo@ri\endcsname}\edef\flo@pny{\csname flo@AM\flo@ri\endcsname}%
    \flo@range\flo@t{0.7}{1.2}\flo@calc\flo@stalk{(0.1-0.08*\flo@f)*\flo@t}%
    \flo@calc\flo@qx{\flo@px+\flo@pnx*\flo@sg*\flo@stalk}\flo@calc\flo@qy{\flo@py+\flo@pny*\flo@sg*\flo@stalk}%
    \ifdim\flo@stalk pt>0.03pt
      \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.9}{0}{\pgfpathmoveto{\flo@P\flo@px\flo@py}\pgfpathlineto{\flo@P\flo@qx\flo@qy}}\fi
    \flo@range\flo@s{0.85}{1.15}\flo@calc\flo@s{\flo@cfd*(1-0.74*\flo@f)*\flo@s}%
    \flo@calc\flo@t{\flo@bst+0.55-\flo@f-\flo@clate}%
    \flo@calc\flo@a{atan2(\flo@qy-\flo@py,\flo@qx-\flo@px)-90}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@qx\flo@qy}\pgftransformrotate{\flo@a}%
      \ifdim\flo@f pt>0.8pt
        \flo@calc\flo@t{0.3*\flo@s}\flo@vtone{flo@c}{0.2}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{\flo@t pt}}%
      \else\let\flo@bside\flo@sg\flo@bloom\flo@s\flo@t\fi
    \end{pgfscope}}}
% ---------------------------------------------------------------- clusters
% The clusters below collect their flowers while they draw their stalks and draw them
% after (\flo@fadd, \flo@fdraw), so that no stalk crosses an open flower. A flower whose
% stage is below -0.25 is a bud too small to draw: a dot.
\def\flo@zset#1#2#3{\expandafter\edef\csname flo@Z#1@#2\endcsname{#3}}
\def\flo@z#1#2{\csname flo@Z#1@#2\endcsname}
% the species' flower at (#1,#2), turned #3 degrees, diameter #4 cm, stage #5; a flower
% that is held sideways or nods turns on toward the side it leans to
\def\flo@fat#1#2#3#4#5{%
  \begin{pgfscope}\pgftransformshift{\flo@P{#1}{#2}}\pgftransformrotate{#3}%
    \ifdim#5pt<-0.25pt
      \flo@calc\flo@t{0.3*(#4)}\flo@vtone{flo@c}{0.2}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{\flo@t pt}}%
    \else\ifdim#3pt<0pt \def\flo@bside{-1}\else\def\flo@bside{1}\fi\flo@bloom{#4}{#5}\fi
  \end{pgfscope}}
\def\flo@fadd#1#2#3#4#5{\edef\flo@fnum{\the\numexpr\flo@fnum+1\relax}%
  \flo@zset{fx}\flo@fnum{#1}\flo@zset{fy}\flo@fnum{#2}\flo@zset{fa}\flo@fnum{#3}%
  \flo@zset{fs}\flo@fnum{#4}\flo@zset{ft}\flo@fnum{#5}}
\def\flo@fdraw{\flo@loop{fdr}\flo@Gc{1}{\flo@fnum}{%
  \flo@fat{\flo@z{fx}{\the\flo@Gc}}{\flo@z{fy}{\the\flo@Gc}}{\flo@z{fa}{\the\flo@Gc}}%
    {\flo@z{fs}{\the\flo@Gc}}{\flo@z{ft}{\the\flo@Gc}}}}
% a stalk (a hairline) from (#1,#2) to (#3,#4)
\def\flo@hair#1#2#3#4{\flo@vtone{flo@c}{0.12}%
  \flo@vstroke{flo@c}{0.25}{0.9}{0}{\pgfpathmoveto{\flo@P{#1}{#2}}\pgfpathlineto{\flo@P{#3}{#4}}}}
% racemeunit's axis: #1 cm from the origin, bending toward its tip by about #2 degrees,
% #3 cm wide at its base; points 1..25 in flo@AX/AY, normals in flo@AN/AM; drawn
\def\flo@axis#1#2#3{%
  \flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
  \flo@range\flo@t{0.75}{1.25}\flo@calc\flo@turn{(#2)*\flo@t}%
  \flo@sym\flo@t{8}\flo@calc\flo@h{90+\flo@t}%
  \flo@put1{0}{0}\def\flo@xx{0}\def\flo@yy{0}\flo@calc\flo@ds{(#1)/24}%
  \flo@loop{axw}\flo@Gc{1}{24}{%
    \flo@calc\flo@v{(\the\flo@Gc-0.5)/24}%
    \flo@calc\flo@a{\flo@h+\flo@side*\flo@turn*\flo@v*\flo@v*sqrt(sqrt(\flo@v))}%
    \flo@calc\flo@xx{\flo@xx+\flo@ds*cos(\flo@a)}\flo@calc\flo@yy{\flo@yy+\flo@ds*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@Gc+1\relax}{\flo@xx}{\flo@yy}}%
  \flo@normals{25}%
  \flo@loop{axk}\flo@Gc{1}{25}{%
    \expandafter\edef\csname flo@AX\the\flo@Gc\endcsname{\flo@x{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AY\the\flo@Gc\endcsname{\flo@y{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AN\the\flo@Gc\endcsname{\csname flo@NX\the\flo@Gc\endcsname}%
    \expandafter\edef\csname flo@AM\the\flo@Gc\endcsname{\csname flo@NY\the\flo@Gc\endcsname}}%
  \flo@vstem{25}{#3}{0.006}{0.1}}
% the axis at \flo@clf (0..1): its point \flo@px,\flo@py, normal \flo@pnx,\flo@pny and
% heading \flo@ah (degrees); the tangent is (ny,-nx)
\def\flo@axisat{%
  \flo@calc\flo@ri{int(max(2,min(25,floor(\flo@clf*24+1.5))))}%
  \edef\flo@px{\csname flo@AX\flo@ri\endcsname}\edef\flo@py{\csname flo@AY\flo@ri\endcsname}%
  \edef\flo@pnx{\csname flo@AN\flo@ri\endcsname}\edef\flo@pny{\csname flo@AM\flo@ri\endcsname}%
  \flo@calc\flo@ah{atan2(-\flo@pnx,\flo@pny)}}
% a branch from (#1,#2) heading #3 degrees and turning by #4 along its length #5 cm, in
% #6 steps: points 1..#6+1 in flo@X/Y, its end \flo@xx,\flo@yy
\def\flo@walk#1#2#3#4#5#6{%
  \edef\flo@xx{#1}\edef\flo@yy{#2}\flo@put1\flo@xx\flo@yy\flo@calc\flo@ds{(#5)/(#6)}%
  \flo@loop{wlk}\flo@Gc{1}{#6}{%
    \flo@calc\flo@a{(#3)+(#4)*(\the\flo@Gc-0.5)/(#6)}%
    \flo@calc\flo@xx{\flo@xx+\flo@ds*cos(\flo@a)}\flo@calc\flo@yy{\flo@yy+\flo@ds*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@Gc+1\relax}{\flo@xx}{\flo@yy}}}

% flora's sprig as the species' forked cyme (a dichasium): a stalk that forks two ways,
% now and then three, \flo@get{depth}+1 times (three at most), a flower in every fork on a
% stalk of its own and at every tip, small bracts at the lower forks; the flower of the
% first fork opens first, the tips last. Reach about #1 cm
\def\flo@forkunit#1{%
  \edef\flo@bst{\flo@ust}\flo@stone\def\flo@fnum{0}%
  \flo@calc\flo@cld{int(min(3,\flo@get{depth}+1))}%
  \flo@calc\flo@clfd{min(0.45,0.16+0.012*\flo@get{size})}%
  \flo@sym\flo@t{8}\flo@calc\flo@t{90+\flo@t}\flo@calc\flo@s{(#1)*0.4}%
  \flo@zset{bx}{1}{0}\flo@zset{by}{1}{0}\flo@zset{bh}{1}{\flo@t}\flo@zset{bl}{1}{\flo@s}%
  \flo@zset{bw}{1}{0.024}\flo@zset{bv}{1}{0}\def\flo@cln{1}%
  \flo@loop{fk}\flo@Gd{1}{\flo@cln}{%
    \edef\flo@clh{\flo@z{bh}{\the\flo@Gd}}\edef\flo@cll{\flo@z{bl}{\the\flo@Gd}}%
    \edef\flo@clw{\flo@z{bw}{\the\flo@Gd}}\edef\flo@clv{\flo@z{bv}{\the\flo@Gd}}%
    \flo@sym\flo@clb{20}%
    \flo@walk{\flo@z{bx}{\the\flo@Gd}}{\flo@z{by}{\the\flo@Gd}}\flo@clh\flo@clb\flo@cll{6}%
    \edef\flo@clx{\flo@xx}\edef\flo@cly{\flo@yy}%
    \flo@calc\flo@clwe{0.72*\flo@clw}\flo@vstem{7}\flo@clw\flo@clwe{0.1}%
    \flo@calc\flo@clh{\flo@clh+\flo@clb}%
    \flo@sym\flo@t{0.05}\flo@calc\flo@clt{\flo@bst-0.3*\flo@clv+\flo@t}%
    \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@cls{\flo@clfd*(1-0.1*\flo@clv)*\flo@t}%
    \flo@calc\flo@t{\flo@clh-90}%
    \ifnum\flo@clv<\flo@cld
      % a fork: a bract, two or three branches, the flower between them on its stalk
      \ifnum\flo@clv<2 \flo@chance{0.4}\ifflo@yes
        \flo@chance{0.5}\ifflo@yes\def\flo@sg{1}\else\def\flo@sg{-1}\fi
        \flo@range\flo@a{40}{70}\flo@calc\flo@a{\flo@clh-90+\flo@sg*\flo@a}%
        \flo@range\flo@s{0.35}{0.55}\flo@calc\flo@s{\flo@cll*\flo@s}%
        \begin{pgfscope}\pgftransformshift{\flo@P\flo@clx\flo@cly}\pgftransformrotate{\flo@a}\pgftransformscale{\flo@s}%
          \def\flo@vl@W{0.14}\def\flo@vl@tone{}\edef\flo@vl@u{\flo@s}\flo@vleaflet\end{pgfscope}%
      \fi\fi
      \flo@chance{0.2}\ifflo@yes\def\flo@clk{3}\else\def\flo@clk{2}\fi
      \flo@loop{fkk}\flo@n{1}{\flo@clk}{%
        \ifnum\flo@clk=2 \flo@range\flo@a{16}{34}\ifnum\flo@n=1 \flo@calc\flo@a{-\flo@a}\fi
        \else\flo@range\flo@a{22}{36}\flo@calc\flo@a{(\the\flo@n-2)*\flo@a}\fi
        \edef\flo@cln{\the\numexpr\flo@cln+1\relax}%
        \flo@zset{bx}\flo@cln\flo@clx\flo@zset{by}\flo@cln\flo@cly
        \flo@calc\flo@t{\flo@clh+\flo@a}\flo@zset{bh}\flo@cln\flo@t
        \flo@range\flo@t{0.62}{0.8}\flo@calc\flo@t{\flo@cll*\flo@t}\flo@zset{bl}\flo@cln\flo@t
        \flo@zset{bw}\flo@cln\flo@clwe
        \flo@zset{bv}\flo@cln{\the\numexpr\flo@clv+1\relax}}%
      \flo@calc\flo@xa{\flo@clx+0.22*\flo@cll*cos(\flo@clh)}\flo@calc\flo@ya{\flo@cly+0.22*\flo@cll*sin(\flo@clh)}%
      \flo@hair\flo@clx\flo@cly\flo@xa\flo@ya
      \flo@calc\flo@t{\flo@clh-90}\flo@fadd\flo@xa\flo@ya\flo@t\flo@cls\flo@clt
    \else
      \flo@fadd\flo@clx\flo@cly\flo@t\flo@cls\flo@clt
    \fi}%
  \flo@fdraw}

% a panicle: a raceme whose branches are racemes, an axis of #1 cm bending a little, its
% branches on alternate sides, shorter toward the top, each ending in a flower with one to
% three more on short stalks along it (one more on the lower branches when the species
% branches twice); the lowest open first
\def\flo@panicleunit#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone\def\flo@fnum{0}%
  \flo@calc\flo@clfd{min(0.34,0.15+0.01*\flo@get{size})}%
  \flo@axis\flo@clL{30}{0.026}%
  \flo@calc\flo@clm{int(max(3,min(7,\flo@get{count}/4+1)))}%
  \flo@chance{0.5}\ifflo@yes\def\flo@clsg{1}\else\def\flo@clsg{-1}\fi
  \flo@loop{pan}\flo@Gd{1}{\flo@clm}{%
    \flo@sym\flo@t{0.03}\flo@calc\flo@clf{0.1+0.66*(\the\flo@Gd-1)/max(1,\flo@clm-1)+\flo@t}%
    \flo@axisat\flo@calc\flo@clsg{-\flo@clsg}%
    \flo@range\flo@clang{40}{58}\flo@calc\flo@clh{\flo@ah+\flo@clsg*\flo@clang}%
    \flo@range\flo@t{0.8}{1.2}\flo@calc\flo@cll{\flo@clL*0.42*(1-0.7*\flo@clf)*\flo@t}%
    \flo@calc\flo@clb{-\flo@clsg*0.55*\flo@clang}%
    \flo@walk\flo@px\flo@py\flo@clh\flo@clb\flo@cll{8}\flo@normals{9}%
    \flo@calc\flo@t{\flo@bst+0.2-0.9*\flo@clf}\flo@calc\flo@cls{\flo@clfd*(1-0.3*\flo@clf)}%
    \flo@calc\flo@a{\flo@clh+\flo@clb-90}\flo@fadd\flo@xx\flo@yy\flo@a\flo@cls\flo@t
    \flo@int\flo@clk{1}{3}%
    \ifnum\flo@get{depth}=2 \ifdim\flo@clf pt<0.45pt \edef\flo@clk{\the\numexpr\flo@clk+1\relax}\fi\fi
    \flo@loop{pnl}\flo@n{1}{\flo@clk}{%
      \flo@calc\flo@v{0.3+0.5*(\the\flo@n-1)/max(1,\flo@clk-1)}%
      \flo@calc\flo@clq{int(1+floor(\flo@v*8+0.5))}%
      \ifodd\flo@n\def\flo@sg{1}\else\def\flo@sg{-1}\fi
      \edef\flo@xa{\flo@x\flo@clq}\edef\flo@ya{\flo@y\flo@clq}%
      \edef\flo@clnx{\csname flo@NX\flo@clq\endcsname}\edef\flo@clny{\csname flo@NY\flo@clq\endcsname}%
      \flo@range\flo@t{0.1}{0.18}%
      \flo@calc\flo@xb{\flo@xa+(\flo@clnx*\flo@sg*0.8+\flo@clny*0.6)*\flo@t}%
      \flo@calc\flo@yb{\flo@ya+(\flo@clny*\flo@sg*0.8-\flo@clnx*0.6)*\flo@t}%
      \flo@hair\flo@xa\flo@ya\flo@xb\flo@yb
      \flo@calc\flo@t{\flo@bst+0.3-0.9*\flo@clf-0.25*(1-\flo@v)}%
      \flo@calc\flo@s{\flo@clfd*(0.9-0.3*\flo@clf)}%
      \flo@calc\flo@a{atan2(\flo@yb-\flo@ya,\flo@xb-\flo@xa)-90}%
      \flo@fadd\flo@xb\flo@yb\flo@a\flo@s\flo@t}%
    \flo@vstem{9}{0.012}{0.005}{0.12}}%
  \edef\flo@xa{\csname flo@AX25\endcsname}\edef\flo@ya{\csname flo@AY25\endcsname}%
  \def\flo@clf{1}\flo@axisat\flo@calc\flo@a{\flo@ah-90}%
  \flo@calc\flo@t{\flo@bst-0.6}\flo@calc\flo@s{0.6*\flo@clfd}\flo@fadd\flo@xa\flo@ya\flo@a\flo@s\flo@t
  \flo@fdraw}

% a thyrse: a raceme of small cymes, as a lilac's: an axis of #1 cm, at each node a pair
% of short stalks, each ending in a flower between two younger ones, shorter toward the
% top, where there are only buds; the lowest open first
\def\flo@thyrseunit#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone\def\flo@fnum{0}%
  \flo@calc\flo@clfd{min(0.42,0.15+0.012*\flo@get{size})}%
  \flo@axis\flo@clL{20}{0.028}%
  \flo@calc\flo@clm{int(max(6,min(11,\flo@get{count}/2.5)))}%
  \flo@loop{thy}\flo@Gd{1}{\flo@clm}{%
    \flo@calc\flo@clf{0.08+0.84*(\the\flo@Gd-1)/max(1,\flo@clm-1)}%
    \flo@axisat
    \flo@loop{thys}\flo@n{0}{1}{%
      \ifnum\flo@n=0 \def\flo@sg{1}\else\def\flo@sg{-1}\fi
      \flo@range\flo@clang{45}{65}\flo@calc\flo@clh{\flo@ah+\flo@sg*\flo@clang}%
      \flo@range\flo@t{0.8}{1.2}\flo@calc\flo@cll{\flo@clL*0.17*(1-0.75*\flo@clf)*\flo@t}%
      \flo@calc\flo@xa{\flo@px+\flo@cll*cos(\flo@clh)}\flo@calc\flo@ya{\flo@py+\flo@cll*sin(\flo@clh)}%
      \flo@hair\flo@px\flo@py\flo@xa\flo@ya
      \flo@calc\flo@clt{\flo@bst+0.3-1.0*\flo@clf}\flo@calc\flo@cls{\flo@clfd*(1-0.4*\flo@clf)}%
      \ifdim\flo@clf pt<0.8pt
        \flo@loop{thyc}\flo@m{0}{1}{%
          \ifnum\flo@m=0 \def\flo@t{1}\else\def\flo@t{-1}\fi
          \flo@range\flo@a{30}{50}\flo@calc\flo@a{\flo@clh+\flo@t*\flo@a}%
          \flo@calc\flo@xb{\flo@xa+0.55*\flo@cll*cos(\flo@a)}\flo@calc\flo@yb{\flo@ya+0.55*\flo@cll*sin(\flo@a)}%
          \flo@hair\flo@xa\flo@ya\flo@xb\flo@yb
          \flo@calc\flo@t{\flo@clt-0.2}\flo@calc\flo@s{0.85*\flo@cls}\flo@calc\flo@a{\flo@a-90}%
          \flo@fadd\flo@xb\flo@yb\flo@a\flo@s\flo@t}%
      \fi
      \flo@calc\flo@xa{\flo@xa+0.15*\flo@cll*cos(\flo@clh)}\flo@calc\flo@ya{\flo@ya+0.15*\flo@cll*sin(\flo@clh)}%
      \flo@calc\flo@a{\flo@clh-90}\flo@fadd\flo@xa\flo@ya\flo@a\flo@cls\flo@clt}}%
  \edef\flo@xa{\csname flo@AX25\endcsname}\edef\flo@ya{\csname flo@AY25\endcsname}%
  \def\flo@clf{1}\flo@axisat\flo@calc\flo@a{\flo@ah-90}%
  \flo@calc\flo@t{\flo@bst-0.75}\flo@calc\flo@s{0.6*\flo@clfd}\flo@fadd\flo@xa\flo@ya\flo@a\flo@s\flo@t
  \flo@fdraw}

% a corymb: stalks from along a short axis, the lower the longer, that bring their
% flowers up to one flat top #1 cm high; the outermost open first, the middle last
\def\flo@corymbunit#1{\ifdim#1pt=0pt \else\flo@corymbunit@{#1}\fi}% none at length 0 (its width divides)
\def\flo@corymbunit@#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone\def\flo@fnum{0}%
  \flo@calc\flo@clfd{min(0.6,0.3*\flo@fd)}%
  \flo@calc\flo@clm{int(max(3,min(9,min(\flo@get{count},2.6/\flo@clfd))))}%
  \flo@calc\flo@clW{\flo@clL*0.7}\flo@calc\flo@cltop{\flo@clL*0.92}\flo@calc\flo@cla{\flo@clL*0.5}%
  \flo@sym\flo@t{0.06}\flo@calc\flo@yc{0.35*\flo@cla}\flo@calc\flo@yd{0.7*\flo@cla}%
  \flo@vtone{flo@c}{0.1}%
  \flo@vstroke{flo@c}{0.5}{1}{0}{\pgfpathmoveto{\flo@P00}\pgfpathcurveto{\flo@P\flo@t\flo@yc}{\flo@P\flo@t\flo@yd}{\flo@P0\flo@cla}}%
  \flo@chance{0.5}\ifflo@yes\def\flo@clsg{1}\else\def\flo@clsg{-1}\fi
  \flo@loop{cor}\flo@Gd{1}{\flo@clm}{%
    \flo@calc\flo@v{(\the\flo@Gd-1)/max(1,\flo@clm-1)}%
    \flo@calc\flo@clsg{-\flo@clsg}%
    \flo@calc\flo@ya{\flo@cla*(0.12+0.88*\flo@v)}%
    \flo@range\flo@t{0.75}{1}\flo@calc\flo@xb{\flo@clsg*\flo@clW*(1-0.85*\flo@v)*\flo@t}%
    \flo@sym\flo@t{0.08}\flo@calc\flo@yb{\flo@cltop-0.32*\flo@xb*\flo@xb/\flo@clW+\flo@t}%
    \flo@calc\flo@xc{0.55*\flo@xb}\flo@calc\flo@yc{\flo@ya+0.25*(\flo@yb-\flo@ya)}%
    \flo@calc\flo@xd{0.95*\flo@xb}\flo@calc\flo@yd{\flo@yb-0.45*(\flo@yb-\flo@ya)}%
    \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.3}{0.9}{0}{\pgfpathmoveto{\flo@P0\flo@ya}%
      \pgfpathcurveto{\flo@P\flo@xc\flo@yc}{\flo@P\flo@xd\flo@yd}{\flo@P\flo@xb\flo@yb}}%
    \flo@calc\flo@t{\flo@bst-0.35*\flo@v}\flo@range\flo@s{0.85}{1.1}\flo@calc\flo@s{\flo@clfd*\flo@s}%
    \flo@calc\flo@a{-20*\flo@xb/\flo@clW}\flo@fadd\flo@xb\flo@yb\flo@a\flo@s\flo@t}%
  \flo@vtone{flo@c}{0.12}\flo@sym\flo@xb{0.04}%
  \flo@vstroke{flo@c}{0.3}{0.9}{0}{\pgfpathmoveto{\flo@P0\flo@cla}\pgfpathlineto{\flo@P\flo@xb\flo@cltop}}%
  \flo@calc\flo@t{\flo@bst-0.42}\flo@calc\flo@s{0.9*\flo@clfd}\def\flo@a{0}%
  \flo@fadd\flo@xb\flo@cltop\flo@a\flo@s\flo@t
  \flo@fdraw}

% a spike: flowers without stalks crowding an axis of #1 cm, alternately left, right and
% in front, smaller toward the tip, which is all buds; the lowest open first
\def\flo@spikeunit#1{%
  \edef\flo@bst{\flo@ust}\flo@stone\def\flo@fnum{0}%
  \flo@calc\flo@clfd{min(0.5,0.2+0.014*\flo@get{size})}%
  \flo@axis{#1}{14}{0.03}%
  \flo@calc\flo@clm{int(max(14,min(30,\flo@get{count}+4)))}%
  \flo@loop{spk}\flo@Gd{1}{\flo@clm}{%
    \flo@sym\flo@t{0.01}\flo@calc\flo@clf{0.06+0.92*(\the\flo@Gd-1)/max(1,\flo@clm-1)+\flo@t}%
    \flo@axisat
    \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@s{\flo@clfd*(1-0.45*\flo@clf)*\flo@t}%
    \flo@calc\flo@t{\flo@bst+0.35-1.2*\flo@clf}%
    \flo@calc\flo@clk{int(mod(\the\flo@Gd,3))}%
    \ifnum\flo@clk=0
      \flo@sym\flo@a{10}\flo@calc\flo@a{\flo@ah-90+\flo@a}%
      \flo@fadd\flo@px\flo@py\flo@a\flo@s\flo@t
    \else
      \ifnum\flo@clk=1 \def\flo@sg{1}\else\def\flo@sg{-1}\fi
      \flo@range\flo@a{30}{55}\flo@calc\flo@a{\flo@ah-90+\flo@sg*\flo@a}%
      \flo@calc\flo@xa{\flo@px+\flo@pnx*\flo@sg*0.42*\flo@s}\flo@calc\flo@ya{\flo@py+\flo@pny*\flo@sg*0.42*\flo@s}%
      \flo@fadd\flo@xa\flo@ya\flo@a\flo@s\flo@t
    \fi}%
  \flo@fdraw}

% a simple umbel: rays from one point, about #1 cm long, fanning upward to a dome, each
% ending in a flower; the outermost open first (or the middle, as the species has it);
% bracts at the base
\def\flo@umbelsunit#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone\def\flo@fnum{0}\edef\flo@oo{\flo@get{openorder}}%
  \flo@calc\flo@clfd{min(0.8,0.24+0.02*\flo@get{size})}%
  \flo@calc\flo@clm{int(max(4,min(12,\flo@get{count})))}%
  \flo@range\flo@clang{50}{75}%
  \flo@loop{ums}\flo@Gd{1}{\flo@clm}{%
    \ifodd\flo@Gd\edef\flo@clk{\the\numexpr(\flo@Gd+1)/2\relax}\else\edef\flo@clk{\the\numexpr\flo@clm+1-\flo@Gd/2\relax}\fi
    \flo@calc\flo@clf{(\flo@clk-(\flo@clm+1)/2)/max(1,(\flo@clm-1)/2)}%
    \flo@sym\flo@t{5}\flo@calc\flo@a{90+\flo@clf*\flo@clang+\flo@t}%
    \flo@range\flo@t{0.88}{1.05}\flo@calc\flo@clR{\flo@clL*\flo@t*(1-0.12*abs(\flo@clf))}%
    \flo@calc\flo@xb{\flo@clR*cos(\flo@a)}\flo@calc\flo@yb{\flo@clR*sin(\flo@a)}%
    \flo@calc\flo@xc{0.15*\flo@xb}\flo@calc\flo@yc{0.5*\flo@yb}\flo@calc\flo@xd{0.6*\flo@xb}\flo@calc\flo@yd{0.95*\flo@yb}%
    \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.9}{0}{\pgfpathmoveto{\flo@P00}%
      \pgfpathcurveto{\flo@P\flo@xc\flo@yc}{\flo@P\flo@xd\flo@yd}{\flo@P\flo@xb\flo@yb}}%
    \def\flo@tmp{center}%
    \ifx\flo@oo\flo@tmp\flo@calc\flo@t{\flo@bst-0.35*abs(\flo@clf)}\else\flo@calc\flo@t{\flo@bst-0.35*(1-abs(\flo@clf))}\fi
    \flo@sym\flo@s{0.05}\flo@calc\flo@t{\flo@t+\flo@s}%
    \flo@range\flo@s{0.85}{1.1}\flo@calc\flo@s{\flo@clfd*\flo@s}\flo@calc\flo@a{\flo@a-90}%
    \flo@fadd\flo@xb\flo@yb\flo@a\flo@s\flo@t}%
  \flo@loop{umsb}\flo@Gd{-1}{1}{%
    \flo@sym\flo@t{10}\flo@calc\flo@a{\the\flo@Gd*40+\flo@t+180}\flo@range\flo@s{0.12}{0.18}\flo@calc\flo@s{\flo@clL*\flo@s}%
    \begin{pgfscope}\pgftransformrotate{\flo@a}\pgftransformscale{\flo@s}%
      \def\flo@vl@W{0.06}\def\flo@vl@tone{}\edef\flo@vl@u{\flo@s}\flo@vleaflet\end{pgfscope}}%
  \flo@fdraw}

% a head: many small flowers packed into a ball at the end of a stalk of #1 cm, as a
% clover's, each pointing away from its center; the outermost open first
\def\flo@headunit#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone\def\flo@fnum{0}\def\flo@bfan{1}%
  \flo@axis\flo@clL{18}{0.024}%
  \def\flo@clf{1}\flo@axisat
  \flo@range\flo@t{0.9}{1.1}\flo@calc\flo@clr{(0.26+0.006*\flo@get{count})*\flo@t}%
  \flo@calc\flo@clx{\flo@px+0.75*\flo@clr*\flo@pny}\flo@calc\flo@cly{\flo@py-0.75*\flo@clr*\flo@pnx}%
  \flo@calc\flo@clm{int(max(18,min(34,\flo@get{count}+6)))}%
  \flo@loop{hd}\flo@Gd{1}{\flo@clm}{%
    \edef\flo@clk{\the\numexpr\flo@clm+1-\flo@Gd\relax}%
    \flo@calc\flo@v{sqrt(\flo@clk/\flo@clm)}\flo@calc\flo@a{137.508*\flo@clk}%
    \flo@calc\flo@xa{\flo@clx+0.8*\flo@clr*\flo@v*cos(\flo@a)}\flo@calc\flo@ya{\flo@cly+0.72*\flo@clr*\flo@v*sin(\flo@a)}%
    \flo@range\flo@t{0.9}{1.1}\flo@calc\flo@s{\flo@clr*0.65*(0.7+0.3*\flo@v)*\flo@t}%
    \flo@calc\flo@t{\flo@bst-0.45*(1-\flo@v)}\flo@calc\flo@a{\flo@a-90}%
    \flo@fadd\flo@xa\flo@ya\flo@a\flo@s\flo@t}%
  \flo@fdraw\def\flo@bfan{0}}

% catkins: two to four hanging from a short twig of #1 cm, each a stalk that bends over
% and a tapering tassel of overlapping scales with anthers at their tips, short and tight
% while young; in fruit, the fruit instead
\def\flo@catkinunit#1{%
  \edef\flo@bst{\flo@ust}\edef\flo@clL{#1}\flo@stone
  \flo@sym\flo@t{10}\flo@calc\flo@clh{90+\flo@t}\flo@sym\flo@clb{15}%
  \flo@walk{0}{0}\flo@clh\flo@clb\flo@clL{6}%
  \flo@loop{ckt}\flo@Gc{1}{7}{%
    \expandafter\edef\csname flo@AX\the\flo@Gc\endcsname{\flo@x{\the\flo@Gc}}%
    \expandafter\edef\csname flo@AY\the\flo@Gc\endcsname{\flo@y{\the\flo@Gc}}}%
  \flo@vstem{7}{0.028}{0.016}{0.1}%
  \flo@int\flo@clm{2}{4}%
  \flo@calc\flo@clw{0.11+0.02*\flo@get{size}}\flo@calc\flo@clwe{0.4*\flo@clw}%
  \ifx\flo@vf@tone\pgfutil@empty\def\flo@clt{0.4}\else\edef\flo@clt{\flo@vf@tone}\fi
  \flo@loop{ck}\flo@Gd{1}{\flo@clm}{%
    \edef\flo@clq{\the\numexpr8-\flo@Gd\relax}%
    \edef\flo@xa{\csname flo@AX\flo@clq\endcsname}\edef\flo@ya{\csname flo@AY\flo@clq\endcsname}%
    \ifodd\flo@Gd\def\flo@sg{1}\else\def\flo@sg{-1}\fi
    \flo@range\flo@t{40}{80}\flo@calc\flo@clhd{\flo@clh+\flo@clb+\flo@sg*\flo@t}%
    \ifdim\flo@bst pt>1.15pt
      \flo@calc\flo@xb{\flo@xa+0.25*cos(\flo@clhd)}\flo@calc\flo@yb{\flo@ya+0.25*sin(\flo@clhd)}%
      \flo@hair\flo@xa\flo@ya\flo@xb\flo@yb
      \def\flo@fu{0.3}\flo@calc\flo@a{\flo@clhd-90}%
      \begin{pgfscope}\pgftransformshift{\flo@P\flo@xb\flo@yb}\pgftransformrotate{\flo@a}\pgftransformscale{\flo@fu}%
        \flo@fruit\end{pgfscope}%
    \else
      % the stalk bends over and down, on the side it leans to, swaying a little
      \ifnum\flo@sg=1 \def\flo@cltg{270}\else\def\flo@cltg{-90}\fi
      \flo@range\flo@t{0.7}{1.1}\flo@calc\flo@cll{\flo@clL*2.2*\flo@t*min(1,0.45+0.6*\flo@bst)}%
      \flo@sym\flo@clph{180}\flo@calc\flo@clr{\flo@clhd-\flo@cltg}%
      \flo@put1\flo@xa\flo@ya\edef\flo@xx{\flo@xa}\edef\flo@yy{\flo@ya}\flo@calc\flo@ds{\flo@cll/18}%
      \flo@loop{ckw}\flo@Gc{1}{18}{%
        \flo@calc\flo@v{(\the\flo@Gc-0.5)/18}%
        \flo@calc\flo@a{\flo@cltg+\flo@clr*(1-min(1,\flo@v*3))+7*sin(360*\flo@v+\flo@clph)}%
        \flo@calc\flo@xx{\flo@xx+\flo@ds*cos(\flo@a)}\flo@calc\flo@yy{\flo@yy+\flo@ds*sin(\flo@a)}%
        \flo@put{\the\numexpr\flo@Gc+1\relax}{\flo@xx}{\flo@yy}}%
      \flo@vtone{flo@c}{0.1}\flo@vstroke{flo@c}{0.4}{1}{0}{\flo@smoothopen{5}}%
      % the tassel along points 4..19: a ribbon, then a scale and an anther at each point
      \flo@loop{ckc}\flo@Gc{4}{19}{%
        \edef\flo@clq{\the\numexpr\flo@Gc-3\relax}%
        \flo@zset{cx}\flo@clq{\flo@x{\the\flo@Gc}}\flo@zset{cy}\flo@clq{\flo@y{\the\flo@Gc}}}%
      \flo@loop{ckd}\flo@Gc{1}{16}{\flo@put{\the\flo@Gc}{\flo@z{cx}{\the\flo@Gc}}{\flo@z{cy}{\the\flo@Gc}}}%
      \flo@normals{16}%
      \flo@loop{cke}\flo@Gc{1}{16}{%
        \flo@zset{cn}{\the\flo@Gc}{\csname flo@NX\the\flo@Gc\endcsname}%
        \flo@zset{cm}{\the\flo@Gc}{\csname flo@NY\the\flo@Gc\endcsname}}%
      \flo@calc\flo@clsa{0.3*\flo@clwe}\flo@calc\flo@clsb{0.1*\flo@clwe}\flo@vstem{16}\flo@clsa\flo@clsb{0.12}%
      % scales on either side by turns, each leaning down and out over the next, lit on one
      % side and shaded on the other, an anther at its tip; the paper shows between them
      \flo@calc\flo@t{\flo@clt+0.06}\flo@vtone{flo@cka}\flo@t\flo@calc\flo@t{\flo@clt-0.06}\flo@vtone{flo@ckb}\flo@t
      \flo@vtone{flo@c}{0.16}%
      \flo@loop{cks}\flo@Gc{2}{16}{%
        \ifodd\flo@Gc\def\flo@sg{1}\else\def\flo@sg{-1}\fi
        \flo@calc\flo@v{(\the\flo@Gc-1)/15}\flo@calc\flo@s{\flo@clw*0.5*(1-0.55*\flo@v)}%
        \edef\flo@xa{\flo@z{cx}{\the\flo@Gc}}\edef\flo@ya{\flo@z{cy}{\the\flo@Gc}}%
        \edef\flo@clnx{\flo@z{cn}{\the\flo@Gc}}\edef\flo@clny{\flo@z{cm}{\the\flo@Gc}}%
        \flo@calc\flo@cldx{0.91*\flo@clny+0.42*\flo@sg*\flo@clnx}\flo@calc\flo@cldy{0.42*\flo@sg*\flo@clny-0.91*\flo@clnx}%
        \flo@calc\flo@xb{\flo@xa+\flo@sg*0.35*\flo@s*\flo@clnx}\flo@calc\flo@yb{\flo@ya+\flo@sg*0.35*\flo@s*\flo@clny}%
        \flo@calc\flo@clsl{min(1.04*\flo@s,max(0.75*\flo@s,1.1*\flo@ds))}%
        \flo@calc\flo@xc{\flo@clsl*\flo@cldx}\flo@calc\flo@yc{\flo@clsl*\flo@cldy}%
        \flo@calc\flo@xd{-0.65*\flo@s*\flo@cldy}\flo@calc\flo@yd{0.65*\flo@s*\flo@cldx}%
        \ifnum\flo@sg=1 \def\flo@tmp{flo@cka}\else\def\flo@tmp{flo@ckb}\fi
        \flo@vfill\flo@tmp{0.95}{0}{\pgfpathellipse{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xc\flo@yc}{\flo@P\flo@xd\flo@yd}}%
        \flo@range\flo@t{0.008}{0.014}%
        \flo@calc\flo@xc{\flo@xb+\flo@xc}\flo@calc\flo@yc{\flo@yb+\flo@yc}%
        \flo@vfill{flo@c}{0.9}{0}{\pgfpathcircle{\flo@P\flo@xc\flo@yc}{\flo@t pt}}}%
    \fi}}
% a tendril as a climber grows one, each its own: from the origin along +y it runs out a
% little bent, then coils to one side, tighter toward its tip, by its own amount, from a
% loose hook to two and a half turns (most about one). #1 its size: the run is 0.2 to
% 0.9 of it, the coil starts 0.18 to 0.35 of it in radius and closes to 0.12 to 0.45 of
% that. Points 1..45 in flo@X/Y
\newcount\flo@Gt
\def\flo@vcurl#1{%
  \edef\flo@tds{#1}%
  \flo@chance{0.5}\ifflo@yes\def\flo@tdh{1}\else\def\flo@tdh{-1}\fi
  \flo@range\flo@t{0.2}{0.9}\flo@calc\flo@tdd{\flo@tds*\flo@t/8}\flo@sym\flo@tdb{4}%
  \flo@rnd\flo@t\flo@calc\flo@tdT{\flo@tdh*(4+21*\flo@t*sqrt(\flo@t))}%
  \flo@range\flo@t{0.18}{0.35}\flo@calc\flo@tdr{\flo@tds*\flo@t}\flo@range\flo@tdq{0.12}{0.45}%
  \def\flo@tda{90}\def\flo@tdx{0}\def\flo@tdy{0}\flo@put1{0}{0}%
  \flo@loop{tdf}\flo@Gt{1}{8}{%
    \flo@calc\flo@tda{\flo@tda+\flo@tdb}%
    \flo@calc\flo@tdx{\flo@tdx+\flo@tdd*cos(\flo@tda)}\flo@calc\flo@tdy{\flo@tdy+\flo@tdd*sin(\flo@tda)}%
    \flo@put{\the\numexpr\flo@Gt+1\relax}\flo@tdx\flo@tdy}%
  \flo@loop{tdc}\flo@Gt{1}{36}{%
    \flo@calc\flo@tda{\flo@tda+\flo@tdT}%
    \flo@calc\flo@t{\flo@tdr*pow(\flo@tdq,\the\flo@Gt/36)*abs(\flo@tdT)*0.0174533}%
    \flo@calc\flo@tdx{\flo@tdx+\flo@t*cos(\flo@tda)}\flo@calc\flo@tdy{\flo@tdy+\flo@t*sin(\flo@tda)}%
    \flo@put{\the\numexpr\flo@Gt+9\relax}\flo@tdx\flo@tdy}}
% a climber's tendril on a stalk of its own, size #1 cm: \flo@vcurl, tapered as
% flora.tendril
\def\flo@vtendril#1{%
  \flo@calc\flo@t{1.6*(#1)}\flo@vcurl\flo@t
  \flo@vstem{45}{0.022}{0.004}{0.12}}

% ---------------------------------------------------------------- room
% Which 5 mm cells are taken, kept per walk: a leaf or a branch goes only where the cells
% under it are mostly free, as florilegium-grow.lua's leaves and branches go on its grid.
\newcount\flo@Oi \newcount\flo@Oj \newcount\flo@On \newcount\flo@Ot
% mark (#1 = 1) or count (#1 = 0: \flo@On taken of \flo@Ot) the cells whose centers lie in
% the disc at (#2,#3), radius #4 cm (at least 3 mm)
\def\flo@room#1#2#3#4{%
  \pgfmathtruncatemacro\flo@ox{(#2)*10+1000}\pgfmathtruncatemacro\flo@oy{(#3)*10+1000}%
  \pgfmathtruncatemacro\flo@or{max(3,(#4)*10)}%
  \flo@On=0 \flo@Ot=0
  \flo@loop{rmi}\flo@Oi{(\flo@ox-\flo@or-2)/5}{(\flo@ox+\flo@or-2)/5}{%
    \flo@loop{rmj}\flo@Oj{(\flo@oy-\flo@or-2)/5}{(\flo@oy+\flo@or-2)/5}{%
      \ifnum\numexpr(5*\flo@Oi+2-\flo@ox)*(5*\flo@Oi+2-\flo@ox)+(5*\flo@Oj+2-\flo@oy)*(5*\flo@Oj+2-\flo@oy)\relax
          >\numexpr\flo@or*\flo@or\relax
      \else\ifnum#1=1
        \expandafter\let\csname flo@rm\flo@roomid @\the\flo@Oi @\the\flo@Oj\endcsname\relax
      \else
        \advance\flo@Ot by1
        \ifcsname flo@rm\flo@roomid @\the\flo@Oi @\the\flo@Oj\endcsname\advance\flo@On by1 \fi
      \fi\fi}}}
% the share of the disc (#1,#2), radius #3, already taken: \flo@taken
\def\flo@takenat#1#2#3{\flo@room0{#1}{#2}{#3}%
  \ifnum\flo@Ot=0 \def\flo@taken{0}\else\flo@calc\flo@taken{\the\flo@On/\the\flo@Ot}\fi}

% ---------------------------------------------------------------- the inflorescence in place
% the species' inflorescence as florilegium-grow.lua's motifs, \flo@kind: solitary, umbel
% (umbels, corymbs, forked cymes: a fan), raceme (racemes, spikes, panicles, thyrses,
% coiled cymes: along an axis), head, catkin, or blossoms (the rest)
\def\flo@kindof{%
  \edef\flo@if{\flo@get{inflo}}\def\flo@kind{blossoms}%
  \def\flo@tmp{solitary}\ifx\flo@if\flo@tmp\def\flo@kind{solitary}\fi
  \def\flo@tmp{cumbel}\ifx\flo@if\flo@tmp\def\flo@kind{umbel}\fi
  \def\flo@tmp{umbel}\ifx\flo@if\flo@tmp\def\flo@kind{umbel}\fi
  \def\flo@tmp{corymb}\ifx\flo@if\flo@tmp\def\flo@kind{umbel}\fi
  \def\flo@tmp{dichasium}\ifx\flo@if\flo@tmp\def\flo@kind{umbel}\fi
  \def\flo@tmp{raceme}\ifx\flo@if\flo@tmp\def\flo@kind{raceme}\fi
  \def\flo@tmp{spike}\ifx\flo@if\flo@tmp\def\flo@kind{raceme}\fi
  \def\flo@tmp{panicle}\ifx\flo@if\flo@tmp\def\flo@kind{raceme}\fi
  \def\flo@tmp{thyrse}\ifx\flo@if\flo@tmp\def\flo@kind{raceme}\fi
  \def\flo@tmp{monochasium}\ifx\flo@if\flo@tmp\def\flo@kind{raceme}\fi
  \def\flo@tmp{head}\ifx\flo@if\flo@tmp\def\flo@kind{head}\fi
  \def\flo@tmp{catkin}\ifx\flo@if\flo@tmp\def\flo@kind{catkin}\fi}
\def\flo@Kumbel{umbel}\def\flo@Kraceme{raceme}\def\flo@Kblossoms{blossoms}\def\flo@Khead{head}\def\flo@Kcatkin{catkin}
% the room it takes at (#1,#2), axis #3 degrees, #4 times its size: a disc at
% \flo@udx,\flo@udy of radius \flo@udr (nominal sizes, no draws)
\def\flo@unitdisc#1#2#3#4{%
  \flo@kindof\flo@fdiam{#4}\def\flo@uo{0}\flo@calc\flo@udr{0.5*\flo@fd}%
  \ifx\flo@kind\flo@Kumbel\flo@calc\flo@uo{0.69*(#4)}\flo@calc\flo@udr{0.86*(#4)}\fi
  \ifx\flo@kind\flo@Kraceme\flo@calc\flo@uo{0.95*(#4)}\flo@calc\flo@udr{0.75*(#4)}\fi
  \ifx\flo@kind\flo@Kblossoms\flo@calc\flo@uo{0.5*\flo@fd}\flo@calc\flo@udr{0.8*\flo@fd}\fi
  \ifx\flo@kind\flo@Khead\flo@calc\flo@uo{0.8*(#4)}\flo@calc\flo@udr{0.5*(#4)}\fi
  \ifx\flo@kind\flo@Kcatkin\flo@calc\flo@uo{0.2*(#4)}\flo@calc\flo@udr{0.9*(#4)}\fi
  \flo@calc\flo@udx{(#1)+\flo@uo*cos(#3)}\flo@calc\flo@udy{(#2)+\flo@uo*sin(#3)}}
% The species' inflorescence at (#1,#2), its axis at #3 degrees, #4 times its size, opening
% #5 later than the plant's first flower (0..0.5); its room is marked. Draws: the stage,
% then its stream
\def\flo@unit#1#2#3#4#5{%
  \edef\flo@ux{#1}\edef\flo@uy{#2}\edef\flo@uax{#3}\flo@calc\flo@ua{(#3)-90}\edef\flo@uk{#4}\edef\flo@ulate{#5}%
  \flo@unitdisc\flo@ux\flo@uy\flo@uax\flo@uk\flo@calc\flo@t{0.85*\flo@udr}\flo@room1\flo@udx\flo@udy\flo@t
  \flo@sym\flo@t{0.08}\flo@calc\flo@ust{1.2*\flo@season-\flo@ulate+\flo@t+\flo@get{phenology}}%
  \flo@seedorgan
  \ifx\flo@kind\flo@Kumbel\def\flo@ul{4}\else\ifx\flo@kind\flo@Kraceme\def\flo@ul{4}\else\def\flo@ul{5}\fi\fi
  \flo@at\flo@ul
  \ifflo@draw\flo@organ{\pgftransformshift{\flo@P\flo@ux\flo@uy}\pgftransformrotate{\flo@ua}\flo@unitdraw\flo@uk}\fi}
\def\flo@unitdraw#1{%
  \flo@fdiam{#1}%
  \def\flo@tmp{solitary}\ifx\flo@if\flo@tmp\flo@bloom\flo@fd\flo@ust\else
  \def\flo@tmp{cumbel}\ifx\flo@if\flo@tmp
    \flo@range\flo@t{0.95}{1.35}\flo@calc\flo@t{\flo@t*(#1)}\flo@umbelunit\flo@t\flo@ust\else
  \flo@range\flo@t{1.5}{2.3}\flo@calc\flo@L{\flo@t*(#1)}%
  \def\flo@tmp{raceme}\ifx\flo@if\flo@tmp\flo@racemeunit\flo@L{0.3}{40}\else
  \def\flo@tmp{spike}\ifx\flo@if\flo@tmp\flo@spikeunit\flo@L\else
  \def\flo@tmp{panicle}\ifx\flo@if\flo@tmp\flo@panicleunit\flo@L\else
  \def\flo@tmp{thyrse}\ifx\flo@if\flo@tmp\flo@thyrseunit\flo@L\else
  \def\flo@tmp{monochasium}\ifx\flo@if\flo@tmp\flo@curlunit\flo@L\else
  \def\flo@tmp{catkin}\ifx\flo@if\flo@tmp\flo@calc\flo@L{0.3*\flo@L}\flo@catkinunit\flo@L\else
  \def\flo@tmp{dichasium}\ifx\flo@if\flo@tmp\flo@calc\flo@L{0.8*\flo@L}\flo@forkunit\flo@L\else
  \def\flo@tmp{corymb}\ifx\flo@if\flo@tmp\flo@calc\flo@L{0.75*\flo@L}\flo@corymbunit\flo@L\else
  \def\flo@tmp{umbel}\ifx\flo@if\flo@tmp\flo@calc\flo@L{0.55*\flo@L}\flo@umbelsunit\flo@L\else
  \def\flo@tmp{head}\ifx\flo@if\flo@tmp\flo@calc\flo@L{0.35*\flo@L}\flo@headunit\flo@L\else
  \flo@calc\flo@fd{0.85*\flo@fd}\flo@blossoms\flo@fd\flo@ust
  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
% opening order down the plant: from the top (cymes, solitary flowers) or from below; #1
% the height on the plant (0..1): \flo@late
\def\flo@lateness#1{%
  \edef\flo@if{\flo@get{inflo}}\def\flo@below{0}%
  \def\flo@tmp{raceme}\ifx\flo@if\flo@tmp\def\flo@below{1}\fi
  \def\flo@tmp{spike}\ifx\flo@if\flo@tmp\def\flo@below{1}\fi
  \def\flo@tmp{catkin}\ifx\flo@if\flo@tmp\def\flo@below{1}\fi
  \ifnum\flo@below=1 \flo@calc\flo@late{0.4*(#1)}\else\flo@calc\flo@late{0.4*(1-(#1))}\fi}
% autumn: some leaves of a species whose leaves turn go copper (\flo@lc drawn before);
% spring: young leaves paler
\def\flo@autumnleaf{%
  \ifnum\flo@get{turns}=1 \flo@calc\flo@t{max(0,\flo@season-0.9)}%
    \ifdim\flo@lc pt<\flo@t pt \def\flo@rampname{flo@aramp}\fi\fi
  \ifdim\flo@season pt<0.5pt \flo@calc\flo@lift{0.3*(1-\flo@season/0.5)}\fi}

% ---------------------------------------------------------------- the main stem
% its x at height #1 (cm), into \flo@sx: from \flo@root at the root into its lane \flo@pc
% over the first 3 cm, waving \flo@pA either side of it
\def\flo@stemx#1{%
  \flo@calc\flo@sb{min(1,max(0,(#1)/3))}%
  \flo@calc\flo@sx{\flo@root+\flo@sb*\flo@sb*(3-2*\flo@sb)*(\flo@pc-\flo@root+\flo@pA*(0.62*sin(360*(#1)/\flo@plam+\flo@pph)+0.38*sin(766.8*(#1)/\flo@plam+\flo@pps)))}}
% and its direction there, \flo@tx,\flo@ty (\flo@sx as above)
\def\flo@stemtan#1{%
  \flo@stemx{(#1)+0.05}\let\flo@sxa\flo@sx\flo@stemx{(#1)-0.05}%
  \flo@calc\flo@t{veclen(\flo@sxa-\flo@sx,0.1)}%
  \flo@calc\flo@tx{(\flo@sxa-\flo@sx)/\flo@t}\flo@calc\flo@ty{0.1/\flo@t}%
  \flo@stemx{#1}}
\def\flo@drawstem{%
  \pgfmathtruncatemacro\flo@sn{max(2,\flo@pH/0.25+1)}% two points at least, under 2.5 mm
  \flo@loop{stp}\flo@Gd{1}{\flo@sn}{%
    \flo@calc\flo@t{\flo@pH*(\the\flo@Gd-1)/(\flo@sn-1)}\flo@stemx\flo@t
    \flo@put{\the\flo@Gd}{\flo@sx}{\flo@t}}%
  \flo@vstem\flo@sn\flo@pw{0.028}{0.07}}
\def\flo@markstem{%
  \pgfmathtruncatemacro\flo@msn{\flo@pH/0.6}%
  \flo@loop{mks}\flo@Gd{1}{\flo@msn}{%
    \flo@calc\flo@my{0.6*\the\flo@Gd-0.3}\flo@stemx\flo@my\flo@room1\flo@sx\flo@my{0.2}}}

% ---------------------------------------------------------------- a plant, in four passes
% A garden's walk takes every plant through four passes, as florilegium-grow.lua grows
% the margin: 1. stems and the inflorescence at each top, 2. leaves, 3. branches from the
% nodes, 4. more branches wherever there is room (three rounds). Each plant keeps its
% layout stream from pass to pass.
% the plant \flo@Ga's parameters and stream
\def\flo@plantsetup{%
  \flo@calc\flo@root{(\the\flo@Ga-2)*0.25}\flo@calc\flo@pc{(\the\flo@Ga-2)*0.35}%
  \ifnum\flo@Np=1 \def\flo@root{0}\def\flo@pc{0}\fi
  \ifnum\flo@Ga=1 \def\flo@pw{0.085}\else\def\flo@pw{0.065}\fi
  \edef\flo@pH{\csname flo@pp@H\the\flo@Ga\endcsname}%
  \edef\flo@tmp{\noexpand\florilegiumspecies[{\flo@o@traits}]{\csname flo@pp@s\the\flo@Ga\endcsname}{\csname flo@pp@r\the\flo@Ga\endcsname}}\flo@tmp
  \xdef\pgfmath@rnd@z{\csname flo@pp@w\the\flo@Ga\endcsname}}
\def\flo@plantsave{\expandafter\xdef\csname flo@pp@w\the\flo@Ga\endcsname{\pgfmath@rnd@z}}
% 1. the stem and the inflorescence at its top
\def\flo@passstem{%
  \flo@range\flo@pph{0}{360}\flo@range\flo@pps{0}{360}\flo@range\flo@plam{5}{8}%
  \expandafter\edef\csname flo@pp@f\the\flo@Ga\endcsname{{\flo@pph}{\flo@pps}{\flo@plam}}%
  \flo@markstem
  \flo@at\flo@Lstem\ifflo@draw\begin{pgfscope}\flo@drawstem\end{pgfscope}\fi
  \flo@lateness{1}\let\flo@topoff\flo@late
  \flo@stemtan\flo@pH\flo@calc\flo@a{atan2(\flo@ty,\flo@tx)}%
  \flo@unit\flo@sx\flo@pH\flo@a{1.15}\flo@topoff}
\def\flo@stemload{\expandafter\expandafter\expandafter\flo@stemload@\csname flo@pp@f\the\flo@Ga\endcsname}
\def\flo@stemload@#1#2#3{\def\flo@pph{#1}\def\flo@pps{#2}\def\flo@plam{#3}}
% 2. leaves at nodes up the stem (each node kept for pass 3), a rosette at the root, or a
% monocot's strap leaves; a monocot with alternate or whorled leaves (a lily's) carries
% them up the stem as a eudicot does
\def\flo@passleaves{%
  \flo@stemload\flo@Ge=0 \flo@leafcof
  \edef\flo@cl{\flo@get{clade}}\def\flo@tmp{monocot}%
  \ifx\flo@cl\flo@tmp
    \edef\flo@arr{\flo@get{arrangement}}%
    \def\flo@tmp{alternate}\ifx\flo@arr\flo@tmp\def\flo@cl{leafy}\fi
    \def\flo@tmp{whorled}\ifx\flo@arr\flo@tmp\def\flo@cl{leafy}\fi
    \def\flo@tmp{monocot}%
  \fi
  \ifx\flo@cl\flo@tmp\flo@monocotleaves\else\flo@eudicotleaves\fi
  \expandafter\edef\csname flo@nd@n\the\flo@Ga\endcsname{\the\flo@Ge}}
% how much longer than v1.3's the species' leaves are drawn, so that they carry about as
% much ink (\flo@leafc): compound leaves a third longer, so that their leaflets read as
% leaves; a narrow blade longer as it is narrower (v1.3's leaf is about 2.2 times as long
% as it is wide), up to 1.45 times. florilegium-grow.lua's leafc_of is the same
\def\flo@leafcof{\edef\flo@t{\flo@get{compound}}\def\flo@tmp{simple}%
  \ifx\flo@t\flo@tmp\flo@calc\flo@leafc{min(1.45,max(1,sqrt(\flo@get{leafaspect}/2.2)))}\else\def\flo@leafc{1.35}\fi}
\def\flo@eudicotleaves{%
  \edef\flo@arr{\flo@get{arrangement}}\def\flo@per{1}\def\flo@gap{1}\def\flo@leafk{1}%
  \def\flo@tmp{opposite}\ifx\flo@arr\flo@tmp\def\flo@per{2}\def\flo@gap{1.3}\fi
  \def\flo@tmp{whorled}\ifx\flo@arr\flo@tmp\def\flo@per{3}\def\flo@gap{1.4}\fi
  \def\flo@tmp{rosette}\ifx\flo@arr\flo@tmp\flo@rosette\def\flo@gap{1.6}\def\flo@leafk{0.4}\fi
  \flo@range\flo@ny{0.7}{1.3}\flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
  \flo@calc\flo@nlast{\flo@pH-1.6}%
  \flo@nodes}
\def\flo@nodes{%
  \ifdim\flo@ny pt<\flo@nlast pt
    \advance\flo@Ge by1 \flo@nodeleaves
    \flo@range\flo@t{1.2}{1.9}\flo@calc\flo@ny{\flo@ny+\flo@t*\flo@gap}%
    \expandafter\flo@nodes
  \fi}
% the node at \flo@ny: \flo@nx, \flo@nyy, the stem's direction (\flo@ntx,\flo@nty; \flo@ta
% degrees) and width \flo@nw there, the height on the plant \flo@u
\def\flo@nodeat{%
  \edef\flo@nyy{\flo@ny}\flo@calc\flo@u{\flo@nyy/\flo@pH}\edef\flo@u{\flo@u}%
  \flo@stemtan\flo@nyy\edef\flo@nx{\flo@sx}\edef\flo@ntx{\flo@tx}\edef\flo@nty{\flo@ty}%
  \flo@calc\flo@ta{atan2(\flo@nty,\flo@ntx)}\edef\flo@ta{\flo@ta}%
  \flo@calc\flo@nw{\flo@pw+(0.028-\flo@pw)*\flo@u}\edef\flo@nw{\flo@nw}}
% the leaves of a node (by the arrangement), sides alternating from node to node, smaller
% up the stem by the species' taper (the top's to the bottom's); every other opposite pair
% turned across the last (decussate) points toward the viewer and away, so it is drawn
% close to the stem and foreshortened (\flo@fore); a sheathing leaf's sheath follows the
% stem (\flo@lsd: its direction from the leaf's)
\def\flo@nodeleaves{%
  \flo@nodeat
  \flo@calc\flo@side{-1*(\flo@side)}\edef\flo@side{\flo@side}%
  \expandafter\edef\csname flo@nd@\the\flo@Ga @\the\flo@Ge\endcsname{{\flo@nyy}{\flo@side}}%
  \flo@loop{nl}\flo@Gb{1}{\flo@per}{%
    \ifnum\flo@Gb=2 \flo@calc\flo@ls{-1*(\flo@side)}\else\edef\flo@ls{\flo@side}\fi
    \flo@range\flo@t{35}{60}\ifnum\flo@Gb=3 \flo@range\flo@t{8}{20}\fi
    \ifnum\flo@per=2 \ifodd\flo@Ge\else\flo@calc\flo@t{0.55*\flo@t}\def\flo@fore{0.55}\fi\fi
    \flo@calc\flo@la{\flo@ta+\flo@ls*\flo@t}\flo@calc\flo@lsd{\flo@ta-\flo@la}%
    \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@lf{2.6*(1-(1-\flo@get{taper})*\flo@u)*\flo@t*\flo@leafk*\flo@leafc*(\the\flo@Gb==3 ? 0.7 : 1)}%
    \flo@range\flo@t{0.05}{0.3}\flo@calc\flo@sbend{\flo@ls*\flo@t}%
    \flo@rnd\flo@lc
    \flo@seedorgan
    \flo@placeleaf\flo@nx\flo@nyy}}
\def\flo@fore{1}\def\flo@lsd{}
% a leaf of the species from (#1,#2) at \flo@la degrees, \flo@lf cm long, or shorter where
% its room is taken (three tries, each 3/4 of the last), or none; its stream \flo@os
\def\flo@placeleaf#1#2{%
  \edef\flo@lx{#1}\edef\flo@ly{#2}\def\flo@ok{0}%
  \flo@loop{plf}\flo@Gd{1}{3}{%
    \ifnum\flo@ok=0
      \flo@calc\flo@mx{\flo@lx+cos(\flo@la)*\flo@lf*\flo@fore*0.55}\flo@calc\flo@my{\flo@ly+sin(\flo@la)*\flo@lf*\flo@fore*0.55}%
      \flo@calc\flo@t{0.24*\flo@lf}\flo@takenat\flo@mx\flo@my\flo@t
      \ifdim\flo@taken pt<0.2pt \def\flo@ok{1}\else\flo@calc\flo@lf{0.75*\flo@lf}\fi
    \fi}%
  \ifdim\flo@lf pt<0.45pt \def\flo@ok{0}\fi
  \ifnum\flo@ok=1
    \flo@loop{plm}\flo@Gd{1}{3}{%
      \flo@calc\flo@t{(0.05+0.25*\the\flo@Gd)*\flo@lf*\flo@fore}%
      \flo@calc\flo@mx{\flo@lx+cos(\flo@la)*\flo@t}\flo@calc\flo@my{\flo@ly+sin(\flo@la)*\flo@t}%
      \flo@calc\flo@t{0.2*\flo@lf}\flo@room1\flo@mx\flo@my\flo@t}%
    \flo@at\flo@Lleaf\ifflo@draw\flo@organ{%
      \pgftransformshift{\flo@P\flo@lx\flo@ly}\flo@calc\flo@t{\flo@la-90}\pgftransformrotate{\flo@t}%
      \pgftransformscale{\flo@lf}\ifdim\flo@fore pt<1pt \pgftransformyscale{\flo@fore}\fi\flo@autumnleaf
      \ifx\flo@lsd\pgfutil@empty\else\flo@calc\flo@lsw{1.8*\flo@nw/\flo@lf}\fi
      \flo@calc\flo@oarg{\flo@lf*28.45276}\flo@leaf\flo@oarg}\fi
  \fi
  \def\flo@fore{1}\def\flo@lsd{}}
% basal leaves of a rosette: three to five, spread low
\def\flo@rosette{%
  \flo@int\flo@nb{3}{5}%
  \flo@loop{ros}\flo@Gb{1}{\flo@nb}{%
    \flo@calc\flo@f{(\the\flo@Gb-(\flo@nb+1)/2)/max(1,(\flo@nb-1)/2)}%
    \flo@sym\flo@t{8}\flo@calc\flo@la{90-62*\flo@f+\flo@t}%
    \flo@range\flo@lf{1.6}{2.3}\flo@range\flo@t{0.05}{0.3}\flo@calc\flo@sbend{(\flo@f<0 ? 1 : -1)*\flo@t}%
    \flo@calc\flo@lf{\flo@lf*\flo@leafc}%
    \flo@rnd\flo@lc\flo@seedorgan\flo@placeleaf\flo@root{0.1}}}
% a monocot (an iris's or a grass's leaves, or a rosette): three to five strap leaves
% arching from the root, two nodes up the stem
\def\flo@monocotleaves{%
  \flo@int\flo@nb{3}{5}%
  \flo@loop{mb}\flo@Gb{1}{\flo@nb}{%
    \flo@calc\flo@f{(\the\flo@Gb-(\flo@nb+1)/2)/max(1,(\flo@nb-1)/2)}%
    \flo@sym\flo@t{5}\flo@calc\flo@la{90-24*\flo@f+\flo@t}%
    \flo@range\flo@t{0.3}{0.46}\flo@calc\flo@lf{min(7,\flo@pH*\flo@t)*(1-0.25*abs(\flo@f))}%
    \flo@range\flo@t{0.1}{0.35}\flo@calc\flo@sbend{(\flo@f<0 ? -1 : 1)*\flo@t}%
    \flo@rnd\flo@lc\flo@seedorgan\flo@calc\flo@t{\flo@root+0.12*\flo@f}\flo@placeleaf\flo@t{0}}%
  \flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
  \def\flo@per{1}\def\flo@leafk{0.75}%
  \flo@range\flo@ny{0.22}{0.3}\flo@calc\flo@ny{\flo@ny*\flo@pH}\advance\flo@Ge by1 \flo@nodeleaves
  \flo@range\flo@ny{0.42}{0.52}\flo@calc\flo@ny{\flo@ny*\flo@pH}\advance\flo@Ge by1 \flo@nodeleaves}
% 3. branches from the nodes, where there is room
\def\flo@passbranches{%
  \flo@stemload
  \edef\flo@nnodes{\csname flo@nd@n\the\flo@Ga\endcsname}%
  \flo@loop{pbr}\flo@Ge{1}{\flo@nnodes}{%
    \expandafter\expandafter\expandafter\flo@nodeload\csname flo@nd@\the\flo@Ga @\the\flo@Ge\endcsname
    \flo@nodeat
    \flo@rnd\flo@t\flo@calc\flo@t{\flo@t<(\the\flo@Ge==1 ? 0.35 : 0.85) ? 1 : 0}%
    \ifdim\flo@t pt>0.5pt \flo@branch\fi}}
\def\flo@nodeload#1#2{\def\flo@ny{#1}\def\flo@side{#2}}
% a branch from the node, opposite its leaf: first what it carries (the inflorescence,
% buds, or a curl on a climber), then the freest of three places for it
\def\flo@branch{%
  \flo@lateness\flo@u\flo@rnd\flo@mk
  \edef\flo@hb{\flo@get{habit}}\def\flo@tmp{climbing}%
  \ifx\flo@hb\flo@tmp\def\flo@climb{1}\else\edef\flo@climb{\flo@get{tendrils}}\fi
  \ifnum\flo@filling=1 \flo@calc\flo@mk{\flo@mk*1.25-0.25}\fi
  \ifdim\flo@mk pt<0pt \def\flo@what{4}\flo@leafcof\flo@range\flo@lf{1.1}{2}\flo@calc\flo@lf{\flo@lf*\flo@leafc}%
  \else\ifdim\flo@mk pt<0.6pt \def\flo@what{1}\flo@range\flo@usc{0.7}{0.9}\let\flo@ulate\flo@late
  \else\ifdim\flo@mk pt<0.82pt \def\flo@what{2}%
  \else\ifnum\flo@climb=1 \def\flo@what{3}%
  \else\def\flo@what{1}\def\flo@usc{0.6}\flo@calc\flo@ulate{\flo@late+0.1}\fi\fi\fi\fi
  \def\flo@best{2}%
  \flo@loop{bca}\flo@Gd{1}{3}{%
    \flo@range\flo@t{1.4}{3.2}\flo@calc\flo@cd{\flo@t*(1-0.25*\flo@u)}%
    \flo@range\flo@t{25}{75}\flo@calc\flo@cg{90+\flo@side*\flo@t}%
    \flo@calc\flo@cbx{max(\flo@pxmin,min(\flo@pxmax,\flo@nx-\flo@cd*cos(\flo@cg)))}%
    \flo@calc\flo@cby{\flo@nyy+\flo@cd*sin(\flo@cg)}%
    \flo@calc\flo@cax{\flo@cbx-\flo@nx}\flo@calc\flo@cay{\flo@cby-\flo@nyy}\flo@calc\flo@t{veclen(\flo@cax,\flo@cay)}%
    \flo@calc\flo@cax{\flo@cax/\flo@t}\flo@calc\flo@cay{\flo@cay/\flo@t+0.6}\flo@calc\flo@t{veclen(\flo@cax,\flo@cay)}%
    \flo@calc\flo@cax{\flo@cax/\flo@t}\flo@calc\flo@cay{\flo@cay/\flo@t}\flo@calc\flo@caa{atan2(\flo@cay,\flo@cax)}%
    \ifcase\flo@what\or\flo@unitdisc\flo@cbx\flo@cby\flo@caa\flo@usc
    \or\flo@calc\flo@udx{\flo@cbx+0.35*\flo@cax}\flo@calc\flo@udy{\flo@cby+0.35*\flo@cay}\def\flo@udr{0.5}%
    \or\edef\flo@udx{\flo@cbx}\edef\flo@udy{\flo@cby}\def\flo@udr{0.35}%
    \or\flo@calc\flo@udx{\flo@cbx+0.5*\flo@lf*\flo@cax}\flo@calc\flo@udy{\flo@cby+0.5*\flo@lf*\flo@cay}%
      \flo@calc\flo@udr{0.32*\flo@lf}\fi
    \flo@takenat\flo@udx\flo@udy\flo@udr
    \ifdim\flo@taken pt<\flo@best pt
      \let\flo@best\flo@taken\let\flo@bx\flo@cbx\let\flo@by\flo@cby
      \let\flo@ax\flo@cax\let\flo@ay\flo@cay\let\flo@a\flo@caa
      \let\flo@bdx\flo@udx\let\flo@bdy\flo@udy\let\flo@bdr\flo@udr
    \fi}%
  \ifdim\flo@best pt<0.3pt \flo@branchto\fi}
% the branch to (\flo@bx,\flo@by), a leaflet or two along it, and what it carries
\def\flo@branchto{%
  \flo@branchpath\flo@nx\flo@nyy\flo@ntx\flo@nty\flo@bx\flo@by\flo@ax\flo@ay
  \flo@loop{bmk}\flo@Gd{1}{3}{\flo@calc\flo@t{0.25*\the\flo@Gd}\flo@cubicat\flo@t\flo@room1\flo@cx\flo@cy{0.15}}%
  \flo@calc\flo@w{min(0.7*\flo@nw,0.05)}\flo@calc\flo@wb{max(0.012,0.45*\flo@w)}%
  \flo@at\flo@Lstem\ifflo@draw\flo@cubicstem\flo@w\flo@wb\fi
  \ifdim\flo@d pt>1.2pt
    \ifdim\flo@d pt>2.2pt \def\flo@nl{2}\else\def\flo@nl{1}\fi
    \flo@loop{brl}\flo@Gb{1}{\flo@nl}{%
      \flo@calc\flo@t{0.25+0.3*\the\flo@Gb/\flo@nl}\flo@cubicat\flo@t
      \flo@range\flo@t{40}{60}\flo@calc\flo@la{\flo@ca+(\the\flo@Gb==1 ? -1 : 1)*\flo@side*\flo@t-90}%
      \flo@range\flo@lf{0.45}{0.75}%
      \flo@seedorgan
      \flo@at\flo@Lleaf\ifflo@draw\flo@organ{\pgftransformshift{\flo@P\flo@cx\flo@cy}\pgftransformrotate{\flo@la}%
        \pgftransformscale{\flo@lf}\def\flo@vl@W{}\def\flo@vl@tone{}\edef\flo@vl@u{\flo@lf}\flo@vleaflet}\fi}%
  \fi
  \ifcase\flo@what\or
    \flo@unit\flo@bx\flo@by\flo@a\flo@usc\flo@ulate
  \or
    \flo@calc\flo@t{0.85*\flo@bdr}\flo@room1\flo@bdx\flo@bdy\flo@t
    \flo@seedorgan
    \flo@at\flo@Lbloom\ifflo@draw\flo@organ{\pgftransformshift{\flo@P\flo@bx\flo@by}\flo@calc\flo@t{\flo@a-90}%
      \pgftransformrotate{\flo@t}\flo@fdiam{0.6}\flo@calc\flo@fd{min(1.1,\flo@fd)}\flo@budding\flo@fd}\fi
  \or
    \flo@calc\flo@t{0.85*\flo@bdr}\flo@room1\flo@bdx\flo@bdy\flo@t
    \flo@seedorgan
    \flo@at\flo@Lairy\ifflo@draw\flo@organ{\pgftransformshift{\flo@P\flo@bx\flo@by}\flo@calc\flo@t{\flo@a}%
      \pgftransformrotate{\flo@t}\flo@range\flo@oarg{0.3}{0.5}\flo@vtendril\flo@oarg}\fi
  \or
    \flo@calc\flo@t{0.85*\flo@bdr}\flo@room1\flo@bdx\flo@bdy\flo@t
    \flo@range\flo@t{0.05}{0.3}\flo@calc\flo@sbend{\flo@side*\flo@t}\flo@rnd\flo@lc
    \flo@seedorgan
    \flo@at\flo@Lleaf\ifflo@draw\flo@organ{\pgftransformshift{\flo@P\flo@bx\flo@by}\flo@calc\flo@t{\flo@a-90}%
      \pgftransformrotate{\flo@t}\pgftransformscale{\flo@lf}\flo@autumnleaf
      \flo@calc\flo@oarg{\flo@lf*28.45276}\flo@leaf\flo@oarg}\fi
  \fi}
% 4. more branches, from anywhere up the stem, while there is room: three rounds of a few
% tries for each plant in turn, as florilegium-grow.lua's branch loop fills the holes (the
% rounds count with \flo@Gf, which nothing inside them uses)
\def\flo@filling{0}
\def\flo@passfill{%
  \flo@stemload\def\flo@filling{1}%
  \flo@loop{pfl}\flo@Ge{1}{\flo@ftries}{%
    \flo@range\flo@ny{0.12}{0.93}\flo@calc\flo@ny{\flo@ny*\flo@pH}%
    \flo@chance{0.5}\ifflo@yes\def\flo@side{1}\else\def\flo@side{-1}\fi
    \flo@nodeat\flo@branch}%
  \def\flo@filling{0}}

% ---------------------------------------------------------------- pics
\newif\ifflo@ghost
\pgfkeys{/florilegium/.is family, /florilegium,
  seed/.store in=\flo@o@seed, role/.store in=\flo@o@role, size/.store in=\flo@o@size,
  draw/.store in=\flo@o@draw, season/.store in=\flo@o@season,
  plants/.store in=\flo@o@plants, width/.store in=\flo@o@width, ghost/.is if=flo@ghost,
  engine/.is choice, engine/auto/.code=\def\flo@o@engine{auto}, engine/lua/.code=\def\flo@o@engine{lua},
  engine/tikz/.code=\def\flo@o@engine{tikz}, scale/.store in=\flo@o@scale, traits/.store in=\flo@o@traits,
  seed=1, role=any, size=2cm, draw=, season=0.75, plants=, width=6cm, ghost=true, engine=auto, scale=1,
  traits=}
% engine=lua: florilegium-native.lua draws the pic straight into the picture with the same
% steps and random draws as this file's TikZ code, computed in doubles (the same plant,
% its numbers within a fraction of a point), and tells pgf how large it is: some fifty
% times faster. engine=tikz: pgfmath computes and TikZ draws, under any engine.
% engine=auto (the default): lua under LuaLaTeX when florilegium-native.lua can be
% found, tikz otherwise
\def\flo@lua{lua}\def\flo@auto{auto}
\ifdefined\directlua
  \edef\flo@autoengine{\directlua{
    local ok, f = pcall(kpse.find_file, "florilegium-native.lua", "lua")
    tex.sprint(ok and f and "lua" or "tikz")}}
\else
  \def\flo@autoengine{tikz}
\fi
\def\flo@nolua{\pgfutil@packagewarning{florilegium}{engine=lua needs LuaLaTeX; drawing in pure TikZ}%
  \global\let\flo@nolua\relax}
% the document's ink and accent as r,g,b for Lua (\flo@colors without the ramps, which
% Lua builds itself)
\def\flo@picrgb{%
  \pgfutil@ifundefined{\string\color@ink}{\definecolor{flo@ink}{HTML}{2456C4}}{\colorlet{flo@ink}{ink}}%
  \pgfutil@ifundefined{\string\color@accent}{\definecolor{flo@accent}{HTML}{B4662F}}{\colorlet{flo@accent}{accent}}%
  \extractcolorspecs{flo@ink}{\flo@cmodel}{\flo@cspec}\convertcolorspec{\flo@cmodel}{\flo@cspec}{rgb}\flo@picink
  \extractcolorspecs{flo@accent}{\flo@cmodel}{\flo@cspec}\convertcolorspec{\flo@cmodel}{\flo@cspec}{rgb}\flo@picacc}
% a seed as \pgfmathsetseed takes it: the expression's value, the digits before the point
% (a plain number stays as written)
\def\flo@intof#1#2{\pgfmathparse{#2}\expandafter\flo@intof@\pgfmathresult.\relax#1}
\def\flo@intof@#1.#2\relax#3{\def#3{#1}}
% a number for \directlua as TeX holds it, so that nothing but digits, a minus sign and a
% point reaches the Lua string: a whole number as pgf's generator reads a seed (a count
% register), a pgfmath result as a dimen
\def\flo@luanum#1{\count@=#1\relax\edef#1{\the\count@}}
\def\flo@luadim#1#2{\pgfmathparse{#2}\dimen@=\pgfmathresult pt\relax\edef#1{\pgf@sys@tonumber\dimen@}}
% the keys for Lua as the TikZ code reads them: the seeds as \pgfmathsetseed, the season
% and the scale as pgfmath's numbers, the plants as \flo@parseplants lists them
\def\flo@luapic#1#2{%
  \pgfkeys{/florilegium,#2}\flo@picrgb
  \flo@intof\flo@luaseed\flo@o@seed
  \ifnum\flo@luaseed<1 \flo@badseed\flo@luaseed\else\ifnum\flo@luaseed>2147483646 \flo@badseed\flo@luaseed\fi\fi
  \flo@luanum\flo@luaseed
  \def\flo@luakind{#1}\def\flo@t{visitor}%
  \ifx\flo@luakind\flo@t
    \flo@isrole{flo@vrole@}{\flo@o@role}\ifflo@roleok\else\flo@vroleerror{\flo@o@role}\def\flo@o@role{any}\fi
  \else
    \flo@isrole{flo@role@}{\flo@o@role}\ifflo@roleok\else\flo@roleerror{\flo@o@role}\def\flo@o@role{any}\fi
  \fi
  \ifx\flo@o@draw\pgfutil@empty\let\flo@luadraw\pgfutil@empty\else\flo@intof\flo@luadraw\flo@o@draw\flo@luanum\flo@luadraw\fi
  \flo@luadim\flo@luaseason\flo@o@season
  \flo@luadim\flo@luascale\flo@o@scale
  \let\flo@luaplants\pgfutil@empty
  \def\flo@t{plants}%
  \ifx\flo@luakind\flo@t
    \expandafter\flo@parseplants\expandafter{\flo@o@plants}%
    \flo@loop{lua}\flo@i{1}{\flo@Np}{%
      \edef\flo@luaplants{\flo@luaplants\csname flo@pp@s\the\flo@i\endcsname/\csname flo@pp@r\the\flo@i\endcsname,}}%
  \fi
  \pgfmathsetlength\pgf@x{\flo@o@size}\pgfmathsetlength\pgf@y{\flo@o@width}%
  \directlua{require("florilegium-native").tikz("#1", "\flo@luaseed",
    "\luaescapestring{\flo@o@role}", "\flo@luadraw", \number\pgf@x, \number\pgf@y,
    "\flo@luaseason", "\luaescapestring{\flo@luaplants}", "\ifflo@ghost true\else false\fi",
    "\flo@luascale", "\flo@picink", "\flo@picacc",
    "\ifcsname ver@tikzlibraryflorilegium.code.tex\endcsname\luaescapestring{\csname ver@tikzlibraryflorilegium.code.tex\endcsname}\fi",
    "\luaescapestring{\flo@o@traits}")}}
% #1 the pic's keys, #2 its kind for Lua, #3 the TikZ code
\def\flo@engine#1#2#3{\pgfkeys{/florilegium,#1}%
  \ifx\flo@o@engine\flo@auto\let\flo@o@engine\flo@autoengine\fi
  \ifx\flo@o@engine\flo@lua\ifdefined\directlua\flo@luapic{#2}{#1}\else\flo@nolua#3\fi\else#3\fi}
% sample the species, then reseed for the drawing (draw=, or the species seed + 1)
\def\flo@picsetup#1{%
  \pgfkeys{/florilegium,#1}\flo@colors\flo@intof\flo@o@seed\flo@o@seed
  \edef\flo@tmp{\noexpand\florilegiumspecies[{\flo@o@traits}]{\flo@o@seed}{\flo@o@role}}\flo@tmp
  \edef\flo@o@seed{\flo@get{seed}}\edef\flo@o@role{\flo@get{role}}% as the sampler settled them
  \ifx\flo@o@draw\pgfutil@empty
    \edef\flo@o@draw{\the\numexpr\ifnum\flo@o@seed=2147483646 1\else\flo@o@seed+1\fi\relax}\fi
  \flo@drawseed\flo@o@draw
  \pgfmathsetlength\pgf@x{\flo@o@size}\edef\flo@sizept{\pgf@sys@tonumber\pgf@x}}
% \pic {florilegium flower={seed=7, size=2cm}}: one flower face on, size its diameter
\tikzset{pics/florilegium flower/.style={code={\flo@engine{#1}{flower}{%
  \flo@picsetup{#1}%
  \pgftransformscale{\flo@sizept}%
  \flo@stone\flo@sflower\flo@sizept}}}}
% \pic {florilegium leaf={seed=7, size=4cm}}: one leaf from its base along +y, size its length
\tikzset{pics/florilegium leaf/.style={code={\flo@engine{#1}{leaf}{%
  \flo@picsetup{#1}%
  \pgftransformscale{\flo@sizept}%
  \flo@leaf\flo@sizept}}}}
% \pic {florilegium inflorescence={seed=7, role=borage, scale=1, season=0.75}}: the
% species' flowers as they grow together, from the origin along +y, as large as a margin's
% at scale 1 (a raceme's axis is then about 2 cm long); season as for a plant, the
% oldest flower's stage 1.2 times it
\tikzset{pics/florilegium inflorescence/.style={code={\flo@engine{#1}{inflorescence}{%
  \flo@picsetup{#1}%
  \pgfsetroundcap\pgfsetroundjoin\pgftransformscale{28.45276}%
  \flo@kindof\pgfmathparse{\flo@o@season}\let\flo@season\pgfmathresult\def\flo@ulate{0}%
  \flo@sym\flo@t{0.08}\flo@calc\flo@ust{1.2*\flo@season-\flo@ulate+\flo@t+\flo@get{phenology}}%
  \flo@unitdraw{\flo@o@scale}}}}}
% the list plants={seed/role, ...} into \flo@pp@s<k>, \flo@pp@r<k>, k = 1..\flo@Np: an
% empty item (a trailing comma) is skipped; an item without /role, and a fern (it grows
% from its crown: the fern pic), are errors and left out; a seed or a role the samplers
% would refuse is an error, and seed 1 or role any is drawn
\let\flo@endplants\relax\def\flo@endmark{\flo@endplants}
\def\flo@parseplants#1{\flo@Np=0 \flo@parseplant#1,\flo@endplants,%
  \ifnum\flo@Np=0 \pgfutil@packageerror{florilegium}{plants names no plant}{Write
    plants={3/rose, 17/umbellifer}. The pic is left out}\fi}
\def\flo@parseplant#1,{%
  \edef\flo@q{\zap@space#1 \@empty}%
  \ifx\flo@q\flo@endmark\else
    \ifx\flo@q\pgfutil@empty\else\expandafter\flo@parseplant@\flo@q/\flo@endplants/\relax\fi
    \expandafter\flo@parseplant
  \fi}
\def\flo@parseplant@#1/#2/#3\relax{%
  \def\flo@q{#2}\def\flo@tmp{#1}%
  \ifx\flo@q\flo@endmark
    \pgfutil@packageerror{florilegium}{A plant in plants is seed/role, not `#1'}{Write
      plants={3/rose, 17/umbellifer}. The plant `#1' is left out}%
  \else\ifx\flo@tmp\pgfutil@empty
    \pgfutil@packageerror{florilegium}{A plant in plants is seed/role, not `/#2'}{Write
      plants={3/rose, 17/umbellifer}. The plant `/#2' is left out}%
  \else\def\flo@tmp{fern}\ifx\flo@q\flo@tmp
    \pgfutil@packageerror{florilegium}{A fern grows from its crown, not on a stem: draw
      #1/fern with the fern pic}{\string\pic\space{florilegium fern={seed=#1}} draws it. The
      fern is left out of plants}%
  \else
    \advance\flo@Np by1
    \pgfmathtruncatemacro\flo@t{#1}%
    \ifnum\flo@t<1 \flo@badseed\flo@t\else\ifnum\flo@t>2147483646 \flo@badseed\flo@t\fi\fi
    \expandafter\let\csname flo@pp@s\the\flo@Np\endcsname\flo@t
    \flo@isrole{flo@role@}{#2}\ifflo@roleok\let\flo@t\flo@rq\else\flo@roleerror{#2}\def\flo@t{any}\fi
    \expandafter\let\csname flo@pp@r\the\flo@Np\endcsname\flo@t
  \fi\fi\fi}
% the plants \flo@pp.. from one root at the origin, the first \flo@gH cm tall, within
% \flo@gW cm; a pale flower of the first behind them when \flo@gghost is true. Walked once
% per layer: the ghost, stems, leaves, sprays, flowers
\def\flo@garden{%
  \pgfsetroundcap\pgfsetroundjoin
  \pgftransformscale{28.45276}%
  \pgfmathparse{\flo@o@season}\let\flo@season\pgfmathresult
  % heights, each plant's stream, the ghost: from the first plant's seed
  \flo@drawseed{\csname flo@pp@s1\endcsname}%
  \flo@loop{gl}\flo@Ga{1}{\flo@Np}{%
    \ifcase\flo@Ga\or\def\flo@t{1}\or\flo@range\flo@t{0.6}{0.72}\or\flo@range\flo@t{0.36}{0.48}%
    \else\flo@range\flo@t{0.5}{0.58}\fi
    \flo@calc\flo@t{\flo@gH*\flo@t}\expandafter\let\csname flo@pp@H\the\flo@Ga\endcsname\flo@t
    \flo@seedorgan\expandafter\let\csname flo@pp@z\the\flo@Ga\endcsname\flo@os}%
  \flo@range\flo@gx{0.35}{0.65}\flo@calc\flo@gx{\flo@gW*(\flo@gx-0.5)}%
  \flo@range\flo@gy{0.15}{0.3}\flo@calc\flo@gy{\flo@gH*\flo@gy}\flo@range\flo@gdiam{2.6}{3.2}%
  \flo@seedorgan\let\flo@gos\flo@os
  \flo@calc\flo@pxmin{-\flo@gW/2+0.7}\flo@calc\flo@pxmax{\flo@gW/2-0.7}%
  \ifnum\flo@Np=1 \def\flo@pA{0.5}\else\flo@calc\flo@pA{0.2*\flo@gW}\fi
  \flo@loop{glay}\flo@Gc{1}{5}{%
    \edef\flo@layer{\the\flo@Gc}\let\flo@roomid\flo@layer%
    \flo@loop{gw}\flo@Ga{1}{\flo@Np}{%
      \expandafter\let\csname flo@pp@w\the\flo@Ga\expandafter\endcsname\csname flo@pp@z\the\flo@Ga\endcsname}%
    \ifx\flo@gghost\flo@true
      \flo@calc\flo@t{0.25*\flo@gdiam}\flo@room1\flo@gx\flo@gy\flo@t
      \ifnum\flo@Gc=1
        \edef\flo@tmp{\noexpand\florilegiumspecies[{\flo@o@traits}]{\csname flo@pp@s1\endcsname}{\csname flo@pp@r1\endcsname}}\flo@tmp
        \let\flo@os\flo@gos
        % a plain flower of the species, as v1.3's ghosts are: no daisy disk, no lily
        \flo@organ{\def\flo@lift{0.62}\pgftransformshift{\flo@P\flo@gx\flo@gy}\flo@stone
          \flo@set{form}{rotate}\ifnum\flo@get{merosity}>6 \flo@set{merosity}{5}\fi
          \pgftransformscale{\flo@gdiam}\flo@calc\flo@oarg{\flo@gdiam*28.45276}\flo@sflower\flo@oarg}%
      \fi
    \fi
    \flo@loop{gps}\flo@Ga{1}{\flo@Np}{\flo@plantsetup\flo@passstem\flo@plantsave}%
    \flo@loop{gpl}\flo@Ga{1}{\flo@Np}{\flo@plantsetup\flo@passleaves\flo@plantsave}%
    \flo@loop{gpb}\flo@Ga{1}{\flo@Np}{\flo@plantsetup\flo@passbranches\flo@plantsave}%
    \flo@loop{gfr}\flo@Gf{1}{3}{%
      \flo@loop{gpf}\flo@Ga{1}{\flo@Np}{%
        \flo@plantsetup\pgfmathtruncatemacro\flo@ftries{\flo@pH/2}\flo@passfill\flo@plantsave}}}}
\def\flo@true{true}
% \pic {florilegium plant={seed=7, role=rose, size=14cm, width=6cm, season=0.75}}: one
% plant from its root, size its height, its branches reaching about width
\tikzset{pics/florilegium plant/.style={code={\flo@engine{#1}{plant}{%
  \flo@picsetup{#1}%
  \flo@calc\flo@gH{\flo@sizept/28.45276}%
  \edef\flo@t{\flo@get{clade}}\def\flo@tmp{fern}%
  \ifx\flo@t\flo@tmp\flo@ferncrown\else
  \flo@Np=1 \expandafter\edef\csname flo@pp@s1\endcsname{\flo@o@seed}%
  \expandafter\edef\csname flo@pp@r1\endcsname{\flo@o@role}%
  \def\flo@gghost{false}%
  \pgfmathsetlength\pgf@x{\flo@o@width}\flo@calc\flo@gW{\pgf@x/28.45276}%
  \flo@garden\fi}}}}
% \pic {florilegium fern={seed=7, size=8cm, season=0.75}}: a fern (role fern) as a margin
% grows one at its root, size its longest frond
\tikzset{pics/florilegium fern/.style={code={\flo@engine{#1,role=fern}{fern}{%
  \flo@picsetup{#1,role=fern}\flo@fernpic{#1}\flo@calc\flo@gH{\flo@sizept/28.45276}\flo@ferncrown}}}}
% a plan fixed to a flowering plant is an error, and the fern is drawn as sampled, without
% the traits, as M.tikz does
\def\flo@fernpic#1{\edef\flo@t{\flo@get{clade}}\def\flo@tmp{fern}%
  \ifx\flo@t\flo@tmp\else
    \pgfutil@packageerror{florilegium}{The fern pic draws a fern, and plan=\flo@get{plan}\space is a
      flowering plant's}{Press return to draw it as sampled, without the traits.}%
    \flo@picsetup{#1,role=fern,traits=}%
  \fi}
% \pic {florilegium plants={plants={3/rose, 17/umbellifer, 29/mustard}, size=20cm, width=6cm}}:
% plants from one root, like a margin's main stems; the first reaches size, the others
% 60-72% and 36-48% of it; a pale flower of the first behind them (ghost=false: none)
\tikzset{pics/florilegium plants/.style={code={\flo@engine{#1}{plants}{%
  \pgfkeys{/florilegium,#1}\flo@colors
  \expandafter\flo@parseplants\expandafter{\flo@o@plants}
  \pgfmathsetlength\pgf@x{\flo@o@size}\flo@calc\flo@gH{\pgf@x/28.45276}%
  \pgfmathsetlength\pgf@x{\flo@o@width}\flo@calc\flo@gW{\pgf@x/28.45276}%
  \edef\flo@gghost{\ifflo@ghost true\else false\fi}%
  \ifnum\flo@Np>0 \flo@garden\fi}}}}

% ================================================================ v1.3's hand
% florilegium-flora.lua's petal, heart and flower, line for line in pgfmath: the same
% outline (a blade with a noise-ragged edge), the same pale heart, watercolor mottle and
% specks, dark brush strokes, pooled rim, white streaks and veins, in ink's OKLCH tones.
% Only the random numbers differ: pgf's generator here (and in the Lua side that mirrors
% this file), mulberry32 in flora. Angles are degrees.

% colors: tone t of ink's ramp; the accent toward white (k >= 0) or darker (k < 0)
% (a ghost lifts every tone toward white: t + (1-t) lift, as ink.tone does)
\def\flo@vtone#1#2{%
  \ifx\flo@lift\flo@zero\pgfmathtruncatemacro\flo@ti{max(0,min(100,floor((#2)*100+0.5)))}%
  \else\pgfmathtruncatemacro\flo@ti{max(0,min(100,floor(((#2)+(1-(#2))*\flo@lift)*100+0.5)))}\fi
  \colorlet{#1}{\flo@rampname @\flo@ti}}
\def\flo@lift{0}\def\flo@zero{0}
\def\flo@vaccent#1#2{%
  \ifdim#2pt<0pt \pgfmathparse{100*(1+(#2))}\colorlet{#1}{flo@accent!\pgfmathresult!black}%
  \else\pgfmathparse{100*(1-(#2))}\colorlet{#1}{flo@accent!\pgfmathresult!white}\fi}
% fill or stroke a path (#4, #5) in a scope of its own: color, (width in bp,) opacity, multiply 0/1
% opacities in hundredths, as florilegium-ink.lua registers them (/floaNN): pgf makes a
% graphics state per distinct value, and five decimals would make thousands
\def\flo@op@q#1{\pgfmathparse{round((#1)*100)/100}\let\flo@opq\pgfmathresult}
\def\flo@vfill#1#2#3#4{\begin{pgfscope}\pgfsetfillcolor{#1}\flo@op@q{#2}\pgfsetfillopacity{\flo@opq}%
  \ifnum#3=1 \pgfsetblendmode{multiply}\fi#4\pgfusepath{fill}\end{pgfscope}}
\def\flo@vstroke#1#2#3#4#5{\begin{pgfscope}\pgfsetstrokecolor{#1}\pgfsetlinewidth{#2bp}%
  \flo@op@q{#3}\pgfsetstrokeopacity{\flo@opq}\ifnum#4=1 \pgfsetblendmode{multiply}\fi#5\pgfusepath{stroke}\end{pgfscope}}
% rng.chance(p): one draw, then \ifflo@yes
\newif\ifflo@yes
\newtoks\flo@spk \newtoks\flo@spa
% how often a round petal is notched at its tip, and how deeply (flora: 0.4, 1)
\def\flo@vp@notchp{0.4}\def\flo@vp@notchk{1}
\def\flo@chance#1{\pgfmathparse{rnd}\ifdim\pgfmathresult pt<#1pt \flo@yestrue\else\flo@yesfalse\fi}

% ---------------------------------------------------------------- noise (ink.noise1, ink.fbm1)
% three tables of 256 gradients, one draw each (rng.sym(1) = rand)
\def\flo@vfbm{%
  \flo@loop{fbmk}\flo@kc{1}{3}{%
    \flo@loop{fbmi}\flo@kb{0}{255}{%
      \pgfmathparse{rand}\expandafter\let\csname flo@G\the\flo@kc @\the\flo@kb\endcsname\pgfmathresult}}}
% the fractal noise at #1: \flo@wv
\def\flo@vwave#1{%
  \def\flo@wv{0}\def\flo@wa{1}\def\flo@wf{1}%
  \flo@loop{wave}\flo@kc{1}{3}{%
    \flo@calc\flo@wx{(#1)*\flo@wf+17*\the\flo@kc}%
    \pgfmathtruncatemacro\flo@wi{floor(\flo@wx)}\flo@calc\flo@wr{\flo@wx-\flo@wi}%
    % index mod 256 (\numexpr rounds, so floor(i/256) = round((i-128)/256); here i >= 17)
    \edef\flo@ga{\csname flo@G\the\flo@kc @\the\numexpr\flo@wi-256*((\flo@wi-128)/256)\relax\endcsname}%
    \edef\flo@gb{\csname flo@G\the\flo@kc @\the\numexpr\flo@wi+1-256*((\flo@wi-127)/256)\relax\endcsname}%
    \flo@calc\flo@wn{2*(\flo@ga*\flo@wr+(\flo@gb*(\flo@wr-1)-\flo@ga*\flo@wr)*\flo@wr*\flo@wr*(3-2*\flo@wr))}%
    \flo@calc\flo@wv{\flo@wv+\flo@wa*\flo@wn}\flo@calc\flo@wa{\flo@wa*0.5}\flo@calc\flo@wf{\flo@wf*2}}}

% ---------------------------------------------------------------- geometry (ink.taper, ink.blob)
% the left normal of (#1,#2) into #3 #4, (0,0) for a zero vector
\def\flo@nrm#1#2#3#4{\pgfmathparse{veclen(#1,#2)}\let\flo@nl\pgfmathresult
  \ifdim\flo@nl pt<0.00002pt \def#3{0}\def#4{0}\else\flo@calc#3{-(#2)/\flo@nl}\flo@calc#4{(#1)/\flo@nl}\fi}
% ink.taper: a closed tapered stroke along one cubic, widths \flo@twa at the start and
% \flo@twb at the end; #1..#8 the four points
\def\flo@vtaper#1#2#3#4#5#6#7#8{%
  \flo@calc\flo@da{#3-(#1)}\flo@calc\flo@db{#4-(#2)}\flo@nrm\flo@da\flo@db\flo@nax\flo@nay
  \flo@calc\flo@da{#5-(#1)}\flo@calc\flo@db{#6-(#2)}\flo@nrm\flo@da\flo@db\flo@nbx\flo@nby
  \flo@calc\flo@da{#7-(#3)}\flo@calc\flo@db{#8-(#4)}\flo@nrm\flo@da\flo@db\flo@ncx\flo@ncy
  \flo@calc\flo@da{#7-(#5)}\flo@calc\flo@db{#8-(#6)}\flo@nrm\flo@da\flo@db\flo@ndx\flo@ndy
  \flo@calc\flo@ha{\flo@twa/2}\flo@calc\flo@hb{(2*\flo@twa+\flo@twb)/6}%
  \flo@calc\flo@hc{(\flo@twa+2*\flo@twb)/6}\flo@calc\flo@hd{\flo@twb/2}%
  \flo@calc\flo@pa{#1+\flo@nax*\flo@ha}\flo@calc\flo@pb{#2+\flo@nay*\flo@ha}%
  \flo@calc\flo@pc{#3+\flo@nbx*\flo@hb}\flo@calc\flo@pd{#4+\flo@nby*\flo@hb}%
  \flo@calc\flo@pe{#5+\flo@ncx*\flo@hc}\flo@calc\flo@pf{#6+\flo@ncy*\flo@hc}%
  \flo@calc\flo@pg{#7+\flo@ndx*\flo@hd}\flo@calc\flo@ph{#8+\flo@ndy*\flo@hd}%
  \pgfpathmoveto{\flo@P\flo@pa\flo@pb}\pgfpathcurveto{\flo@P\flo@pc\flo@pd}{\flo@P\flo@pe\flo@pf}{\flo@P\flo@pg\flo@ph}%
  \flo@calc\flo@pg{#7-\flo@ndx*\flo@hd}\flo@calc\flo@ph{#8-\flo@ndy*\flo@hd}\pgfpathlineto{\flo@P\flo@pg\flo@ph}%
  \flo@calc\flo@pe{#5-\flo@ncx*\flo@hc}\flo@calc\flo@pf{#6-\flo@ncy*\flo@hc}%
  \flo@calc\flo@pc{#3-\flo@nbx*\flo@hb}\flo@calc\flo@pd{#4-\flo@nby*\flo@hb}%
  \flo@calc\flo@pa{#1-\flo@nax*\flo@ha}\flo@calc\flo@pb{#2-\flo@nay*\flo@ha}%
  \pgfpathcurveto{\flo@P\flo@pe\flo@pf}{\flo@P\flo@pc\flo@pd}{\flo@P\flo@pa\flo@pb}\pgfpathclose}
% ink.blob: #6 points around (#1,#2), radii #3 #4, roughness #5, into flo@X/Y 1..#6;
% draws 3 numbers, then one per point
\def\flo@vblob#1#2#3#4#5#6{%
  \flo@range\flo@bph{0}{360}\flo@range\flo@bpi{0}{360}\flo@range\flo@brot{0}{360}%
  \flo@loop{vblob}\flo@kb{0}{#6-1}{%
    \flo@calc\flo@ba{360*\the\flo@kb/(#6)}\flo@sym\flo@bs{1}%
    \flo@calc\flo@bk{1+(#5)*(0.6*sin(2*\flo@ba+\flo@bph)+0.4*sin(3*\flo@ba+\flo@bpi))+(#5)*0.5*\flo@bs}%
    \flo@calc\flo@bpx{(#3)*\flo@bk*cos(\flo@ba)}\flo@calc\flo@bpy{(#4)*\flo@bk*sin(\flo@ba)}%
    \flo@calc\flo@bx{(#1)+\flo@bpx*cos(\flo@brot)-\flo@bpy*sin(\flo@brot)}%
    \flo@calc\flo@by{(#2)+\flo@bpx*sin(\flo@brot)+\flo@bpy*cos(\flo@brot)}%
    \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@bx}{\flo@by}}%
  \flo@smoothprep{#6}}
% flora's mottle inside the current clip: #5 blotches of about #6 over (#1,#2)-(#3,#4), dark
% tone #7, light #8, #9 specks
\def\flo@vmottle#1#2#3#4#5#6#7#8#9{%
  \flo@loop{vmot}\flo@ka{1}{#5}{%
    \flo@range\flo@mx{#1}{#3}\flo@range\flo@my{#2}{#4}\flo@range\flo@t{0.5}{1.4}\flo@calc\flo@mr{(#6)*\flo@t}%
    \flo@range\flo@t{0.5}{1}\flo@calc\flo@ms{\flo@mr*\flo@t}%
    \flo@vblob\flo@mx\flo@my\flo@mr\flo@ms{0.35}{7}%
    \flo@chance{0.6}%
    \ifflo@yes\flo@sym\flo@t{0.06}\flo@vtone{flo@c}{#7+\flo@t}\flo@range\flo@op{0.10}{0.22}%
      \flo@vfill{flo@c}{\flo@op}{1}{\flo@smoothpath}%
    \else\flo@sym\flo@t{0.06}\flo@vtone{flo@c}{#8+\flo@t}\flo@range\flo@op{0.12}{0.26}%
      \flo@vfill{flo@c}{\flo@op}{0}{\flo@smoothpath}\fi}%
  \ifnum#9>0
    \flo@spk={}%
    \flo@loop{vspk}\flo@ka{1}{#9}{%
      \flo@range\flo@mx{#1}{#3}\flo@range\flo@my{#2}{#4}\flo@range\flo@t{0.03}{0.08}\flo@calc\flo@mr{(#6)*\flo@t}%
      \flo@range\flo@ma{0}{180}%
      \flo@calc\flo@sc{\flo@mr*cos(\flo@ma)}\flo@calc\flo@ss{\flo@mr*sin(\flo@ma)}%
      \flo@calc\flo@xa{\flo@mx+\flo@sc}\flo@calc\flo@ya{\flo@my+\flo@ss}%
      \flo@calc\flo@xb{\flo@mx-0.6*\flo@ss}\flo@calc\flo@yb{\flo@my+0.6*\flo@sc}%
      \flo@calc\flo@xc{\flo@mx-\flo@sc}\flo@calc\flo@yc{\flo@my-\flo@ss}%
      \flo@calc\flo@xd{\flo@mx+0.6*\flo@ss}\flo@calc\flo@yd{\flo@my-0.6*\flo@sc}%
      \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@ya}}%
        \noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xb}{\flo@yb}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xc}{\flo@yc}}%
        \noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xd}{\flo@yd}}\noexpand\pgfpathclose}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \flo@vtone{flo@c}{#7-0.08}\flo@range\flo@op{0.3}{0.5}\flo@vfill{flo@c}{\flo@op}{1}{\the\flo@spk}%
  \fi}

% ---------------------------------------------------------------- the petal (flora.petal)
% along +y, length 1, base at the origin. Set before: \flo@vp@pointed (0/1), \flo@vp@W
% (empty: drawn), \flo@vp@tone, \flo@vp@ns (empty: drawn), \flo@vp@heart (0/1),
% \flo@vp@u (cm per local unit, with no random part: level of detail and line width)
% half-width at #1: \flo@h
\def\flo@vhalf#1{%
  \ifnum\flo@vp@pointed=1
    \ifdim#1pt>0pt \flo@calc\flo@h{\flo@pW*2*pow(max(0,sin(180*pow(#1,0.8))),0.85)*(1-0.3*(#1))}\else\def\flo@h{0}\fi
  \else
    \ifdim#1pt<0.62pt
      \ifdim#1pt>0pt \flo@calc\flo@h{\flo@pW*(0.16+0.84*pow(sin(90*(#1)/0.62),1.3))}\else\flo@calc\flo@h{\flo@pW*0.16}\fi
    \else\flo@calc\flo@h{\flo@pW*sqrt(max(0,1-pow(((#1)-0.62)/0.38,2)))}\fi
  \fi}
% the edge at #1 on side #2 (1 left, -1 right): \flo@e
\def\flo@vedge#1#2{%
  \ifnum#2=1 \flo@calc\flo@t{(#1)*6}\else\flo@calc\flo@t{(#1)*6+40}\fi
  \flo@vwave\flo@t
  \flo@calc\flo@e{(\flo@vp@pointed==1 ? 0.012 : 0.03)*\flo@wv*(#1)}%
  \ifdim\flo@notch pt>0pt \ifdim#1pt>0.9pt
    \flo@calc\flo@e{\flo@e-\flo@notch*((#1)-0.9)*10*(1-((#1)-0.9)*10)}\fi\fi}
\def\flo@vpetal{%
  \ifx\flo@vp@W\pgfutil@empty
    \ifnum\flo@vp@pointed=1 \flo@range\flo@pW{0.15}{0.2}\else\flo@range\flo@pW{0.40}{0.48}\fi
  \else\edef\flo@pW{\flo@vp@W}\fi
  \ifx\flo@vp@bend\pgfutil@empty\flo@sym\flo@bend{0.08}\else\edef\flo@bend{\flo@vp@bend}\fi
  \edef\flo@tz{\flo@vp@tone}%
  \ifdim\flo@vp@u pt>0.45pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \flo@vfbm
  \def\flo@notch{0}%
  \ifnum\flo@vp@pointed=0 \flo@chance{\flo@vp@notchp}\ifflo@yes\flo@range\flo@notch{0.03}{0.06}%
    \flo@calc\flo@notch{\flo@notch*\flo@vp@notchk}\fi\fi
  % the outline (ink.blade): spine (bend v^2, v), normals by central differences
  % a petal under 1.2 mm (vp@u in cm) is tiny: a coarser outline, no heart, mottle or
  % pooled rim (specks no printer resolves at that size), and at most five streaks
  \ifdim\flo@vp@u pt<0.12pt \def\flo@tiny{1}\else\def\flo@tiny{0}\fi
  \ifdim\flo@vp@u pt>0.5pt \def\flo@bn{28}\else\ifnum\flo@tiny=1 \def\flo@bn{8}\else\def\flo@bn{18}\fi\fi
  \flo@loop{bl}\flo@kb{0}{\flo@bn}{%
    \flo@calc\flo@v{\the\flo@kb/\flo@bn}%
    \flo@calc\flo@va{max(0,\the\flo@kb-1)/\flo@bn}\flo@calc\flo@vb{min(\flo@bn,\the\flo@kb+1)/\flo@bn}%
    \flo@calc\flo@da{\flo@bend*(\flo@vb*\flo@vb-\flo@va*\flo@va)}\flo@calc\flo@db{\flo@vb-\flo@va}%
    \flo@nrm\flo@da\flo@db\flo@nx\flo@ny
    \flo@vhalf\flo@v
    \flo@vedge\flo@v{1}\flo@calc\flo@ea{max(0,\flo@h+\flo@e)}%
    \flo@vedge\flo@v{-1}\flo@calc\flo@eb{max(0,\flo@h+\flo@e)}%
    \flo@calc\flo@cx{\flo@bend*\flo@v*\flo@v}%
    \flo@calc\flo@xl{\flo@cx+\flo@nx*\flo@ea}\flo@calc\flo@yl{\flo@v+\flo@ny*\flo@ea}%
    \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@xl}{\flo@yl}%
    \ifnum\flo@kb>0 \ifnum\flo@kb<\flo@bn\space
      \flo@calc\flo@xr{\flo@cx-\flo@nx*\flo@eb}\flo@calc\flo@yr{\flo@v-\flo@ny*\flo@eb}%
      \flo@put{\the\numexpr2*\flo@bn+1-\flo@kb\relax}{\flo@xr}{\flo@yr}\fi\fi}%
  \flo@smoothprep{\the\numexpr2*\flo@bn\relax}%
  % keep the outline: blobs and strokes below overwrite flo@X/Y and the controls
  \flo@keepoutline
  \begin{pgfscope}%
    \flo@outlinepath\pgfusepath{clip}%
    \flo@vtone{flo@c}{\flo@tz}\flo@vfill{flo@c}{1}{0}{\pgfpathrectanglecorners{\flo@P{-1}{-0.1}}{\flo@P{1}{1.2}}}%
    \ifnum\flo@vp@heart=1 \ifnum\flo@tiny=0
      \flo@loop{vheart}\flo@ka{1}{8}{%
        \flo@calc\flo@t{\flo@pW*(0.25+0.1*\the\flo@ka)}\flo@calc\flo@ms{0.06+0.065*\the\flo@ka}%
        \flo@vblob{0}{0}\flo@t\flo@ms{0.28}{9}\flo@vfill{white}{0.1}{0}{\flo@smoothpath}}%
    \fi\fi
    \flo@calc\flo@xa{-\flo@pW*1.2}\flo@calc\flo@xb{\flo@pW*1.2}%
    \flo@calc\flo@ta{\flo@tz-0.2}\flo@calc\flo@tb{\flo@tz+0.2}%
    \ifnum\flo@vp@pointed=1 \def\flo@msz{0.06}\else\def\flo@msz{0.12}\fi
    \ifnum\flo@fine=1 \flo@vmottle\flo@xa{0.12}\flo@xb{1.05}{15}\flo@msz\flo@ta\flo@tb{12}%
    \else\ifnum\flo@tiny=0 \flo@vmottle\flo@xa{0.12}\flo@xb{1.05}{6}\flo@msz\flo@ta\flo@tb{0}\fi\fi
    % darker brush strokes running out from the base
    \ifnum\flo@fine=1
      \flo@int\flo@nk{5}{8}%
      \flo@loop{brush}\flo@ka{1}{\flo@nk}{%
        \flo@sym\flo@f{0.95}\flo@range\flo@va{0.15}{0.4}\flo@range\flo@vb{0.7}{1.0}%
        \flo@vhalf\flo@va\flo@calc\flo@xa{\flo@f*\flo@h*0.8+\flo@bend*\flo@va*\flo@va}%
        \flo@vhalf\flo@vb\flo@calc\flo@xb{\flo@f*\flo@h*0.9+\flo@bend*\flo@vb*\flo@vb}%
        \flo@range\flo@twa{0.03}{0.07}\def\flo@twb{0.005}%
        \flo@calc\flo@c{\flo@xa+(\flo@xb-\flo@xa)*0.3}\flo@calc\flo@d{\flo@va+(\flo@vb-\flo@va)*0.35}%
        \flo@calc\flo@cc{\flo@xb*0.95}\flo@calc\flo@dd{\flo@va+(\flo@vb-\flo@va)*0.7}%
        \flo@vtone{flo@c}{\flo@tz-0.25}\flo@range\flo@op{0.12}{0.25}%
        \flo@vfill{flo@c}{\flo@op}{1}{\flo@vtaper\flo@xa\flo@va\flo@c\flo@d\flo@cc\flo@dd\flo@xb\flo@vb}}%
    \fi
    % pooling: the outline restroked wide and soft, only its inner half shows
    \ifnum\flo@tiny=0
      \flo@vtone{flo@c}{0.08}\flo@calc\flo@t{1.6*\flo@vp@u}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@outlinepath}%
    \fi
    % white streaks lifted out, fanning from the base
    \ifx\flo@vp@ns\pgfutil@empty
      \ifnum\flo@vp@pointed=1 \flo@int\flo@ns{3}{5}\else\flo@int\flo@ns{9}{13}\fi
    \else\edef\flo@ns{\flo@vp@ns}\fi
    \ifnum\flo@tiny=1 \ifnum\flo@ns>5 \def\flo@ns{5}\fi\fi
    \flo@loop{wst}\flo@ka{1}{\flo@ns}{%
      \flo@sym\flo@t{0.05}\flo@calc\flo@f{(\the\flo@ka-0.5)/\flo@ns*2-1+\flo@t}%
      \ifnum\flo@vp@pointed=1 \flo@range\flo@t{0.4}{0.85}\else\flo@range\flo@t{0.35}{0.8}\fi
      \flo@calc\flo@len{\flo@t*(1-0.35*\flo@f*\flo@f)}%
      % (ns+1)//2: \numexpr rounds halves up, so it is ns/2 rounded
      \ifnum\flo@vp@pointed=1 \ifnum\flo@ka=\numexpr\flo@ns/2\relax
        \def\flo@f{0}\flo@range\flo@len{0.8}{0.92}\fi\fi
      \flo@vhalf\flo@len\flo@calc\flo@xb{\flo@f*\flo@h*0.85+\flo@bend*\flo@len*\flo@len}%
      \flo@calc\flo@t{\flo@len*0.5}\flo@vhalf\flo@t\flo@sym\flo@g{0.02}%
      \flo@calc\flo@mx{\flo@f*\flo@h*0.6+\flo@g+\flo@bend*\flo@len*\flo@len*0.3}%
      \ifnum\flo@vp@pointed=1 \def\flo@g{0.6}\else\def\flo@g{1}\fi
      \flo@range\flo@t{0.022}{0.045}\flo@calc\flo@twa{\flo@g*\flo@t}\def\flo@twb{0.002}%
      \flo@calc\flo@xa{\flo@f*0.03}\flo@calc\flo@c{\flo@mx*0.5}\flo@calc\flo@d{\flo@len*0.3}%
      \flo@calc\flo@dd{\flo@len*0.6}\flo@range\flo@op{0.55}{0.9}%
      \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@xa{0}\flo@c\flo@d\flo@mx\flo@dd\flo@xb\flo@len}}%
    % a few fine dark veins, following the petal
    \ifnum\flo@fine=1
      \flo@int\flo@nk{4}{7}%
      \flo@loop{vvein}\flo@ka{1}{\flo@nk}{%
        \flo@sym\flo@f{0.85}\flo@range\flo@va{0.2}{0.35}\flo@range\flo@vb{0.75}{0.95}%
        \flo@vhalf\flo@va\flo@calc\flo@xa{\flo@f*\flo@h*0.7+\flo@bend*\flo@va*\flo@va}%
        \flo@vhalf\flo@vb\flo@calc\flo@xb{\flo@f*\flo@h*0.9+\flo@bend*\flo@vb*\flo@vb}%
        \flo@calc\flo@c{\flo@xa+(\flo@xb-\flo@xa)*0.2}\flo@calc\flo@d{\flo@va+(\flo@vb-\flo@va)*0.4}%
        \flo@calc\flo@cc{\flo@xb*0.97}\flo@calc\flo@dd{\flo@va+(\flo@vb-\flo@va)*0.75}%
        \flo@vbezier\flo@xa\flo@va\flo@c\flo@d\flo@cc\flo@dd\flo@xb\flo@vb
        \flo@vtone{flo@c}{0.1}\flo@range\flo@op{0.18}{0.32}\flo@vstroke{flo@c}{0.15}{\flo@op}{1}{\flo@openpath}}%
    \fi
  \end{pgfscope}}
% the outline kept by \flo@keepoutline: its points and controls in flo@KX/KY/KA..KD
\def\flo@keepoutline{%
  \edef\flo@KN{\flo@N}%
  \flo@loop{keep}\flo@kb{1}{\flo@KN}{%
    \edef\flo@t{\the\flo@kb}%
    \expandafter\edef\csname flo@KX\flo@t\endcsname{\flo@x\flo@t}\expandafter\edef\csname flo@KY\flo@t\endcsname{\flo@y\flo@t}%
    \expandafter\edef\csname flo@KA\flo@t\endcsname{\csname flo@A\flo@t\endcsname}%
    \expandafter\edef\csname flo@KB\flo@t\endcsname{\csname flo@B\flo@t\endcsname}%
    \expandafter\edef\csname flo@KC\flo@t\endcsname{\csname flo@C\flo@t\endcsname}%
    \expandafter\edef\csname flo@KD\flo@t\endcsname{\csname flo@D\flo@t\endcsname}}}
\def\flo@outlinepath{%
  \pgfpathmoveto{\flo@P{\csname flo@KX1\endcsname}{\csname flo@KY1\endcsname}}%
  \flo@loop{olp}\flo@i{1}{\flo@KN}{%
    \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@KN\space 1\else\flo@i+1\fi\relax}%
    \pgfpathcurveto{\flo@P{\csname flo@KA\the\flo@i\endcsname}{\csname flo@KB\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@KC\the\flo@i\endcsname}{\csname flo@KD\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@KX\flo@ib\endcsname}{\csname flo@KY\flo@ib\endcsname}}}%
  \pgfpathclose}
% ink.bezier3 sampled at 6 points, as an open smooth curve (ink.smooth, not closed): \flo@openpath
\def\flo@vbezier#1#2#3#4#5#6#7#8{%
  \flo@loop{bz}\flo@kb{0}{5}{%
    \flo@calc\flo@v{\the\flo@kb/5}\flo@calc\flo@t{1-\flo@v}%
    \flo@calc\flo@bx{\flo@t*\flo@t*\flo@t*(#1)+3*\flo@t*\flo@t*\flo@v*(#3)+3*\flo@t*\flo@v*\flo@v*(#5)+\flo@v*\flo@v*\flo@v*(#7)}%
    \flo@calc\flo@by{\flo@t*\flo@t*\flo@t*(#2)+3*\flo@t*\flo@t*\flo@v*(#4)+3*\flo@t*\flo@v*\flo@v*(#6)+\flo@v*\flo@v*\flo@v*(#8)}%
    \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@bx}{\flo@by}}}
% an open Catmull-Rom curve through points 1..6 (ends repeated, tension 1/6)
\def\flo@openpath{%
  \pgfpathmoveto{\flo@P{\flo@x1}{\flo@y1}}%
  \flo@loop{opp}\flo@i{1}{5}{%
    \edef\flo@ia{\the\numexpr\ifnum\flo@i=1 1\else\flo@i-1\fi\relax}\edef\flo@ib{\the\numexpr\flo@i+1\relax}%
    \edef\flo@ic{\the\numexpr\ifnum\flo@i=5 6\else\flo@i+2\fi\relax}%
    \flo@calc\flo@pa{\flo@x{\the\flo@i}+(\flo@x\flo@ib-\flo@x\flo@ia)/6}\flo@calc\flo@pb{\flo@y{\the\flo@i}+(\flo@y\flo@ib-\flo@y\flo@ia)/6}%
    \flo@calc\flo@pc{\flo@x\flo@ib-(\flo@x\flo@ic-\flo@x{\the\flo@i})/6}\flo@calc\flo@pd{\flo@y\flo@ib-(\flo@y\flo@ic-\flo@y{\the\flo@i})/6}%
    \pgfpathcurveto{\flo@P\flo@pa\flo@pb}{\flo@P\flo@pc\flo@pd}{\flo@P{\flo@x\flo@ib}{\flo@y\flo@ib}}}}

% ---------------------------------------------------------------- the heart and the flower
% flora's heart: a white star of 2n streaks, a white disc, stamens, a copper eye; #1 = n
\def\flo@vheart#1{%
  \flo@loop{vh}\flo@ka{1}{2*(#1)}{%
    \flo@sym\flo@t{8}\flo@calc\flo@a{(\the\flo@ka-0.5)*360/(2*(#1))+\flo@t}%
    \flo@range\flo@len{0.24}{0.36}\def\flo@twa{0.06}\def\flo@twb{0.004}%
    \begin{pgfscope}\pgftransformrotate{\flo@a}%
      \flo@vfill{white}{0.85}{0}{\flo@vtaper{0}{0}{0.01}{0.1}{-0.01}{0.2}{0}\flo@len}\end{pgfscope}}%
  \flo@vfill{white}{0.9}{0}{\pgfpathcircle{\flo@P00}{0.13pt}}%
  \flo@vtone{flo@c}{0.1}\flo@vtone{flo@d}{0.05}%
  \flo@loop{vst}\flo@ka{1}{14}{%
    \flo@range\flo@a{0}{360}\flo@range\flo@r{0.05}{0.12}%
    \flo@calc\flo@dx{\flo@r*cos(\flo@a)}\flo@calc\flo@dy{\flo@r*sin(\flo@a)}%
    \flo@vstroke{flo@c}{0.2}{0.7}{0}{\pgfpathmoveto{\flo@P00}\pgfpathlineto{\flo@P\flo@dx\flo@dy}}%
    \flo@vfill{flo@d}{0.9}{0}{\pgfpathcircle{\flo@P\flo@dx\flo@dy}{0.008pt}}}%
  \flo@vaccent{flo@c}{-0.15}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.042pt}}%
  \flo@vaccent{flo@c}{0.3}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.022pt}}}
% flora's flower: #2 broad petals seen from the front, petal length 1; #1 the petal length
% in cm on the page (no random part); tone: \flo@vf@tone (empty: drawn as flora does)
\def\flo@vflower#1#2{%
  \edef\flo@vu{#1}%
  \ifdefined\flo@vf@pointed\edef\flo@vp@pointed{\flo@vf@pointed}\else\def\flo@vp@pointed{0}\fi
  \flo@range\flo@spin{0}{72}%
  \ifx\flo@vf@tone\pgfutil@empty
    \flo@chance{0.25}\ifflo@yes\flo@range\flo@tq{0.2}{0.28}\else\flo@range\flo@tq{0.3}{0.46}\fi
  \else\edef\flo@tq{\flo@vf@tone}\fi
  \edef\flo@np{#2}%
  \flo@loop{vfp}\flo@n{0}{\flo@np-1}{%
    \flo@sym\flo@t{6}\flo@calc\flo@a{\flo@spin+\the\flo@n*360/\flo@np+\flo@t}%
    \flo@range\flo@js{0.9}{1.06}\flo@sym\flo@t{0.04}\flo@calc\flo@tp{\flo@tq+\flo@t}%
    \begin{pgfscope}%
      \pgftransformrotate{\flo@a}\pgftransformscale{\flo@js}\pgftransformshift{\flo@P0{0.04}}%
      \ifdefined\flo@vf@W\edef\flo@vp@W{\flo@vf@W}\else\def\flo@vp@W{}\fi
      \ifdefined\flo@vf@ns\edef\flo@vp@ns{\flo@vf@ns}\else\def\flo@vp@ns{}\fi
      \def\flo@vp@bend{}\def\flo@vp@heart{1}\edef\flo@vp@tone{\flo@tp}\edef\flo@vp@u{\flo@vu}%
      \flo@vpetal
    \end{pgfscope}}%
  \begin{pgfscope}\pgftransformrotate{\flo@spin}\flo@vheart{\flo@np}\end{pgfscope}}
% \pic {florilegium v13 flower={seed=7, size=1.9cm}}: flora's flower in pure TikZ, size the
% petal length (a test of the port, against \florilegiumdraw{flower}{1.9})
\tikzset{pics/florilegium v13 flower/.style={code={\flo@engine{#1}{v13 flower}{%
  \flo@picsetup{#1}%
  \pgftransformscale{\flo@sizept}%
  \def\flo@vf@tone{}\flo@calc\flo@vs{\flo@sizept/28.45276}\flo@vflower\flo@vs{5}}}}}


% ---------------------------------------------------------------- the tone ramp (OKLCH)
% florilegium-ink.lua's ramp, computed here from the document's ink: 101 tones from the
% darkest navy to the palest mist at the ink's hue, lightness and chroma per stop, the hue
% drifting violet in the darks and cyan in the lights. OKLCH is Oklab in polar form; Oklab
% and its matrices are Bjorn Ottosson's ("A perceptual color space for image processing",
% 2020, public domain). Computed once per ink with pgf's floating point unit (pgfmath's
% fixed point keeps too few digits of pow for colors), defined globally.
\newif\ifflo@ingamut
\def\flo@srgbdec#1#2{\ifdim#2pt>0.04045pt \flo@calc#1{pow(((#2)+0.055)/1.055,2.4)}\else\flo@calc#1{(#2)/12.92}\fi}
\def\flo@srgbenc#1#2{\ifdim#2pt>0.0031308pt \flo@calc#1{1.055*pow(#2,1/2.4)-0.055}\else\flo@calc#1{12.92*(#2)}\fi}
% a cube root: pow, then two Newton steps (pow is good to about 3e-4 here)
\def\flo@cbrt#1#2{\ifdim#2pt=0pt \def#1{0}\else
  \flo@calc#1{(#2)<0 ? -pow(-(#2),1/3) : pow(#2,1/3)}%
  \flo@calc#1{#1-(#1*#1*#1-(#2))/(3*#1*#1)}\flo@calc#1{#1-(#1*#1*#1-(#2))/(3*#1*#1)}\fi}
% OKLCH (#1,#2,#3 in degrees) -> \flo@or \flo@og \flo@ob, \ifflo@ingamut
\def\flo@oklch#1#2#3{%
  \flo@calc\flo@oA{(#2)*cos(#3)}\flo@calc\flo@oB{(#2)*sin(#3)}%
  \flo@calc\flo@ol{pow((#1)+0.3963377774*\flo@oA+0.2158037573*\flo@oB,3)}%
  \flo@calc\flo@om{pow((#1)-0.1055613458*\flo@oA-0.0638541728*\flo@oB,3)}%
  \flo@calc\flo@os{pow((#1)-0.0894841775*\flo@oA-1.2914855480*\flo@oB,3)}%
  \flo@calc\flo@or{4.0767416621*\flo@ol-3.3077115913*\flo@om+0.2309699292*\flo@os}%
  \flo@calc\flo@og{-1.2684380046*\flo@ol+2.6097574011*\flo@om-0.3413193965*\flo@os}%
  \flo@calc\flo@ob{-0.0041960863*\flo@ol-0.7034186147*\flo@om+1.7076147010*\flo@os}%
  \flo@ingamuttrue
  \ifdim\flo@or pt<-0.0001pt \flo@ingamutfalse\fi\ifdim\flo@or pt>1.0001pt \flo@ingamutfalse\fi
  \ifdim\flo@og pt<-0.0001pt \flo@ingamutfalse\fi\ifdim\flo@og pt>1.0001pt \flo@ingamutfalse\fi
  \ifdim\flo@ob pt<-0.0001pt \flo@ingamutfalse\fi\ifdim\flo@ob pt>1.0001pt \flo@ingamutfalse\fi}
% the stops: t, L, C, hue drift
\def\flo@stops{{0}{0.25}{0.105}{6},{0.18}{0.35}{0.150}{3},{0.38}{0.47}{0.175}{0},%
  {0.58}{0.60}{0.145}{-3},{0.80}{0.77}{0.080}{-6},{1}{0.92}{0.030}{-8}}
% the ramp of \flo@crgb, as colors #1@0 .. #1@100
\def\flo@ramp#1{%
  \def\flo@rampto{#1}%
  \begingroup\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
  \expandafter\flo@rampin\flo@crgb\relax
  \endgroup}
\def\flo@rampin#1,#2,#3\relax{%
  % the ink in OKLCH: its hue, and its chroma against the default ink's (0.175)
  \flo@srgbdec\flo@ir{#1}\flo@srgbdec\flo@ig{#2}\flo@srgbdec\flo@ib{#3}%
  \flo@calc\flo@t{0.4122214708*\flo@ir+0.5363325363*\flo@ig+0.0514459929*\flo@ib}\flo@cbrt\flo@il\flo@t
  \flo@calc\flo@t{0.2119034982*\flo@ir+0.6806995451*\flo@ig+0.1073969566*\flo@ib}\flo@cbrt\flo@im\flo@t
  \flo@calc\flo@t{0.0883024619*\flo@ir+0.2817188376*\flo@ig+0.6299787005*\flo@ib}\flo@cbrt\flo@is\flo@t
  \flo@calc\flo@iA{1.9779984951*\flo@il-2.4285922050*\flo@im+0.4505937099*\flo@is}%
  \flo@calc\flo@iB{0.0259040371*\flo@il+0.7827717662*\flo@im-0.8086757660*\flo@is}%
  % a gray (chroma under 1e-4) has no hue: hue 0 and a gray ramp, as florilegium-ink.lua; the
  % hue from a and b times 1000, since fpu's atan2 snaps to an axis while |y| < 0.001
  \flo@calc\flo@t{veclen(\flo@iA,\flo@iB)}%
  \ifdim\flo@t pt<0.0001pt \def\flo@hue{0}\def\flo@ck{0}\else
    \flo@calc\flo@hue{atan2(1000*\flo@iB,1000*\flo@iA)}%
    \flo@calc\flo@ck{max(0.15,min(1.3,veclen(\flo@iA,\flo@iB)/0.175))}%
  \fi
  \flo@loop{ramp}\flo@ka{0}{100}{%
    \flo@calc\flo@rt{\the\flo@ka/100}%
    \def\flo@rs{0}%
    \expandafter\flo@rampseg\flo@stops,\relax,
    \flo@calc\flo@ru{(\flo@rt-\flo@sa)/(\flo@sb-\flo@sa)}%
    \flo@calc\flo@rL{\flo@La+(\flo@Lb-\flo@La)*\flo@ru}%
    \flo@calc\flo@rC{(\flo@Ca+(\flo@Cb-\flo@Ca)*\flo@ru)*\flo@ck}%
    \flo@calc\flo@rh{\flo@hue+\flo@da+(\flo@db-\flo@da)*\flo@ru}%
    \flo@oklch\flo@rL\flo@rC\flo@rh
    \ifflo@ingamut\else
      % the largest chroma in gamut: bisection
      \def\flo@lo{0}\let\flo@hi\flo@rC
      \flo@loop{bis}\flo@kb{1}{14}{%
        \flo@calc\flo@mid{(\flo@lo+\flo@hi)/2}\flo@oklch\flo@rL\flo@mid\flo@rh
        \ifflo@ingamut\let\flo@lo\flo@mid\else\let\flo@hi\flo@mid\fi}%
      \flo@oklch\flo@rL\flo@lo\flo@rh
    \fi
    \flo@calc\flo@t{max(0,min(1,\flo@or))}\flo@srgbenc\flo@cr\flo@t
    \flo@calc\flo@t{max(0,min(1,\flo@og))}\flo@srgbenc\flo@cg\flo@t
    \flo@calc\flo@t{max(0,min(1,\flo@ob))}\flo@srgbenc\flo@cb\flo@t
    \xglobal\definecolor{\flo@rampto @\the\flo@ka}{rgb}{\flo@cr,\flo@cg,\flo@cb}}}
% the stops around \flo@rt, as florilegium-ink.lua finds them: a = stop k, b = stop k+1,
% k advancing while b's t < \flo@rt. Sets \flo@sa \flo@La \flo@Ca \flo@da and \flo@sb ...
\def\flo@rampseg#1,{%
  \ifx\relax#1\else
    \flo@rampstop#1%
    \ifcase\flo@rs\space
      \let\flo@sa\flo@st\let\flo@La\flo@sL\let\flo@Ca\flo@sC\let\flo@da\flo@sd\def\flo@rs{1}%
    \or
      \let\flo@sb\flo@st\let\flo@Lb\flo@sL\let\flo@Cb\flo@sC\let\flo@db\flo@sd\def\flo@rs{2}%
    \else
      \ifdim\flo@sb pt<\flo@rt pt
        \let\flo@sa\flo@sb\let\flo@La\flo@Lb\let\flo@Ca\flo@Cb\let\flo@da\flo@db
        \let\flo@sb\flo@st\let\flo@Lb\flo@sL\let\flo@Cb\flo@sC\let\flo@db\flo@sd
      \fi
    \fi
    \expandafter\flo@rampseg
  \fi}
\def\flo@rampstop#1#2#3#4{\def\flo@st{#1}\def\flo@sL{#2}\def\flo@sC{#3}\def\flo@sd{#4}}

% ---------------------------------------------------------------- shapes kept by name
% \flo@smoothprepT{N}{tension}: \flo@smoothprep with ink.smooth's tension (k = tension/6)
\def\flo@smoothprepT#1#2{%
  \edef\flo@N{\the\numexpr#1\relax}\edef\flo@tk{#2}%
  \flo@loop{spT}\flo@i{1}{\flo@N}{%
    \edef\flo@ia{\the\numexpr\ifnum\flo@i=1 \flo@N\else\flo@i-1\fi\relax}%
    \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@N\space 1\else\flo@i+1\fi\relax}%
    \edef\flo@ic{\the\numexpr\ifnum\flo@ib=\flo@N\space 1\else\flo@ib+1\fi\relax}%
    \edef\flo@xi{\flo@x{\the\flo@i}}\edef\flo@yi{\flo@y{\the\flo@i}}%
    \flo@calc\flo@t{\flo@xi+(\flo@x\flo@ib-(\flo@x\flo@ia))*\flo@tk/6}\expandafter\let\csname flo@A\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@yi+(\flo@y\flo@ib-(\flo@y\flo@ia))*\flo@tk/6}\expandafter\let\csname flo@B\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@x\flo@ib-(\flo@x\flo@ic-(\flo@xi))*\flo@tk/6}\expandafter\let\csname flo@C\the\flo@i\endcsname\flo@t
    \flo@calc\flo@t{\flo@y\flo@ib-(\flo@y\flo@ic-(\flo@yi))*\flo@tk/6}\expandafter\let\csname flo@D\the\flo@i\endcsname\flo@t}}
% fill the current path in a scope of its own, #1 the scope's settings (opacity, blend):
% \pgfscope empties the current path, so it is carried in
\def\flo@scopefill#1{\pgfsyssoftpath@getcurrentpath\flo@scopepath
  \begin{pgfscope}#1\pgfsyssoftpath@setcurrentpath\flo@scopepath\pgfusepath{fill}\end{pgfscope}}
% keep the curve prepared last under the name #1, and emit a kept curve's path
\def\flo@keep#1{%
  \expandafter\edef\csname flo@#1@N\endcsname{\flo@N}%
  \flo@loop{kp}\flo@kb{1}{\flo@N}{%
    \edef\flo@t{\the\flo@kb}%
    \expandafter\edef\csname flo@#1@X\flo@t\endcsname{\flo@x\flo@t}\expandafter\edef\csname flo@#1@Y\flo@t\endcsname{\flo@y\flo@t}%
    \expandafter\edef\csname flo@#1@A\flo@t\endcsname{\csname flo@A\flo@t\endcsname}%
    \expandafter\edef\csname flo@#1@B\flo@t\endcsname{\csname flo@B\flo@t\endcsname}%
    \expandafter\edef\csname flo@#1@C\flo@t\endcsname{\csname flo@C\flo@t\endcsname}%
    \expandafter\edef\csname flo@#1@D\flo@t\endcsname{\csname flo@D\flo@t\endcsname}}}
\def\flo@kept#1{%
  \edef\flo@kn{\csname flo@#1@N\endcsname}%
  \pgfpathmoveto{\flo@P{\csname flo@#1@X1\endcsname}{\csname flo@#1@Y1\endcsname}}%
  \flo@loop{kpp}\flo@i{1}{\flo@kn}{%
    \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@kn\space 1\else\flo@i+1\fi\relax}%
    \pgfpathcurveto{\flo@P{\csname flo@#1@A\the\flo@i\endcsname}{\csname flo@#1@B\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@#1@C\the\flo@i\endcsname}{\csname flo@#1@D\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@#1@X\flo@ib\endcsname}{\csname flo@#1@Y\flo@ib\endcsname}}}%
  \pgfpathclose}
% normals by central differences over points 1..#1 of flo@X/Y (ink.normals): flo@NX/NY
\def\flo@normals#1{%
  \flo@loop{nrm}\flo@kb{1}{#1}{%
    \edef\flo@ia{\the\numexpr\ifnum\flo@kb=1 1\else\flo@kb-1\fi\relax}%
    \edef\flo@ib{\the\numexpr\ifnum\flo@kb=\numexpr#1\relax #1\else\flo@kb+1\fi\relax}%
    \flo@calc\flo@da{\flo@x\flo@ib-(\flo@x\flo@ia)}\flo@calc\flo@db{\flo@y\flo@ib-(\flo@y\flo@ia)}%
    \pgfmathparse{veclen(\flo@da,\flo@db)}\let\flo@nl\pgfmathresult
    \ifdim\flo@nl pt<0.00002pt \def\flo@nl{1}\fi
    \flo@calc\flo@t{-(\flo@db)/\flo@nl}\expandafter\let\csname flo@NX\the\flo@kb\endcsname\flo@t
    \flo@calc\flo@t{(\flo@da)/\flo@nl}\expandafter\let\csname flo@NY\the\flo@kb\endcsname\flo@t}}
% flora's streak: a ribbon along points 1..#1 of flo@X/Y, width from #2 to #3 (narrower
% for its first 12%), smoothed and filled #4 at opacity #5
\def\flo@vstreak#1#2#3#4#5{%
  \flo@normals{#1}%
  \def\flo@acc{0}\expandafter\def\csname flo@S1\endcsname{0}%
  \flo@loop{arc}\flo@kb{2}{#1}{%
    \edef\flo@ia{\the\numexpr\flo@kb-1\relax}%
    \flo@calc\flo@acc{\flo@acc+veclen(\flo@x{\the\flo@kb}-(\flo@x\flo@ia),\flo@y{\the\flo@kb}-(\flo@y\flo@ia))}%
    \expandafter\let\csname flo@S\the\flo@kb\endcsname\flo@acc}%
  \flo@loop{rib}\flo@kb{1}{#1}{%
    \flo@calc\flo@u{\flo@acc>0 ? \csname flo@S\the\flo@kb\endcsname/\flo@acc : 0}%
    \flo@calc\flo@w{((#2)+((#3)-(#2))*\flo@u)*(\flo@u<0.12 ? 0.4+5*\flo@u : 1)/2}%
    \flo@calc\flo@xl{\flo@x{\the\flo@kb}+\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@yl{\flo@y{\the\flo@kb}+\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@xr{\flo@x{\the\flo@kb}-\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@yr{\flo@y{\the\flo@kb}-\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
    \expandafter\let\csname flo@RX\the\flo@kb\endcsname\flo@xl\expandafter\let\csname flo@RY\the\flo@kb\endcsname\flo@yl
    \expandafter\let\csname flo@QX\the\flo@kb\endcsname\flo@xr\expandafter\let\csname flo@QY\the\flo@kb\endcsname\flo@yr}%
  \flo@loop{ribo}\flo@kb{1}{#1}{%
    \flo@put{\the\flo@kb}{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}%
    \flo@put{\the\numexpr2*(#1)+1-\flo@kb\relax}{\csname flo@QX\the\flo@kb\endcsname}{\csname flo@QY\the\flo@kb\endcsname}}%
  \flo@smoothprep{\the\numexpr2*(#1)\relax}\flo@vfill{#4}{#5}{0}{\flo@smoothpath}}

% ---------------------------------------------------------------- the leaf (flora.leaf)
% along +y, length 1. Set before (empty: drawn as flora draws it): \flo@vl@W, \flo@vl@bend,
% \flo@vl@lobes, \flo@vl@depth, \flo@vl@tone; and \flo@vl@u (cm per unit, no random part)
\def\flo@lspine#1{\ifnum\flo@hk=1 \ifdim#1pt>\flo@hv pt \flo@lhook{#1}\else\flo@lspine@{#1}\fi\else\flo@lspine@{#1}\fi}
\def\flo@lspine@#1{\flo@calc\flo@sx{\flo@lbend*(#1)*(#1)-0.3*\flo@lbend*(#1)}\edef\flo@sy{#1}}
\def\flo@hk{0}
% A curled tip, as the reference's leaves curl: beyond \flo@hv the spine turns \flo@hth
% degrees along a circle, toward the side the leaf bends, as tight as the blade allows
% (its radius at least 1.8 times the half-width there), so a narrow leaf hooks right over and
% shows its underside while a broad one only bends its tip aside; none of 45 degrees or less.
% Draws: its length, its turn
\def\flo@hookset{%
  \flo@range\flo@hl{0.25}{0.4}\flo@calc\flo@hv{1-\flo@hl}\flo@shw\flo@hv
  \flo@range\flo@t{120}{190}\flo@calc\flo@hth{min(\flo@t,\flo@hl/(1.8*max(0.01,\flo@h))*57.29578)}%
  \ifdim\flo@hth pt>45pt
    \def\flo@hk{1}%
    \ifdim\flo@lbend pt<0pt \def\flo@hs{-1}\else\def\flo@hs{1}\fi
    \flo@lspine@\flo@hv\let\flo@hpx\flo@sx\let\flo@hpy\flo@sy
    \flo@calc\flo@htx{2*\flo@lbend*\flo@hv-0.3*\flo@lbend}\flo@calc\flo@t{veclen(\flo@htx,1)}%
    \flo@calc\flo@htx{\flo@htx/\flo@t}\flo@calc\flo@hty{1/\flo@t}%
    \flo@calc\flo@hnx{\flo@hs*\flo@hty}\flo@calc\flo@hny{-\flo@hs*\flo@htx}%
    \flo@calc\flo@hr{\flo@hl/\flo@hth*57.29578}%
  \fi}
% the spine along the curl, at #1 beyond \flo@hv
\def\flo@lhook#1{\flo@calc\flo@hph{((#1)-\flo@hv)/\flo@hl*\flo@hth}%
  \flo@calc\flo@sx{\flo@hpx+\flo@hr*(sin(\flo@hph)*\flo@htx+(1-cos(\flo@hph))*\flo@hnx)}%
  \flo@calc\flo@sy{\flo@hpy+\flo@hr*(sin(\flo@hph)*\flo@hty+(1-cos(\flo@hph))*\flo@hny)}}
% the curl's underside, where it turns past 95 degrees: the blade from just past the curl's
% middle to the tip, drawn again over it from the same margin samples, paler, its midrib
% white and its edge dark
\def\flo@hookunder{%
  \flo@calc\flo@hva{\flo@hv+0.45*\flo@hl}\def\flo@hka{0}%
  \flo@loop{hka}\flo@kb{1}{\flo@mn}{\ifnum\flo@hka=0
    \ifdim\csname flo@sv\the\flo@kb\endcsname pt>\flo@hva pt \edef\flo@hka{\the\flo@kb}\fi\fi}%
  \ifnum\flo@hka>1 \ifnum\flo@hka<\flo@mn
    \def\flo@hun{0}%
    \flo@loop{hkl}\flo@kb{\flo@hka}{\flo@mn}{\edef\flo@hun{\the\numexpr\flo@hun+1\relax}%
      \flo@put\flo@hun{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}}%
    \flo@loop{hkr}\flo@kb{1}{\flo@mn-\flo@hka}{\edef\flo@hun{\the\numexpr\flo@hun+1\relax}%
      \edef\flo@q{\the\numexpr\flo@mn-\flo@kb\relax}%
      \flo@put\flo@hun{\csname flo@QX\flo@q\endcsname}{\csname flo@QY\flo@q\endcsname}}%
    \flo@smoothprepT\flo@hun\flo@ltk\flo@keep{lsu}%
    \flo@calc\flo@t{min(0.64,\flo@lt+0.26)}\flo@vtone{flo@c}{\flo@t}\flo@vfill{flo@c}{1}{0}{\flo@kept{lsu}}%
    \begin{pgfscope}\flo@kept{lsu}\pgfusepath{clip}%
      \flo@loop{hkm}\flo@kb{0}{10}{\flo@calc\flo@v{\flo@hva+(1-\flo@hva)*\the\flo@kb/10}%
        \flo@lspine\flo@v\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
      \flo@vstreak{11}{0.02}{0.003}{white}{0.6}%
      \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{lsu}}%
    \end{pgfscope}%
  \fi\fi}
\def\flo@ltan#1{%
  \flo@calc\flo@t{max(0,(#1)-0.01)}\flo@lspine\flo@t\let\flo@ta\flo@sx\let\flo@tb\flo@sy
  \flo@calc\flo@t{min(1,(#1)+0.01)}\flo@lspine\flo@t
  \flo@calc\flo@da{\flo@sx-(\flo@ta)}\flo@calc\flo@db{\flo@sy-(\flo@tb)}%
  \pgfmathparse{veclen(\flo@da,\flo@db)}\let\flo@nl\pgfmathresult
  \flo@calc\flo@tx{\flo@da/\flo@nl}\flo@calc\flo@ty{\flo@db/\flo@nl}}
\def\flo@lenv#1{\ifdim#1pt>0pt \ifdim#1pt<1pt
  \flo@calc\flo@env{\flo@lW*2.3*pow(#1,0.55)*pow(1-(#1),0.95)}\else\def\flo@env{0}\fi\else\def\flo@env{0}\fi}
\def\flo@lteeth#1{\flo@calc\flo@th{0.006*(1-abs(2*((#1)*9-floor((#1)*9))-1))}}
\def\flo@vleaf{%
  \ifx\flo@vl@W\pgfutil@empty\flo@range\flo@lW{0.20}{0.27}\else\edef\flo@lW{\flo@vl@W}\fi
  \ifx\flo@vl@bend\pgfutil@empty\flo@sym\flo@lbend{0.25}\else\edef\flo@lbend{\flo@vl@bend}\fi
  \ifx\flo@vl@lobes\pgfutil@empty\flo@int\flo@llobes{3}{5}\else\edef\flo@llobes{\flo@vl@lobes}\fi
  \ifx\flo@vl@depth\pgfutil@empty\flo@range\flo@ldepth{0.3}{0.7}\else\edef\flo@ldepth{\flo@vl@depth}\fi
  \ifx\flo@vl@tone\pgfutil@empty\flo@range\flo@lt{0.26}{0.38}\else\edef\flo@lt{\flo@vl@tone}\fi
  \ifdim\flo@vl@u pt>0.6pt \def\flo@fine{1}\def\flo@bn{36}\else\def\flo@fine{0}\def\flo@bn{24}\fi
  \ifdim\flo@ldepth pt>0pt \flo@calc\flo@bodyw{1-0.75*\flo@ldepth}\def\flo@lent{0}\else\def\flo@bodyw{1}\def\flo@lent{1}\fi
  % the body: a blade along the spine, toothed when it has no lobes
  \flo@loop{lbs}\flo@kb{0}{\flo@bn}{%
    \flo@calc\flo@v{\the\flo@kb/\flo@bn}\flo@lspine\flo@v
    \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
  \flo@normals{\the\numexpr\flo@bn+1\relax}%
  \flo@loop{lbo}\flo@kb{0}{\flo@bn}{%
    \flo@calc\flo@v{\the\flo@kb/\flo@bn}\flo@lenv\flo@v\flo@calc\flo@h{\flo@env*\flo@bodyw}%
    \flo@calc\flo@t{\flo@v*3}\flo@lteeth\flo@t\flo@calc\flo@e{max(0,\flo@h+\flo@lent*\flo@th)}%
    \edef\flo@q{\the\numexpr\flo@kb+1\relax}%
    \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@e}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@e}%
    \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@e}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@e}%
    \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
    \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
  \flo@bladeassemble{\flo@bn}\flo@smoothprepT{\the\numexpr2*\flo@bn\relax}{0.8}\flo@keep{ls1}%
  \def\flo@nshapes{1}\def\flo@nveins{0}%
  % the lobes, grown out of the body along the spine, turned 38..58 degrees outward
  \ifdim\flo@ldepth pt>0pt
    \flo@loop{lside}\flo@kc{0}{1}{%
      \ifnum\flo@kc=0 \def\flo@side{-1}\else\def\flo@side{1}\fi
      \flo@loop{lobe}\flo@ka{1}{\flo@llobes}{%
        \flo@calc\flo@lv{0.1+0.72*(\the\flo@ka-(\flo@side>0 ? 0.25 : 0.75))/\flo@llobes}%
        \flo@lspine\flo@lv\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan\flo@lv
        \flo@calc\flo@t{min(0.95,\flo@lv+0.08)}\flo@lenv\flo@t\flo@range\flo@t{0.95}{1.15}\flo@calc\flo@reach{\flo@env*\flo@t}%
        \flo@range\flo@lang{38}{58}%
        \flo@calc\flo@c{cos(\flo@lang)}\flo@calc\flo@sn{sin(\flo@lang)*\flo@side}%
        \flo@calc\flo@ldx{\flo@tx*\flo@c-\flo@ty*\flo@sn}\flo@calc\flo@ldy{\flo@tx*\flo@sn+\flo@ty*\flo@c}%
        \flo@calc\flo@lL{\flo@reach/sin(\flo@lang)*0.95}%
        \flo@sym\flo@t{0.25}\flo@calc\flo@lb{\flo@t-\flo@side*0.15}%
        \flo@loop{lbp}\flo@kb{0}{11}{%
          \flo@calc\flo@v{\the\flo@kb/11}%
          \flo@calc\flo@sx{\flo@lx+\flo@ldx*\flo@lL*\flo@v-\flo@ldy*\flo@lb*\flo@lL*\flo@v*\flo@v}%
          \flo@calc\flo@sy{\flo@ly+\flo@ldy*\flo@lL*\flo@v+\flo@ldx*\flo@lb*\flo@lL*\flo@v*\flo@v}%
          \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
        \flo@normals{12}%
        \flo@loop{lbw}\flo@kb{0}{11}{%
          \flo@calc\flo@v{\the\flo@kb/11}\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
          \ifdim\flo@v pt>0.2pt \flo@calc\flo@t{\flo@v*1.4+\the\flo@ka}\flo@lteeth\flo@t\flo@calc\flo@e{\flo@th*\flo@lL*4}\else\def\flo@e{0}\fi
          \ifdim\flo@v pt>0pt \flo@calc\flo@g{pow(max(0,sin(180*pow(\flo@v,0.62))),0.75)}\else\def\flo@g{0}\fi
          \flo@range\flo@t{0.26}{0.3}\flo@calc\flo@wa{max(0,\flo@lL*\flo@t*\flo@g+\flo@e)}%
          \flo@range\flo@t{0.26}{0.3}\flo@calc\flo@wb{max(0,\flo@lL*\flo@t*\flo@g+\flo@e)}%
          \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@wa}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@wa}%
          \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@wb}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@wb}%
          \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
          \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
        % the lobe's vein: base, middle (t 0.45) and end (t 0.92) of its spine
        \edef\flo@nveins{\the\numexpr\flo@nveins+1\relax}%
        \flo@calc\flo@t{0.45}\flo@calc\flo@mx{\flo@lx+\flo@ldx*\flo@lL*\flo@t-\flo@ldy*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@my{\flo@ly+\flo@ldy*\flo@lL*\flo@t+\flo@ldx*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@t{0.92}\flo@calc\flo@ex{\flo@lx+\flo@ldx*\flo@lL*\flo@t-\flo@ldy*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@ey{\flo@ly+\flo@ldy*\flo@lL*\flo@t+\flo@ldx*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \expandafter\edef\csname flo@V\flo@nveins\endcsname{{\flo@lx}{\flo@ly}{\flo@mx}{\flo@my}{\flo@ex}{\flo@ey}}%
        \flo@bladeassemble{11}\flo@smoothprepT{22}{0.8}%
        \edef\flo@nshapes{\the\numexpr\flo@nshapes+1\relax}\flo@keep{ls\flo@nshapes}}}%
  \fi
  \flo@vtone{flo@c}{\flo@lt}\flo@vfill{flo@c}{1}{0}{\flo@leaftrace}%
  \begin{pgfscope}%
    \flo@leaftrace\pgfusepath{clip}%
    % the darker half
    \flo@chance{0.5}\ifflo@yes\def\flo@sd{1}\else\def\flo@sd{-1}\fi
    \def\flo@hp{}%
    \flo@loop{lhalf}\flo@kb{0}{30}{%
      \flo@calc\flo@v{\the\flo@kb/30}\flo@lspine\flo@v
      \ifnum\flo@kb=0 \pgfpathmoveto{\flo@P\flo@sx\flo@sy}\else\pgfpathlineto{\flo@P\flo@sx\flo@sy}\fi}%
    \flo@calc\flo@t{\flo@sd*2}\pgfpathlineto{\flo@P\flo@t{1}}\pgfpathlineto{\flo@P\flo@t{0}}\pgfpathclose
    \flo@scopefill{\flo@vtone{flo@c}{0.12}\pgfsetfillcolor{flo@c}\pgfsetfillopacity{0.28}\pgfsetblendmode{multiply}}%
    \flo@calc\flo@xa{-\flo@lW*2.5}\flo@calc\flo@xb{\flo@lW*2.5}\flo@calc\flo@ta{\flo@lt-0.2}\flo@calc\flo@tb{\flo@lt+0.22}%
    \ifnum\flo@fine=1 \flo@vmottle\flo@xa{0}\flo@xb{1}{13}{0.11}\flo@ta\flo@tb{12}%
    \else\flo@vmottle\flo@xa{0}\flo@xb{1}{6}{0.11}\flo@ta\flo@tb{0}\fi
    \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.22}{1}{\flo@leaftrace}%
    % midrib and veins in white
    \flo@loop{mid}\flo@kb{0}{10}{\flo@calc\flo@v{\the\flo@kb/10}\flo@lspine\flo@v\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
    \flo@vstreak{11}{0.03}{0.003}{white}{0.78}%
    \flo@loop{lvein}\flo@ka{1}{\flo@nveins}{%
      \expandafter\expandafter\expandafter\flo@lveinat\csname flo@V\the\flo@ka\endcsname
      \def\flo@twa{0.017}\def\flo@twb{0.002}\flo@range\flo@op{0.5}{0.75}%
      \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@va\flo@vb\flo@mx\flo@my\flo@c\flo@d\flo@ex\flo@ey}}%
    \ifnum\flo@nveins=0
      \flo@loop{sveins}\flo@ka{1}{9}{%
        \flo@calc\flo@v{(\the\flo@ka-0.3)/10*0.9}\ifodd\flo@ka\def\flo@sg{-1}\else\def\flo@sg{1}\fi
        \flo@lspine\flo@v\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan\flo@v
        \flo@calc\flo@nx{-\flo@ty*\flo@sg}\flo@calc\flo@ny{\flo@tx*\flo@sg}%
        \flo@lenv\flo@v\flo@range\flo@t{0.75}{0.95}\flo@calc\flo@lL{\flo@env*\flo@bodyw*\flo@t}%
        \flo@calc\flo@pa{\flo@lx+\flo@nx*\flo@lL*0.4}\flo@calc\flo@pb{\flo@ly+\flo@ny*\flo@lL*0.4}%
        \flo@calc\flo@pc{\flo@lx+\flo@nx*\flo@lL*0.75+\flo@tx*\flo@lL*0.3}\flo@calc\flo@pd{\flo@ly+\flo@ny*\flo@lL*0.75+\flo@ty*\flo@lL*0.3}%
        \flo@calc\flo@pe{\flo@lx+\flo@nx*\flo@lL*0.95+\flo@tx*\flo@lL*0.6}\flo@calc\flo@pf{\flo@ly+\flo@ny*\flo@lL*0.95+\flo@ty*\flo@lL*0.6}%
        \let\flo@qa\flo@pa\let\flo@qb\flo@pb\let\flo@qc\flo@pc\let\flo@qd\flo@pd\let\flo@qe\flo@pe\let\flo@qf\flo@pf
        \def\flo@twa{0.014}\def\flo@twb{0.002}\flo@range\flo@op{0.45}{0.7}%
        \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@lx\flo@ly\flo@qa\flo@qb\flo@qc\flo@qd\flo@qe\flo@qf}}%
    \fi
  \end{pgfscope}%
  \ifnum\flo@lent=1 \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{0.18}{0.4}{0}{\flo@kept{ls1}}\fi}
\def\flo@lveinat#1#2#3#4#5#6{\def\flo@va{#1}\def\flo@vb{#2}\def\flo@mx{#3}\def\flo@my{#4}\def\flo@ex{#5}\def\flo@ey{#6}%
  \flo@calc\flo@c{\flo@mx+(\flo@ex-\flo@mx)*0.5}\flo@calc\flo@d{\flo@my+(\flo@ey-\flo@my)*0.5}}
% every shape of the leaf, as one path (the body and the lobes)
\def\flo@leaftrace{\flo@loop{ltr}\flo@j{1}{\flo@nshapes}{\flo@kept{ls\the\flo@j}}}
% points 1..#1+1 from flo@RX/RY (left) and flo@QX/QY (right) into a blade outline
% (ink.blade's order: left base to tip, right back to the second point)
\def\flo@bladeassemble#1{%
  \flo@loop{bla}\flo@kb{1}{#1+1}{%
    \flo@put{\the\flo@kb}{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}}%
  \flo@loop{blb}\flo@kb{2}{#1}{%
    \flo@put{\the\numexpr2*(#1)+2-\flo@kb\relax}{\csname flo@QX\the\flo@kb\endcsname}{\csname flo@QY\the\flo@kb\endcsname}}}

% ---------------------------------------------------------------- the species' leaf
% A simple leaf of the species along +y, length 1, in flora's hand (\flo@vleaf, which the
% v1.3 pic keeps as it was) with the species' own outline. The blade is two superellipse
% quarters that meet at its widest point \flo@lvm, set by the shape: the base's, from the
% junction, (1-t^kb)^(1/kb) with kb from the base (1 a wedge, 2 round, more a straight
% base), and the apex's, to the tip, with ka from the apex. An acuminate apex narrows into
% a drip tip, an emarginate one is notched and a mucronate one ends in a point. Basal lobes
% hang below the junction (cordate, reniform, sagittate: \flo@ldrop) or stand out beside it
% (hastate: \flo@lhl); an oblique base starts higher on one side (\flo@lobl). A petiolate
% leaf has a stalk below its blade, and stipules sit at its foot. \flo@lW is the
% half-width at the widest point. Set before: \flo@vl@bend, \flo@vl@lobes, \flo@vl@depth,
% \flo@vl@tone and \flo@vl@u as for \flo@vleaf.
% the outline's numbers: the base first, then the shape (which may fix the base), the apex
\def\flo@sshape{\flo@sshape@
  \edef\flo@t{\flo@get{attachment}}\def\flo@tmp{clasping}%
  \ifx\flo@t\flo@tmp\ifdim\flo@ldrop pt=0pt \def\flo@ldrop{0.7}\flo@calc\flo@lkb{max(\flo@lkb,2)}\fi\fi}
% (a leaflet's: no attachment)
\def\flo@sshape@{%
  \flo@calc\flo@lW{max(0.035,min(0.6,0.5/\flo@get{leafaspect}))}%
  \def\flo@lvm{0.35}\def\flo@ldrop{0}\def\flo@lhl{0}\def\flo@lobl{0}\def\flo@lacu{0}\def\flo@ltip{0}\def\flo@lround{0}%
  \csname flo@lb@\flo@get{leafbase}\endcsname
  \csname flo@ls@\flo@get{leafshape}\endcsname
  \csname flo@la@\flo@get{leafapex}\endcsname
  % a round or kidney-shaped blade keeps a round tip whatever its apex
  \ifnum\flo@lround=1 \flo@calc\flo@lka{max(\flo@lka,2.2)}\def\flo@lacu{0}\fi}
\def\flo@lb@cuneate{\def\flo@lkb{1.15}}
\def\flo@lb@rounded{\def\flo@lkb{2}}
\def\flo@lb@truncate{\def\flo@lkb{3.5}}
\def\flo@lb@cordate{\def\flo@lkb{2}\def\flo@ldrop{1}}
\def\flo@lb@auriculate{\def\flo@lkb{1.5}}
\def\flo@lb@oblique{\def\flo@lkb{1.8}\def\flo@lobl{0.08}}
\def\flo@ls@linear{\def\flo@lvm{0.45}\flo@calc\flo@lkb{max(\flo@lkb,2.2)}}
\def\flo@ls@lanceolate{\def\flo@lvm{0.3}}
\def\flo@ls@elliptic{\def\flo@lvm{0.5}}
\def\flo@ls@ovate{\def\flo@lvm{0.3}}
\def\flo@ls@obovate{\def\flo@lvm{0.68}}
\def\flo@ls@oblong{\def\flo@lvm{0.5}\flo@calc\flo@lkb{max(\flo@lkb,2.4)}}
\def\flo@ls@orbicular{\def\flo@lvm{0.5}\def\flo@lkb{2}\def\flo@lround{1}}
\def\flo@ls@cordate{\def\flo@lvm{0.3}}
\def\flo@ls@reniform{\def\flo@lvm{0.42}\def\flo@lkb{2}\def\flo@ldrop{0.8}\def\flo@lround{1}}
\def\flo@ls@deltoid{\def\flo@lvm{0.1}\def\flo@lkb{3.5}}
\def\flo@ls@sagittate{\def\flo@lvm{0.32}\def\flo@lkb{1.8}\def\flo@ldrop{2}}
\def\flo@ls@hastate{\def\flo@lvm{0.38}\def\flo@lkb{1.7}\def\flo@lhl{1.05}\def\flo@ldrop{0.2}}
\def\flo@la@acute{\def\flo@lka{1.25}}
\def\flo@la@acuminate{\def\flo@lka{1.5}\def\flo@lacu{1}}
\def\flo@la@obtuse{\def\flo@lka{2}}
\def\flo@la@rounded{\def\flo@lka{2.6}}
\def\flo@la@emarginate{\def\flo@lka{2.6}\def\flo@ltip{-1}}
\def\flo@la@mucronate{\def\flo@lka{2.3}\def\flo@ltip{1}}
% the blade's half-width \flo@h at #1 along the spine, and how far its edge hangs below
% that point (\flo@dy: basal lobes)
\def\flo@shw#1{%
  \edef\flo@shv{#1}%
  \ifdim\flo@shv pt<\flo@lvm pt
    \flo@calc\flo@t{(\flo@lvm-(\flo@shv))/\flo@lvm}%
    \ifdim\flo@t pt>0.9995pt \def\flo@h{0}\else\flo@calc\flo@h{\flo@lW*pow(1-pow(\flo@t,\flo@lkb),1/\flo@lkb)}\fi
    \flo@calc\flo@dy{\flo@ldrop*\flo@lW*sin(180*(1-\flo@t))*\flo@t}%
  \else
    \flo@calc\flo@t{((\flo@shv)-\flo@lvm)/(1-\flo@lvm)}%
    \ifdim\flo@t pt>0.9995pt \def\flo@h{0}\else\flo@calc\flo@h{\flo@lW*pow(1-pow(\flo@t,\flo@lka),1/\flo@lka)}\fi
    \ifnum\flo@lacu=1 \ifdim\flo@t pt>0.2pt
      \flo@calc\flo@t{min(1,(\flo@t-0.2)/0.65)}\flo@calc\flo@h{\flo@h*(1-0.7*\flo@t*\flo@t*(3-2*\flo@t))}\fi\fi
    \def\flo@dy{0}%
  \fi
  \ifdim\flo@lhl pt>0pt
    \flo@calc\flo@t{max(0,1-abs((\flo@shv)-0.11)/0.11)}%
    \ifdim\flo@t pt>0pt \flo@calc\flo@h{max(\flo@h,\flo@lhl*\flo@lW*\flo@t)}\fi
  \fi}
\def\flo@slenv#1{\flo@shw{#1}\let\flo@env\flo@h}
% The body's margin: samples \flo@sv<k> along the spine, k = 1..\flo@mn, each with its
% tooth profile \flo@sd<k> (1 at a tooth's tip and on a smooth edge, 0 at the bottom of a
% notch) and the cut's scale on the left and the right (\flo@sjl<k>, \flo@sjr<k>), so no two
% teeth are alike. A smooth margin is \flo@bn+1 samples closer together at the ends, a wavy
% one waves three to five times; teeth run from 0.12 to 0.93 along the spine, as many as the
% species has where the leaf is large enough to show them: serrate teeth lean toward the tip,
% dentate ones point out, crenate ones are round scallops, doubly serrate ones carry a
% smaller tooth. A lobed body keeps a smooth edge (its lobes have their own).
\def\flo@sadd#1#2#3#4{\edef\flo@mn{\the\numexpr\flo@mn+1\relax}%
  \expandafter\edef\csname flo@sv\flo@mn\endcsname{#1}\expandafter\edef\csname flo@sd\flo@mn\endcsname{#2}%
  \expandafter\edef\csname flo@sjl\flo@mn\endcsname{#3}\expandafter\edef\csname flo@sjr\flo@mn\endcsname{#4}}
% a point of the tooth that starts at \flo@tvo and is \flo@tw wide: #1 its phase, #2 its profile
\def\flo@tpt#1#2{\flo@calc\flo@t{\flo@tvo+\flo@tw*(#1)}\flo@sadd\flo@t{#2}\flo@jl\flo@jr}
\def\flo@lt@serrate{\flo@tpt{0}{0}\flo@tpt{0.75+\flo@jp}{1}}
\def\flo@lt@doubly{\flo@tpt{0}{0}\flo@tpt{0.38}{0.55}\flo@tpt{0.52}{0.3}\flo@tpt{0.82+\flo@jp}{1}}
\def\flo@lt@dentate{\flo@tpt{0}{0}\flo@tpt{0.5+\flo@jp}{1}}
\def\flo@lt@crenate{\flo@tpt{0}{0}\flo@tpt{0.2}{0.72}\flo@tpt{0.5+\flo@jp}{1}\flo@tpt{0.8}{0.72}}
% the margin's kind \flo@lmk (0 smooth, 1 wavy, 2 toothed), the cut's depth \flo@ldep and
% the outline's tension \flo@ltk (teeth a little sharper)
\def\flo@lm@undulate{\def\flo@lmk{1}}
\def\flo@lm@serrate{\def\flo@lmk{2}\def\flo@ltk{0.5}\def\flo@ltd{1.2}}
\def\flo@lm@doubly{\def\flo@lmk{2}\def\flo@ltk{0.5}\def\flo@ltd{1.3}}
\def\flo@lm@dentate{\def\flo@lmk{2}\def\flo@ltk{0.5}\def\flo@ltd{1.3}}
\def\flo@lm@crenate{\def\flo@lmk{2}\def\flo@ltd{1.5}}
\def\flo@smargin{%
  \def\flo@lmk{0}\def\flo@mn{0}\def\flo@ltk{0.8}\def\flo@ldep{0}\edef\flo@lmn{\flo@get{leafmargin}}%
  \ifx\flo@lmover\pgfutil@empty\else\let\flo@lmn\flo@lmover\fi
  \ifdim\flo@ldepth pt>0pt\else\ifcsname flo@lm@\flo@lmn\endcsname\csname flo@lm@\flo@lmn\endcsname\fi\fi
  \ifnum\flo@lmk=2 \ifnum\flo@get{teeth}<1 \def\flo@lmk{0}\def\flo@ltk{0.8}\fi\fi% no teeth: smooth
  \ifnum\flo@lmk<2
    \ifnum\flo@lmk=1 \flo@int\flo@lwn{3}{5}\flo@calc\flo@ldep{(0.05+\flo@get{dissection})*\flo@lW*2.4}\fi
    \flo@loop{smg}\flo@kb{0}{\flo@bn}{%
      \flo@calc\flo@v{0.5-0.5*cos(180*\the\flo@kb/\flo@bn)}%
      \ifnum\flo@lmk=1 \flo@calc\flo@t{0.5+0.5*sin(360*\flo@lwn*\flo@v)}\else\def\flo@t{1}\fi
      \flo@sadd\flo@v\flo@t{1}{1}}%
  \else
    \ifx\flo@lmover\pgfutil@empty\flo@calc\flo@ldep{\flo@get{dissection}*\flo@lW*\flo@ltd}%
    \else\flo@calc\flo@ldep{min(0.25,\flo@get{dissection})*\flo@lW*\flo@ltd}\fi
    \flo@calc\flo@t{min(\flo@get{teeth},max(4,round(4+8*\flo@vl@u)))}\pgfmathtruncatemacro\flo@ltn{\flo@t}%
    \flo@calc\flo@tw{0.81/\flo@ltn}%
    \flo@loop{smb}\flo@kb{0}{4}{\flo@calc\flo@v{0.12*(1-cos(90*\the\flo@kb/5))}\flo@sadd\flo@v{1}{1}{1}}%
    \flo@loop{smt}\flo@ka{1}{\flo@ltn}{%
      \flo@range\flo@jl{0.65}{1.35}\flo@range\flo@jr{0.65}{1.35}\flo@sym\flo@jp{0.06}%
      \flo@calc\flo@tvo{0.12+\flo@tw*(\the\flo@ka-1)}\csname flo@lt@\flo@lmn\endcsname}%
    \flo@sadd{0.93}{0}{1}{1}%
    \flo@loop{smp}\flo@kb{1}{5}{\flo@calc\flo@v{0.93+0.07*sin(90*\the\flo@kb/5)}\flo@sadd\flo@v{1}{1}{1}}%
  \fi}
\def\flo@sleaf{%
  \flo@sshape
  % a broad blade is drawn shorter, so that it stays within the room a leaf is given (about
  % 0.6 of its length across) and leaves of every shape carry about the same weight
  \flo@calc\flo@lsc{min(1,0.3/\flo@lW)}%
  % (a palmately lobed leaf's lobes fan out to about 0.55 of its length each side)
  \edef\flo@t{\flo@get{leafmargin}}\def\flo@tmp{palmatelobed}%
  \ifx\flo@t\flo@tmp\flo@calc\flo@lsc{min(1,0.3/max(\flo@lW,0.55))}\fi
  \begin{pgfscope}%
  \ifdim\flo@lsc pt<1pt \pgftransformscale{\flo@lsc}\flo@calc\flo@vl@u{\flo@vl@u*\flo@lsc}\fi
  % stipules at the foot, a pair of small leaflets (on leaves a centimeter long or more)
  \edef\flo@t{\flo@get{stipules}}\def\flo@tmp{none}%
  \ifx\flo@t\flo@tmp\else\ifdim\flo@vl@u pt>0.8pt
    \flo@loop{stip}\flo@kc{0}{1}{%
      \flo@range\flo@t{40}{65}\ifnum\flo@kc=1 \flo@calc\flo@t{-\flo@t}\fi\flo@range\flo@ts{0.1}{0.15}%
      \begin{pgfscope}%
        \pgftransformshift{\flo@P0{0.01}}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@ts}%
        \def\flo@vl@W{0.3}\def\flo@vl@tone{0.3}\flo@calc\flo@vl@u{\flo@vl@u*\flo@ts}\flo@vleaflet
      \end{pgfscope}}%
  \fi\fi
  % a petiolate leaf's stalk, then the blade above it
  \edef\flo@t{\flo@get{attachment}}\def\flo@tmp{petiolate}%
  \ifx\flo@t\flo@tmp\flo@range\flo@lpf{0.1}{0.2}\else\def\flo@lpf{0}\fi
  \ifdim\flo@lpf pt>0pt
    \flo@vtone{flo@c}{0.16}\def\flo@twa{0.024}\def\flo@twb{0.014}%
    \flo@calc\flo@lpe{\flo@lpf+0.01}\flo@calc\flo@ta{\flo@lpf/3}\flo@calc\flo@tb{2*\flo@lpf/3}%
    \flo@vfill{flo@c}{1}{0}{\flo@vtaper{0}{0}{0}\flo@ta{0}\flo@tb{0}\flo@lpe}%
  \fi
  \begin{pgfscope}%
    \ifdim\flo@lpf pt>0pt
      \pgftransformshift{\flo@P0\flo@lpf}\flo@calc\flo@t{1-\flo@lpf}\pgftransformscale{\flo@t}%
      \flo@calc\flo@vl@u{\flo@vl@u*\flo@t}%
    \fi
    \flo@sblade
  \end{pgfscope}%
  \end{pgfscope}}
\def\flo@sblade{%
  \ifx\flo@vl@bend\pgfutil@empty\flo@sym\flo@lbend{0.25}\else\edef\flo@lbend{\flo@vl@bend}\fi
  \edef\flo@llobes{\flo@vl@lobes}\edef\flo@ldepth{\flo@vl@depth}%
  \ifx\flo@vl@tone\pgfutil@empty\flo@range\flo@lt{0.26}{0.38}\else\edef\flo@lt{\flo@vl@tone}\fi
  \ifdim\flo@vl@u pt>0.6pt \def\flo@fine{1}\def\flo@bn{36}\else\def\flo@fine{0}\def\flo@bn{24}\fi
  % a leaflet's level of detail (\flo@lleaflet): under 1.4 cm a coarser edge, no mottle or
  % side veins, under 4 mm a flat shape
  \def\flo@lod{2}\ifnum\flo@lleaflet=1 \ifdim\flo@vl@u pt<1.4pt \def\flo@lod{1}\def\flo@fine{0}\def\flo@bn{16}%
    \ifdim\flo@vl@u pt<0.4pt \def\flo@lod{0}\def\flo@bn{12}\fi\fi\fi
  \ifdim\flo@ldepth pt>0pt \flo@calc\flo@bodyw{1-0.75*\flo@ldepth}\def\flo@lent{0}\else\def\flo@bodyw{1}\def\flo@lent{1}\fi
  % a curled tip (\flo@hookset), on an unlobed leaf drawn in full 8 mm long or more,
  % hairless unless it is broad (a narrow hairy one curled reads as a caterpillar), up to
  % one in two as the species' leaves curl
  \def\flo@hk{0}\def\flo@hok{1}\ifnum\flo@get{hairy}=1 \ifdim\flo@lW pt<0.15pt \def\flo@hok{0}\fi\fi
  \ifnum\flo@lod=2 \ifnum\flo@lent=1 \ifnum\flo@hok=1 \ifdim\flo@vl@u pt>0.8pt
    \flo@calc\flo@t{min(0.55,max(0,\flo@get{curl}+0.25))}\flo@chance\flo@t
    \ifflo@yes\flo@hookset\fi
  \fi\fi\fi\fi
  % the body along its margin's samples (\flo@smargin)
  \flo@smargin
  \flo@loop{sbs}\flo@kb{1}{\flo@mn}{%
    \edef\flo@v{\csname flo@sv\the\flo@kb\endcsname}\flo@lspine\flo@v\flo@put{\the\flo@kb}{\flo@sx}{\flo@sy}}%
  \flo@normals{\flo@mn}%
  \flo@loop{sbo}\flo@kb{1}{\flo@mn}{%
    \edef\flo@q{\the\flo@kb}\edef\flo@v{\csname flo@sv\flo@q\endcsname}\edef\flo@sdd{\csname flo@sd\flo@q\endcsname}%
    \flo@shw\flo@v\flo@calc\flo@cut{\flo@ldep*min(1,\flo@h/(0.45*\flo@lW))*(1-\flo@sdd)}%
    % a curled tip narrows as it turns edge-on, the more the species' leaves twist
    \def\flo@hwf{1}\ifnum\flo@hk=1 \ifdim\flo@v pt>\flo@hv pt
      \flo@calc\flo@hwt{min(1,(\flo@v-\flo@hv)/\flo@hl)}%
      \flo@calc\flo@hwf{1-(0.25+0.008*\flo@get{twist})*min(1,\flo@hth/150)*\flo@hwt*\flo@hwt*(3-2*\flo@hwt)}\fi\fi
    \flo@calc\flo@e{max(0,\flo@h*\flo@bodyw-\flo@cut*\csname flo@sjl\flo@q\endcsname)*\flo@hwf}%
    \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@e}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@e-\flo@dy}%
    \ifdim\flo@lobl pt>0pt \flo@calc\flo@vo{max(0,(\flo@v-\flo@lobl)/(1-\flo@lobl))}\flo@shw\flo@vo\fi
    \flo@calc\flo@e{max(0,\flo@h*\flo@bodyw-\flo@cut*\csname flo@sjr\flo@q\endcsname)*\flo@hwf}%
    \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@e}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@e-\flo@dy}%
    \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
    \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
  % the tip: notched (emarginate) or a short point (mucronate)
  \edef\flo@q{\flo@mn}%
  \ifnum\flo@ltip<0 \flo@calc\flo@t{\csname flo@RY\flo@q\endcsname-0.25*\flo@lW}\expandafter\let\csname flo@RY\flo@q\endcsname\flo@t\fi
  \ifnum\flo@ltip>0 \flo@calc\flo@t{\csname flo@RY\flo@q\endcsname+0.04}\expandafter\let\csname flo@RY\flo@q\endcsname\flo@t\fi
  \edef\flo@mnm{\the\numexpr\flo@mn-1\relax}\flo@bladeassemble\flo@mnm
  \flo@smoothprepT{\the\numexpr2*\flo@mn-2\relax}{\flo@ltk}\flo@keep{ls1}%
  % a hairy leaf's fringe: short hairs straight out from every other point of its edge
  \ifnum\flo@get{hairy}=1 \ifnum\flo@fine=1
    \edef\flo@hn{\the\numexpr2*\flo@mn-2\relax}\flo@normals\flo@hn
    \flo@vtone{flo@c}{0.1}%
    \flo@vstroke{flo@c}{0.15}{0.55}{0}{%
      \flo@loop{hair}\flo@kb{1}{\flo@hn}{\ifodd\flo@kb
        \flo@range\flo@hl{0.008}{0.02}%
        \flo@calc\flo@xl{\flo@x{\the\flo@kb}+\csname flo@NX\the\flo@kb\endcsname*\flo@hl}%
        \flo@calc\flo@yl{\flo@y{\the\flo@kb}+\csname flo@NY\the\flo@kb\endcsname*\flo@hl}%
        \pgfpathmoveto{\flo@P{\flo@x{\the\flo@kb}}{\flo@y{\the\flo@kb}}}\pgfpathlineto{\flo@P\flo@xl\flo@yl}\fi}}%
  \fi\fi
  \def\flo@nshapes{1}\def\flo@nveins{0}%
  % the lobes, grown out of the body along the spine, turned 38..58 degrees outward; a
  % palmately lobed leaf's (a maple's) fan out from its base instead, wider, each shorter
  % and further round than the last
  \ifdim\flo@ldepth pt>0pt
    \def\flo@tmp{palmatelobed}\ifx\flo@lmn\flo@tmp
      \def\flo@lpal{1}\def\flo@lwf{1.3}\pgfmathtruncatemacro\flo@lnl{max(1,floor(\flo@llobes/2))}%
    \else\def\flo@lpal{0}\def\flo@lwf{1}\edef\flo@lnl{\flo@llobes}\fi
    \flo@loop{slside}\flo@kc{0}{1}{%
      \ifnum\flo@kc=0 \def\flo@side{-1}\else\def\flo@side{1}\fi
      \flo@loop{slobe}\flo@ka{1}{\flo@lnl}{%
        \ifnum\flo@lpal=1
          \flo@calc\flo@lv{0.04+0.025*\the\flo@ka}%
          \flo@lspine\flo@lv\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan\flo@lv
          \flo@range\flo@t{0.9}{1.1}\flo@calc\flo@lL{0.8*(1-0.3*(\the\flo@ka-1)/\flo@lnl)*\flo@t}%
          \flo@range\flo@lang{30}{40}\flo@calc\flo@lang{\flo@lang+45*(\the\flo@ka-1)/max(1,\flo@lnl-1)}%
        \else
          \flo@calc\flo@lv{0.1+0.72*(\the\flo@ka-(\flo@side>0 ? 0.25 : 0.75))/\flo@llobes}%
          \flo@lspine\flo@lv\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan\flo@lv
          \flo@calc\flo@t{min(0.95,\flo@lv+0.08)}\flo@slenv\flo@t\flo@range\flo@t{0.95}{1.15}\flo@calc\flo@reach{\flo@env*\flo@t}%
          \flo@range\flo@lang{38}{58}%
        \fi
        \flo@calc\flo@c{cos(\flo@lang)}\flo@calc\flo@sn{sin(\flo@lang)*\flo@side}%
        \flo@calc\flo@ldx{\flo@tx*\flo@c-\flo@ty*\flo@sn}\flo@calc\flo@ldy{\flo@tx*\flo@sn+\flo@ty*\flo@c}%
        \ifnum\flo@lpal=0 \flo@calc\flo@lL{\flo@reach/sin(\flo@lang)*0.95}\fi
        \flo@sym\flo@t{0.25}\flo@calc\flo@lb{\flo@t-\flo@side*0.15}%
        \flo@loop{slbp}\flo@kb{0}{11}{%
          \flo@calc\flo@v{\the\flo@kb/11}%
          \flo@calc\flo@sx{\flo@lx+\flo@ldx*\flo@lL*\flo@v-\flo@ldy*\flo@lb*\flo@lL*\flo@v*\flo@v}%
          \flo@calc\flo@sy{\flo@ly+\flo@ldy*\flo@lL*\flo@v+\flo@ldx*\flo@lb*\flo@lL*\flo@v*\flo@v}%
          \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
        \flo@normals{12}%
        \flo@loop{slbw}\flo@kb{0}{11}{%
          \flo@calc\flo@v{\the\flo@kb/11}\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
          \ifdim\flo@v pt>0.2pt \flo@calc\flo@t{\flo@v*1.4+\the\flo@ka}\flo@lteeth\flo@t\flo@calc\flo@e{\flo@th*\flo@lL*4}\else\def\flo@e{0}\fi
          \ifdim\flo@v pt>0pt \flo@calc\flo@g{pow(max(0,sin(180*pow(\flo@v,0.62))),0.75)}\else\def\flo@g{0}\fi
          \flo@range\flo@t{0.26}{0.3}\flo@calc\flo@wa{max(0,\flo@lL*\flo@t*\flo@lwf*\flo@g+\flo@e)}%
          \flo@range\flo@t{0.26}{0.3}\flo@calc\flo@wb{max(0,\flo@lL*\flo@t*\flo@lwf*\flo@g+\flo@e)}%
          \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@wa}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@wa}%
          \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@wb}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@wb}%
          \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
          \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
        \edef\flo@nveins{\the\numexpr\flo@nveins+1\relax}%
        \flo@calc\flo@t{0.45}\flo@calc\flo@mx{\flo@lx+\flo@ldx*\flo@lL*\flo@t-\flo@ldy*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@my{\flo@ly+\flo@ldy*\flo@lL*\flo@t+\flo@ldx*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@t{0.92}\flo@calc\flo@ex{\flo@lx+\flo@ldx*\flo@lL*\flo@t-\flo@ldy*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \flo@calc\flo@ey{\flo@ly+\flo@ldy*\flo@lL*\flo@t+\flo@ldx*\flo@lb*\flo@lL*\flo@t*\flo@t}%
        \expandafter\edef\csname flo@V\flo@nveins\endcsname{{\flo@lx}{\flo@ly}{\flo@mx}{\flo@my}{\flo@ex}{\flo@ey}}%
        \flo@bladeassemble{11}\flo@smoothprepT{22}{0.8}%
        \edef\flo@nshapes{\the\numexpr\flo@nshapes+1\relax}\flo@keep{ls\flo@nshapes}}}%
  \fi
  \flo@vtone{flo@c}{\flo@lt}\flo@vfill{flo@c}{1}{0}{\flo@leaftrace}%
  \ifnum\flo@lod>0
  \begin{pgfscope}%
    \flo@leaftrace\pgfusepath{clip}%
    % the darker half
    \flo@chance{0.5}\ifflo@yes\def\flo@sd{1}\else\def\flo@sd{-1}\fi
    \flo@loop{slhalf}\flo@kb{0}{30}{%
      \flo@calc\flo@v{\the\flo@kb/30}\flo@lspine\flo@v
      \ifnum\flo@kb=0 \pgfpathmoveto{\flo@P\flo@sx\flo@sy}\else\pgfpathlineto{\flo@P\flo@sx\flo@sy}\fi}%
    \flo@calc\flo@t{\flo@sd*2}\pgfpathlineto{\flo@P\flo@t{1}}\pgfpathlineto{\flo@P\flo@t{-0.3}}%
    \pgfpathlineto{\flo@P0{-0.3}}\pgfpathclose
    \flo@scopefill{\flo@vtone{flo@c}{0.12}\pgfsetfillcolor{flo@c}\pgfsetfillopacity{0.28}\pgfsetblendmode{multiply}}%
    \flo@calc\flo@xa{-\flo@lW*2.5}\flo@calc\flo@xb{\flo@lW*2.5}\flo@calc\flo@ta{\flo@lt-0.2}\flo@calc\flo@tb{\flo@lt+0.22}%
    \ifnum\flo@lod=2
      \ifnum\flo@fine=1 \flo@vmottle\flo@xa{-0.2}\flo@xb{1}{13}{0.11}\flo@ta\flo@tb{12}%
      \else\flo@vmottle\flo@xa{-0.2}\flo@xb{1}{6}{0.11}\flo@ta\flo@tb{0}\fi\fi
    \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.22}{1}{\flo@leaftrace}%
    % midrib and veins in white
    \flo@loop{slmid}\flo@kb{0}{10}{\flo@calc\flo@v{\the\flo@kb/10}\flo@lspine\flo@v\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@sy}}%
    \flo@vstreak{11}{0.03}{0.003}{white}{0.78}%
    \flo@loop{slvein}\flo@ka{1}{\flo@nveins}{%
      \expandafter\expandafter\expandafter\flo@lveinat\csname flo@V\the\flo@ka\endcsname
      \def\flo@twa{0.017}\def\flo@twb{0.002}\flo@range\flo@op{0.5}{0.75}%
      \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@va\flo@vb\flo@mx\flo@my\flo@c\flo@d\flo@ex\flo@ey}}%
    % veins: side veins from the midrib (pinnate), curving up along the edge toward the tip
    % (arcuate), or two each side fanning from the base below a few side veins (palmate)
    \ifnum\flo@nveins=0 \ifnum\flo@lod=2
      \edef\flo@vn{\flo@get{venation}}\def\flo@vka{1}\def\flo@varc{0}%
      \def\flo@tmp{arcuate}\ifx\flo@vn\flo@tmp\def\flo@varc{1}\fi
      \def\flo@tmp{palmate}\ifx\flo@vn\flo@tmp
        \def\flo@vka{5}%
        \flo@lspine{0.03}\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan{0.03}%
        \flo@loop{slpv}\flo@kc{0}{3}{%
          \ifnum\flo@kc<2 \def\flo@side{-1}\else\def\flo@side{1}\fi
          \ifodd\flo@kc\def\flo@t{64}\def\flo@vbl{1.1}\else\def\flo@t{32}\def\flo@vbl{1.5}\fi
          \flo@range\flo@lang{\flo@t-5}{\flo@t+5}%
          \flo@calc\flo@c{cos(\flo@lang)}\flo@calc\flo@sn{sin(\flo@lang)*\flo@side}%
          \flo@calc\flo@ldx{\flo@tx*\flo@c-\flo@ty*\flo@sn}\flo@calc\flo@ldy{\flo@tx*\flo@sn+\flo@ty*\flo@c}%
          \flo@range\flo@t{0.85}{1}\flo@calc\flo@lL{\flo@lW*\flo@vbl*\flo@t}%
          \flo@calc\flo@pa{\flo@lx+\flo@ldx*\flo@lL*0.4}\flo@calc\flo@pb{\flo@ly+\flo@ldy*\flo@lL*0.4}%
          \flo@calc\flo@pc{\flo@lx+\flo@ldx*\flo@lL*0.75+\flo@tx*\flo@lL*0.25}\flo@calc\flo@pd{\flo@ly+\flo@ldy*\flo@lL*0.75+\flo@ty*\flo@lL*0.25}%
          \flo@calc\flo@pe{\flo@lx+\flo@ldx*\flo@lL*0.9+\flo@tx*\flo@lL*0.6}\flo@calc\flo@pf{\flo@ly+\flo@ldy*\flo@lL*0.9+\flo@ty*\flo@lL*0.6}%
          \let\flo@qa\flo@pa\let\flo@qb\flo@pb\let\flo@qc\flo@pc\let\flo@qd\flo@pd\let\flo@qe\flo@pe\let\flo@qf\flo@pf
          \def\flo@twa{0.016}\def\flo@twb{0.002}\flo@range\flo@op{0.45}{0.7}%
          \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@lx\flo@ly\flo@qa\flo@qb\flo@qc\flo@qd\flo@qe\flo@qf}}%
      \fi
      \flo@loop{slsveins}\flo@ka{\flo@vka}{9}{%
        \flo@calc\flo@v{(\the\flo@ka-0.3)/10*0.9}\ifodd\flo@ka\def\flo@sg{-1}\else\def\flo@sg{1}\fi
        \flo@lspine\flo@v\let\flo@lx\flo@sx\let\flo@ly\flo@sy\flo@ltan\flo@v
        \flo@calc\flo@nx{-\flo@ty*\flo@sg}\flo@calc\flo@ny{\flo@tx*\flo@sg}%
        \flo@slenv\flo@v\flo@range\flo@t{0.75}{0.95}\flo@calc\flo@lL{\flo@env*\flo@bodyw*\flo@t}%
        \ifnum\flo@varc=1
          \flo@calc\flo@pa{\flo@lx+\flo@nx*\flo@lL*0.3+\flo@tx*\flo@lL*0.12}\flo@calc\flo@pb{\flo@ly+\flo@ny*\flo@lL*0.3+\flo@ty*\flo@lL*0.12}%
          \flo@calc\flo@pc{\flo@lx+\flo@nx*\flo@lL*0.62+\flo@tx*\flo@lL*0.55}\flo@calc\flo@pd{\flo@ly+\flo@ny*\flo@lL*0.62+\flo@ty*\flo@lL*0.55}%
          \flo@calc\flo@pe{\flo@lx+\flo@nx*\flo@lL*0.72+\flo@tx*\flo@lL*1.15}\flo@calc\flo@pf{\flo@ly+\flo@ny*\flo@lL*0.72+\flo@ty*\flo@lL*1.15}%
        \else
          \flo@calc\flo@pa{\flo@lx+\flo@nx*\flo@lL*0.4}\flo@calc\flo@pb{\flo@ly+\flo@ny*\flo@lL*0.4}%
          \flo@calc\flo@pc{\flo@lx+\flo@nx*\flo@lL*0.75+\flo@tx*\flo@lL*0.3}\flo@calc\flo@pd{\flo@ly+\flo@ny*\flo@lL*0.75+\flo@ty*\flo@lL*0.3}%
          \flo@calc\flo@pe{\flo@lx+\flo@nx*\flo@lL*0.95+\flo@tx*\flo@lL*0.6}\flo@calc\flo@pf{\flo@ly+\flo@ny*\flo@lL*0.95+\flo@ty*\flo@lL*0.6}%
        \fi
        \let\flo@qa\flo@pa\let\flo@qb\flo@pb\let\flo@qc\flo@pc\let\flo@qd\flo@pd\let\flo@qe\flo@pe\let\flo@qf\flo@pf
        \def\flo@twa{0.014}\def\flo@twb{0.002}\flo@range\flo@op{0.45}{0.7}%
        \flo@vfill{white}{\flo@op}{0}{\flo@vtaper\flo@lx\flo@ly\flo@qa\flo@qb\flo@qc\flo@qd\flo@qe\flo@qf}}%
    \fi\fi
  \end{pgfscope}%
  \ifnum\flo@lent=1 \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{0.18}{0.4}{0}{\flo@kept{ls1}}\fi
  \fi
  \ifnum\flo@hk=1 \ifdim\flo@hth pt>95pt \flo@hookunder\fi\fi}
\def\flo@lleaflet{0}\def\flo@lmover{}

% \pic {florilegium v13 leaf={seed=7, size=4cm}}: flora's leaf in pure TikZ, size its length
\tikzset{pics/florilegium v13 leaf/.style={code={\flo@engine{#1}{v13 leaf}{%
  \flo@picsetup{#1}%
  \pgftransformscale{\flo@sizept}%
  \def\flo@vl@W{}\def\flo@vl@bend{}\def\flo@vl@lobes{}\def\flo@vl@depth{}\def\flo@vl@tone{}%
  \flo@calc\flo@vl@u{\flo@sizept/28.45276}\flo@vleaf}}}}

% ---------------------------------------------------------------- leaflet, lily, floret, bud
% flora.leaflet: a small entire leaf, +y, length 1; \flo@vl@u as for the leaf, tone
% \flo@vl@tone (empty: drawn), half-width factor \flo@vl@W (empty: drawn)
\def\flo@vleaflet{%
  \ifx\flo@vl@W\pgfutil@empty\flo@range\flo@lW{0.16}{0.24}\else\edef\flo@lW{\flo@vl@W}\fi
  \flo@sym\flo@lbend{0.2}%
  \ifx\flo@vl@tone\pgfutil@empty\flo@range\flo@lt{0.2}{0.34}\else\edef\flo@lt{\flo@vl@tone}\fi
  \flo@loop{lfs}\flo@kb{0}{18}{%
    \flo@calc\flo@v{\the\flo@kb/18}\flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v}%
    \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
  \flo@normals{19}%
  \flo@loop{lfw}\flo@kb{0}{18}{%
    \flo@calc\flo@v{\the\flo@kb/18}\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
    \ifdim\flo@v pt>0pt \ifdim\flo@v pt<1pt \flo@calc\flo@w{\flo@lW*2.2*pow(\flo@v,0.5)*pow(1-\flo@v,0.9)}\else\def\flo@w{0}\fi\else\def\flo@w{0}\fi
    \expandafter\let\csname flo@CX\flo@q\endcsname\flo@sx
    \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@w}%
    \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@w}%
    \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
    \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
  % keep the spine and normals for the darker half
  \flo@loop{lfk}\flo@kb{1}{19}{%
    \expandafter\edef\csname flo@MX\the\flo@kb\endcsname{\flo@x{\the\flo@kb}}\expandafter\edef\csname flo@MY\the\flo@kb\endcsname{\flo@y{\the\flo@kb}}%
    \expandafter\edef\csname flo@MU\the\flo@kb\endcsname{\csname flo@NX\the\flo@kb\endcsname}%
    \expandafter\edef\csname flo@MV\the\flo@kb\endcsname{\csname flo@NY\the\flo@kb\endcsname}}%
  \flo@bladeassemble{18}\flo@smoothprep{36}\flo@keep{lf}%
  \flo@vtone{flo@c}{\flo@lt}\flo@vfill{flo@c}{1}{0}{\flo@kept{lf}}%
  \ifdim\flo@vl@u pt>0.25pt
    \begin{pgfscope}\flo@kept{lf}\pgfusepath{clip}%
      \flo@chance{0.5}\ifflo@yes\def\flo@sd{1}\else\def\flo@sd{-1}\fi
      \pgfpathmoveto{\flo@P{\csname flo@MX1\endcsname}{\csname flo@MY1\endcsname}}%
      \flo@loop{lfh}\flo@kb{2}{19}{\pgfpathlineto{\flo@P{\csname flo@MX\the\flo@kb\endcsname}{\csname flo@MY\the\flo@kb\endcsname}}}%
      \flo@loop{lfh2}\flo@kb{1}{19}{\edef\flo@q{\the\numexpr20-\flo@kb\relax}%
        \flo@calc\flo@xl{\csname flo@MX\flo@q\endcsname+\flo@sd*\csname flo@MU\flo@q\endcsname}%
        \flo@calc\flo@yl{\csname flo@MY\flo@q\endcsname+\flo@sd*\csname flo@MV\flo@q\endcsname}%
        \pgfpathlineto{\flo@P\flo@xl\flo@yl}}\pgfpathclose
      \flo@scopefill{\flo@vtone{flo@c}{0.08}\pgfsetfillcolor{flo@c}\pgfsetfillopacity{0.3}\pgfsetblendmode{multiply}}%
      \flo@loop{lfm}\flo@kb{0}{10}{\flo@calc\flo@v{\the\flo@kb/10}\flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
      \flo@vstreak{11}{0.03}{0.003}{white}{0.65}%
      \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{lf}}%
    \end{pgfscope}%
  \fi}
% a monocot's strap leaf in flora's manner: the leaflet's blade, narrow, with parallel
% white veins instead of a midrib; +y, length 1. A leaf a centimeter long or more may arch
% over, its spine turning by \flo@zsT degrees toward its bend, more toward the tip (the
% species' curl makes it likelier); some of those twist past spine point \flo@zska, turning
% edge on, and show their paler underside beyond it (its twist makes it likelier)
\def\flo@vstrap{%
  \flo@sym\flo@lbend{0.25}\ifdefined\flo@sbend\let\flo@lbend\flo@sbend\fi\flo@range\flo@lt{0.24}{0.34}%
  \def\flo@zsT{0}\def\flo@zska{25}%
  \ifdim\flo@vl@u pt>1pt
    \flo@calc\flo@t{max(0.1,min(0.65,0.3+\flo@get{curl}))}\flo@chance\flo@t
    \ifflo@yes
      \flo@range\flo@zsT{30}{85}\flo@calc\flo@zsT{\flo@zsT*min(1,0.07/\flo@lW)}%
      \ifdim\flo@lbend pt<0pt \flo@calc\flo@zsT{-\flo@zsT}\fi
      \flo@calc\flo@t{(0.3+0.01*\flo@get{twist})*max(0,min(1,(0.1-\flo@lW)/0.05))}\flo@chance\flo@t
      \ifflo@yes\flo@int\flo@zska{13}{17}\fi
    \fi
  \fi
  \ifnum\flo@zska<25 \flo@calc\flo@zsvt{(\flo@zska-1.5)/24}\else\def\flo@zsvt{2}\fi
  \ifdim\flo@zsT pt=0pt
    \flo@loop{sts}\flo@kb{0}{24}{%
      \flo@calc\flo@v{\the\flo@kb/24}\flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
  \else
    \def\flo@xx{0}\def\flo@yy{0}\flo@put1{0}{0}%
    \flo@loop{sta}\flo@kb{1}{24}{%
      \flo@calc\flo@a{\flo@zsT*pow((\the\flo@kb-0.5)/24,2)}%
      \flo@calc\flo@xx{\flo@xx+sin(\flo@a)}\flo@calc\flo@yy{\flo@yy+cos(\flo@a)}%
      \flo@calc\flo@sx{\flo@xx/24}\flo@calc\flo@sy{\flo@yy/24}\flo@put{\the\numexpr\flo@kb+1\relax}\flo@sx\flo@sy}%
  \fi
  \flo@normals{25}%
  \flo@loop{stc}\flo@kb{1}{25}{%
    \edef\flo@q{\the\flo@kb}%
    \expandafter\edef\csname flo@zsX\flo@q\endcsname{\flo@x\flo@q}\expandafter\edef\csname flo@zsY\flo@q\endcsname{\flo@y\flo@q}%
    \expandafter\edef\csname flo@zsN\flo@q\endcsname{\csname flo@NX\flo@q\endcsname}%
    \expandafter\edef\csname flo@zsM\flo@q\endcsname{\csname flo@NY\flo@q\endcsname}%
    \flo@calc\flo@v{(\the\flo@kb-1)/24}\flo@zshw\flo@v\expandafter\let\csname flo@zsW\flo@q\endcsname\flo@w}%
  \flo@zspiece1\flo@zska\flo@smoothprep\flo@zsn\flo@keep{st}%
  \flo@vtone{flo@c}{\flo@lt}\flo@vfill{flo@c}{1}{0}{\flo@kept{st}}%
  \begin{pgfscope}\flo@kept{st}\pgfusepath{clip}%
    % the darker half, as the leaf folds along its rib (flora.leaf), following the spine's turn
    \flo@chance{0.5}\ifflo@yes\def\flo@sd{1}\else\def\flo@sd{-1}\fi
    \ifdim\flo@zsT pt=0pt
      \flo@loop{sth}\flo@kb{0}{12}{%
        \flo@calc\flo@v{\the\flo@kb/12}\flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v}%
        \ifnum\flo@kb=0 \pgfpathmoveto{\flo@P\flo@sx\flo@v}\else\pgfpathlineto{\flo@P\flo@sx\flo@v}\fi}%
      \flo@calc\flo@t{\flo@sd*2}\pgfpathlineto{\flo@P\flo@t{1}}\pgfpathlineto{\flo@P\flo@t{0}}\pgfpathclose
      \flo@calc\flo@xa{-\flo@lW*2.5}\flo@calc\flo@xb{\flo@lW*2.5}\def\flo@yb{1}%
    \else
      \pgfpathmoveto{\flo@P00}%
      \flo@loop{sth}\flo@kb{2}{\flo@zska}{\pgfpathlineto{\flo@P{\csname flo@zsX\the\flo@kb\endcsname}{\csname flo@zsY\the\flo@kb\endcsname}}}%
      \flo@loop{sti}\flo@kb{1}{\flo@zska}{\edef\flo@q{\the\numexpr\flo@zska+1-\flo@kb\relax}%
        \flo@calc\flo@w{\flo@sd*(1.3*\csname flo@zsW\flo@q\endcsname+0.01)}%
        \flo@calc\flo@xl{\csname flo@zsX\flo@q\endcsname+\csname flo@zsN\flo@q\endcsname*\flo@w}%
        \flo@calc\flo@yl{\csname flo@zsY\flo@q\endcsname+\csname flo@zsM\flo@q\endcsname*\flo@w}%
        \pgfpathlineto{\flo@P\flo@xl\flo@yl}}%
      \pgfpathclose
      \def\flo@xa{0}\def\flo@xb{0}\def\flo@yb{0}%
      \flo@loop{stb}\flo@kb{1}{25}{%
        \flo@calc\flo@xa{min(\flo@xa,\csname flo@zsX\the\flo@kb\endcsname)}\flo@calc\flo@xb{max(\flo@xb,\csname flo@zsX\the\flo@kb\endcsname)}%
        \flo@calc\flo@yb{max(\flo@yb,\csname flo@zsY\the\flo@kb\endcsname)}}%
      \flo@calc\flo@xa{\flo@xa-\flo@lW*2.5}\flo@calc\flo@xb{\flo@xb+\flo@lW*2.5}\flo@calc\flo@yb{\flo@yb+\flo@lW}%
    \fi
    \flo@scopefill{\flo@vtone{flo@c}{0.12}\pgfsetfillcolor{flo@c}\pgfsetfillopacity{0.28}\pgfsetblendmode{multiply}}%
    \flo@calc\flo@ta{\flo@lt-0.2}\flo@calc\flo@tb{\flo@lt+0.22}%
    \flo@vmottle\flo@xa{0}\flo@xb\flo@yb{10}{0.07}\flo@ta\flo@tb{8}%
    \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.22}{1}{\flo@kept{st}}%
    % the midrib in white, and faint parallel veins either side
    \ifdim\flo@zsT pt=0pt
      \flo@loop{stm}\flo@kb{0}{10}{\flo@calc\flo@v{0.02+0.93*\the\flo@kb/10}%
        \flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
      \def\flo@zsm{11}%
    \else
      \flo@loop{stm}\flo@kb{1}{24}{\flo@put{\the\flo@kb}{\csname flo@zsX\the\flo@kb\endcsname}{\csname flo@zsY\the\flo@kb\endcsname}}%
      \def\flo@zsm{24}%
    \fi
    \flo@vstreak\flo@zsm{0.016}{0.002}{white}{0.7}%
    \flo@loop{stv}\flo@ka{1}{4}{%
      \flo@calc\flo@f{(\the\flo@ka<3 ? \the\flo@ka-3 : \the\flo@ka-2)*0.38}%
      \ifdim\flo@zsT pt=0pt
        \flo@loop{stvp}\flo@kb{0}{10}{\flo@calc\flo@v{0.05+0.85*\the\flo@kb/10}%
          \flo@calc\flo@w{\flo@f*\flo@lW*2.2*pow(\flo@v,0.25)*pow(1-\flo@v,0.6)}%
          \flo@calc\flo@sx{\flo@lbend*\flo@v*\flo@v+\flo@w}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
      \else
        \flo@loop{stvq}\flo@kb{1}{11}{\edef\flo@q{\the\numexpr2*\flo@kb\relax}%
          \flo@calc\flo@w{\flo@f*\csname flo@zsW\flo@q\endcsname}%
          \flo@calc\flo@xl{\csname flo@zsX\flo@q\endcsname+\csname flo@zsN\flo@q\endcsname*\flo@w}%
          \flo@calc\flo@yl{\csname flo@zsY\flo@q\endcsname+\csname flo@zsM\flo@q\endcsname*\flo@w}%
          \flo@put{\the\flo@kb}\flo@xl\flo@yl}%
      \fi
      \flo@range\flo@op{0.18}{0.32}\flo@vstreak{11}{0.007}{0.001}{white}{\flo@op}}%
  \end{pgfscope}%
  % past the twist, the underside
  \ifnum\flo@zska<25
    \flo@zspiece\flo@zska{25}\flo@smoothprep\flo@zsn\flo@keep{su}%
    \flo@calc\flo@t{min(0.64,\flo@lt+0.26)}\flo@vtone{flo@c}\flo@t\flo@vfill{flo@c}{1}{0}{\flo@kept{su}}%
    \begin{pgfscope}\flo@kept{su}\pgfusepath{clip}%
      \flo@loop{stu}\flo@kb{\flo@zska}{24}{%
        \flo@put{\the\numexpr\flo@kb+1-\flo@zska\relax}{\csname flo@zsX\the\flo@kb\endcsname}{\csname flo@zsY\the\flo@kb\endcsname}}%
      \edef\flo@zsm{\the\numexpr25-\flo@zska\relax}\flo@vstreak\flo@zsm{0.014}{0.002}{white}{0.6}%
      \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vl@u}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{su}}%
    \end{pgfscope}%
  \fi}
% the strap's half-width at #1 (0..1), narrowing as it turns edge on at the twist and
% narrower past it: \flo@w
\def\flo@zshw#1{%
  \def\flo@w{0}%
  \ifdim#1pt>0pt \ifdim#1pt<1pt
    \flo@calc\flo@w{\flo@lW*2.2*pow(#1,0.25)*pow(1-(#1),0.6)}%
    \flo@calc\flo@zst{((#1)-\flo@zsvt+0.15)/0.3}%
    \ifdim\flo@zst pt<1pt
      \ifdim\flo@zst pt>0pt
        \flo@calc\flo@w{\flo@w*max(0.12,(\flo@zst>0.5 ? 0.8 : 1)*abs(cos(180*\flo@zst*\flo@zst*(3-2*\flo@zst))))}%
      \fi
    \else\flo@calc\flo@w{0.8*\flo@w}\fi
  \fi\fi}
% the strap's outline over spine points #1..#2 into flo@X/Y, \flo@zsn points: up the left
% side, down the right, an end once where it is a point
\def\flo@zspiece#1#2{%
  \def\flo@zsn{0}%
  \flo@loop{stp}\flo@kb{#1}{#2}{\flo@zsside{\the\flo@kb}{}}%
  \ifdim\csname flo@zsW#2\endcsname pt>0pt \flo@zsside{#2}{-}\fi
  \flo@loop{stq}\flo@kb{#1+1}{#2-1}{\flo@zsside{\the\numexpr#2+#1-\flo@kb\relax}{-}}%
  \ifdim\csname flo@zsW#1\endcsname pt>0pt \flo@zsside{#1}{-}\fi}
% spine point #1 moved out by its half-width along its normal (#2 empty) or against it (-)
\def\flo@zsside#1#2{%
  \edef\flo@q{#1}\edef\flo@w{#2\csname flo@zsW\flo@q\endcsname}%
  \flo@calc\flo@xl{\csname flo@zsX\flo@q\endcsname+\csname flo@zsN\flo@q\endcsname*(\flo@w)}%
  \flo@calc\flo@yl{\csname flo@zsY\flo@q\endcsname+\csname flo@zsM\flo@q\endcsname*(\flo@w)}%
  \edef\flo@zsn{\the\numexpr\flo@zsn+1\relax}\flo@put\flo@zsn\flo@xl\flo@yl}

% flora.lily: a star lily at a tilt, six pointed petals, back ones first, a pale throat,
% stamens; center at the origin, facing +y, petal length 1. #1 cm per unit (no random
% part); tone \flo@vf@tone (empty: drawn)
\def\flo@vlily#1{%
  \edef\flo@vu{#1}%
  \flo@range\flo@tilt{0.45}{0.62}\flo@range\flo@spin{0}{60}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.30}{0.38}\else\edef\flo@tq{\flo@vf@tone}\fi
  \flo@loop{lio}\flo@ka{1}{6}{\flo@sym\flo@t{8}\flo@calc\flo@a{\flo@spin+(\the\flo@ka-1)*60+\flo@t}%
    \expandafter\let\csname flo@O\the\flo@ka\endcsname\flo@a}%
  % back petals first: sort by sin(a), largest first (a small bubble sort)
  \flo@loop{liso}\flo@ka{1}{5}{\flo@loop{liso2}\flo@kb{1}{6-\flo@ka}{%
    \edef\flo@ia{\csname flo@O\the\flo@kb\endcsname}\edef\flo@ib{\csname flo@O\the\numexpr\flo@kb+1\relax\endcsname}%
    \flo@calc\flo@t{sin(\flo@ib)>sin(\flo@ia) ? 1 : 0}%
    \ifnum\flo@t=1 \expandafter\let\csname flo@O\the\flo@kb\endcsname\flo@ib
      \expandafter\let\csname flo@O\the\numexpr\flo@kb+1\relax\endcsname\flo@ia\fi}}%
  \flo@loop{lip}\flo@kc{1}{6}{%
    \edef\flo@a{\csname flo@O\the\flo@kc\endcsname}\flo@calc\flo@back{sin(\flo@a)}%
    \flo@range\flo@js{0.88}{1.05}%
    \flo@range\flo@lw{0.11}{0.14}\flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@tq+0.1*\flo@back*-0.8+\flo@t}%
    \flo@chance{0.5}\ifflo@yes\def\flo@sg{1}\else\def\flo@sg{-1}\fi\flo@range\flo@t{0.04}{0.14}\flo@calc\flo@pbend{\flo@sg*\flo@t}%
    \flo@int\flo@pns{3}{4}%
    \begin{pgfscope}%
      \pgftransformyscale{\flo@tilt}\flo@calc\flo@t{\flo@a-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@js}%
      \def\flo@vp@pointed{1}\edef\flo@vp@W{\flo@lw}\edef\flo@vp@bend{\flo@pbend}\edef\flo@vp@ns{\flo@pns}%
      \def\flo@vp@heart{0}\edef\flo@vp@tone{\flo@tp}\edef\flo@vp@u{\flo@vu}%
      \flo@vpetal
    \end{pgfscope}}%
  \flo@loop{lth}\flo@ka{1}{4}{\flo@calc\flo@t{0.05+0.05*\the\flo@ka}\flo@calc\flo@ms{\flo@t*\flo@tilt}%
    \flo@vblob{0}{0}\flo@t\flo@ms{0.2}{9}\flo@vfill{white}{0.22}{0}{\flo@smoothpath}}%
  \flo@loop{lsta}\flo@ka{1}{6}{%
    \flo@sym\flo@t{6}\flo@calc\flo@a{(\the\flo@ka-3.5)*16+\flo@t}\flo@range\flo@len{0.3}{0.48}%
    \flo@calc\flo@ex{\flo@len*sin(\flo@a)}\flo@calc\flo@ey{\flo@len*cos(\flo@a)}%
    \flo@calc\flo@c{\flo@ex*0.2}\flo@calc\flo@d{\flo@ey*0.5}\flo@calc\flo@cc{\flo@ex*0.8}\flo@calc\flo@dd{\flo@ey*0.85}%
    \flo@vbezier{0}{0}\flo@c\flo@d\flo@cc\flo@dd\flo@ex\flo@ey
    \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.85}{0}{\flo@openpath}%
    \flo@sym\flo@t{30}\flo@calc\flo@t{-\flo@a+\flo@t}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@ex\flo@ey}\pgftransformrotate{\flo@t}%
      \flo@vblob{0}{0}{0.022}{0.04}{0.1}{6}\flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}\end{pgfscope}%
    \flo@chance{0.5}\ifflo@yes\flo@sym\flo@t{0.03}\flo@calc\flo@xa{\flo@ex+\flo@t}\flo@range\flo@t{0.02}{0.05}\flo@calc\flo@ya{\flo@ey+\flo@t}%
      \flo@vaccent{flo@c}{0}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{0.008pt}}\fi}%
  \flo@vaccent{flo@c}{-0.2}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.035pt}}}

% a lily whose tepals sweep back (reflex under -40), held sideways or nodding, seen from the
% side and a little from below: from the center at the origin six tepals leave a little
% forward (+y, the way the flower faces), then curl back toward the stalk, the more the
% further the species' reflex; the far ones first, darker, then the stamens hanging out of
% the flower, then the near ones; the species' dots on them. Tepal length about 1; #1 cm
% per unit; tone \flo@vf@tone (empty: drawn)
\def\flo@vturkscap#1{%
  \edef\flo@vu{#1}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.30}{0.38}\else\edef\flo@tq{\flo@vf@tone}\fi
  \flo@range\flo@spin{0}{60}\flo@range\flo@tkbe{18}{32}%
  \flo@calc\flo@tkcb{cos(\flo@tkbe)}\flo@calc\flo@tksb{sin(\flo@tkbe)}\flo@calc\flo@tkcurl{60-1.6*\flo@get{reflex}}%
  \flo@loop{tka}\flo@ka{1}{6}{%
    \flo@sym\flo@t{8}\flo@calc\flo@a{\flo@spin+(\the\flo@ka-1)*60+\flo@t}\expandafter\let\csname flo@tkA\the\flo@ka\endcsname\flo@a
    \flo@range\flo@t{0.88}{1.05}\expandafter\let\csname flo@tkJ\the\flo@ka\endcsname\flo@t
    \flo@range\flo@t{0.13}{0.17}\expandafter\let\csname flo@tkW\the\flo@ka\endcsname\flo@t
    \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@t{\flo@tkcurl*\flo@t}\expandafter\let\csname flo@tkC\the\flo@ka\endcsname\flo@t
    \flo@sym\flo@t{0.03}\flo@calc\flo@t{\flo@tq+0.08*sin(\flo@a)+\flo@t}\expandafter\let\csname flo@tkQ\the\flo@ka\endcsname\flo@t
    \expandafter\edef\csname flo@tkO\the\flo@ka\endcsname{\the\flo@ka}}%
  % the far tepals first (a bubble sort of their order on sin)
  \flo@loop{tkso}\flo@ka{1}{5}{\flo@loop{tkso2}\flo@kb{1}{6-\flo@ka}{%
    \edef\flo@ia{\csname flo@tkO\the\flo@kb\endcsname}\edef\flo@ib{\csname flo@tkO\the\numexpr\flo@kb+1\relax\endcsname}%
    \flo@calc\flo@t{sin(\csname flo@tkA\flo@ib\endcsname)<sin(\csname flo@tkA\flo@ia\endcsname) ? 1 : 0}%
    \ifnum\flo@t=1 \expandafter\let\csname flo@tkO\the\flo@kb\endcsname\flo@ib
      \expandafter\let\csname flo@tkO\the\numexpr\flo@kb+1\relax\endcsname\flo@ia\fi}}%
  \def\flo@tkfar{1}%
  \flo@loop{tkt}\flo@kc{1}{6}{%
    \edef\flo@tkk{\csname flo@tkO\the\flo@kc\endcsname}%
    \ifnum\flo@tkfar=1
      \flo@calc\flo@t{sin(\csname flo@tkA\flo@tkk\endcsname)<0 ? 1 : 0}%
      \ifnum\flo@t=0 \def\flo@tkfar{0}\flo@tkstamens\fi
    \fi
    \flo@tktepal}%
  \ifnum\flo@tkfar=1 \flo@tkstamens\fi}
% the stamens and their anthers, and the center
\def\flo@tkstamens{%
  \flo@loop{tkst}\flo@ka{1}{6}{%
    \flo@sym\flo@t{5}\flo@calc\flo@a{(\the\flo@ka-3.5)*12+\flo@t}\flo@range\flo@len{0.5}{0.75}%
    \flo@calc\flo@ex{\flo@len*sin(\flo@a)}\flo@calc\flo@ey{\flo@len*cos(\flo@a)}%
    \flo@calc\flo@c{\flo@ex*0.2}\flo@calc\flo@d{\flo@ey*0.5}\flo@calc\flo@cc{\flo@ex*0.8}\flo@calc\flo@dd{\flo@ey*0.85}%
    \flo@vbezier{0}{0}\flo@c\flo@d\flo@cc\flo@dd\flo@ex\flo@ey
    \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{0.25}{0.85}{0}{\flo@openpath}%
    \flo@sym\flo@t{30}\flo@calc\flo@t{-\flo@a+\flo@t}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@ex\flo@ey}\pgftransformrotate{\flo@t}%
      \flo@vblob{0}{0}{0.022}{0.045}{0.1}{6}\flo@vaccent{flo@c}{-0.1}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}\end{pgfscope}}%
  \flo@vtone{flo@c}{0.1}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.05pt}}}
% tepal \flo@tkk: its spine in 3D (flo@tkX/Y/Z), half-widths (flo@tkH), then its outline seen
\def\flo@tktepal{%
  \edef\flo@a{\csname flo@tkA\flo@tkk\endcsname}\flo@calc\flo@tkca{cos(\flo@a)}\flo@calc\flo@tksa{sin(\flo@a)}%
  \edef\flo@tkj{\csname flo@tkJ\flo@tkk\endcsname}\edef\flo@tkw{\csname flo@tkW\flo@tkk\endcsname}%
  \edef\flo@tkc{\csname flo@tkC\flo@tkk\endcsname}%
  \def\flo@xx{0}\def\flo@yy{0}\def\flo@zz{0}%
  \expandafter\def\csname flo@tkX1\endcsname{0}\expandafter\def\csname flo@tkY1\endcsname{0}%
  \expandafter\def\csname flo@tkZ1\endcsname{0}\expandafter\def\csname flo@tkH1\endcsname{0}%
  \flo@loop{tks}\flo@kb{1}{10}{%
    \flo@calc\flo@f{-15+\flo@tkc*pow((\the\flo@kb-0.5)/10,1.3)}%
    \flo@calc\flo@tkr{cos(\flo@f)*\flo@tkj/10}\flo@calc\flo@tkb{-sin(\flo@f)*\flo@tkj/10}%
    \flo@calc\flo@xx{\flo@xx+\flo@tkr*\flo@tkca}\flo@calc\flo@yy{\flo@yy+\flo@tkb}\flo@calc\flo@zz{\flo@zz+\flo@tkr*\flo@tksa}%
    \edef\flo@q{\the\numexpr\flo@kb+1\relax}%
    \expandafter\let\csname flo@tkX\flo@q\endcsname\flo@xx\expandafter\let\csname flo@tkY\flo@q\endcsname\flo@yy
    \expandafter\let\csname flo@tkZ\flo@q\endcsname\flo@zz
    \ifnum\flo@kb<10 \flo@calc\flo@t{\flo@tkw*\flo@tkj*pow(sin(180*pow(\the\flo@kb/10,0.55)),0.9)}\else\def\flo@t{0}\fi
    \expandafter\let\csname flo@tkH\flo@q\endcsname\flo@t}%
  \def\flo@tkn{0}%
  \flo@loop{tko}\flo@kb{1}{11}{\flo@tkat{\the\flo@kb}{1}}%
  \flo@loop{tkp}\flo@kb{2}{10}{\flo@tkat{\the\numexpr12-\flo@kb\relax}{-1}}%
  \flo@smoothprep{20}\flo@keep{tk}%
  \flo@vtone{flo@c}{\csname flo@tkQ\flo@tkk\endcsname}\flo@vfill{flo@c}{1}{0}{\flo@kept{tk}}%
  \ifdim\flo@vu pt>0.15pt
    \begin{pgfscope}\flo@kept{tk}\pgfusepath{clip}%
      \def\flo@tkn{0}\flo@loop{tkm}\flo@kb{2}{10}{\flo@tkat{\the\flo@kb}{0}}%
      \flo@vstreak{9}{0.03}{0.004}{white}{0.5}%
      \edef\flo@t{\flo@get{guides}}\def\flo@tmp{none}%
      \ifx\flo@t\flo@tmp\else
        \flo@vtone{flo@c}{0.06}%
        \flo@vfill{flo@c}{0.8}{1}{\flo@loop{tkd}\flo@ka{1}{5}{%
          \flo@int\flo@tki{2}{5}\flo@sym\flo@tko{0.6}%
          \flo@tkpt\flo@tki{\flo@tko*\csname flo@tkH\flo@tki\endcsname}%
          \flo@range\flo@t{0.012}{0.022}\pgfpathcircle{\flo@P\flo@xl\flo@yl}{\flo@t pt}}}%
      \fi
      \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.3*\flo@vu}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{tk}}%
    \end{pgfscope}%
  \fi
  \flo@vtone{flo@c}{0.08}\flo@vstroke{flo@c}{0.18}{0.35}{0}{\flo@kept{tk}}}
% tepal point #1 moved #2 across (along the tepal's width), as seen: \flo@xl, \flo@yl
\def\flo@tkpt#1#2{%
  \edef\flo@q{#1}\flo@calc\flo@w{#2}%
  \flo@calc\flo@xl{\csname flo@tkX\flo@q\endcsname-\flo@w*\flo@tksa}%
  \flo@calc\flo@t{\csname flo@tkZ\flo@q\endcsname+\flo@w*\flo@tkca}%
  \flo@calc\flo@yl{\csname flo@tkY\flo@q\endcsname*\flo@tkcb-\flo@t*\flo@tksb}}
% the same, #2 times its half-width, put as the next point of flo@X/Y (\flo@tkn)
\def\flo@tkat#1#2{%
  \flo@tkpt{#1}{(#2)*\csname flo@tkH#1\endcsname}%
  \edef\flo@tkn{\the\numexpr\flo@tkn+1\relax}\flo@put\flo@tkn\flo@xl\flo@yl}

% flora.floret: a small flower of #2 petals (flora: 5), radius 1; #1 its radius on the page
% in cm (no random part). Star or round: \flo@vf@star (empty: drawn); tone \flo@vf@tone
\def\flo@vfloret#1#2{%
  \ifx\flo@vf@star\pgfutil@empty\flo@chance{0.5}\ifflo@yes\def\flo@star{1}\else\def\flo@star{0}\fi
  \else\edef\flo@star{\flo@vf@star}\fi
  \edef\flo@fn{#2}%
  \ifdim#1pt<0.07pt
    \flo@range\flo@ph{0}{360}%
    \flo@loop{flp}\flo@kb{0}{2*\flo@fn-1}{%
      \flo@calc\flo@a{\flo@ph+\the\flo@kb*180/\flo@fn}%
      \ifodd\flo@kb\flo@calc\flo@r{\flo@star==1 ? 0.32 : 0.62}\else\def\flo@r{1}\fi
      \flo@calc\flo@xa{\flo@r*cos(\flo@a)}\flo@calc\flo@ya{\flo@r*sin(\flo@a)}%
      \flo@put{\the\numexpr\flo@kb+1\relax}{\flo@xa}{\flo@ya}}%
    \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.22}{0.42}\else\edef\flo@tq{\flo@vf@tone}\fi
    \flo@vtone{flo@c}{\flo@tq}\flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{\flo@x1}{\flo@y1}}%
      \flo@loop{flpp}\flo@kb{2}{2*\flo@fn}{\pgfpathlineto{\flo@P{\flo@x{\the\flo@kb}}{\flo@y{\the\flo@kb}}}}\pgfpathclose}%
    \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{0.2}0}\pgfpathlineto{\flo@P0{0.2}}%
      \pgfpathlineto{\flo@P{-0.2}0}\pgfpathlineto{\flo@P0{-0.2}}\pgfpathclose}%
  \else
    \flo@range\flo@ph{0}{360}\flo@spk={}%
    \flo@loop{flr}\flo@ka{0}{\flo@fn-1}{%
      \flo@sym\flo@t{8.6}\flo@calc\flo@a{\flo@ph+\the\flo@ka*360/\flo@fn+\flo@t}\flo@range\flo@len{0.85}{1.1}%
      \flo@calc\flo@c{cos(\flo@a)}\flo@calc\flo@sn{sin(\flo@a)}%
      \ifnum\flo@star=1
        \flo@put1{0}{0}\flo@put2{0.45}{0.156}\flo@put3{1}{0}\flo@put4{0.45}{-0.156}\def\flo@np{4}\def\flo@tk{0.5}%
      \else
        \flo@put1{0}{0}\flo@put2{0.3}{0.42}\flo@put3{0.85}{0.336}\flo@put4{1}{0}\flo@put5{0.85}{-0.336}\flo@put6{0.3}{-0.42}%
        \def\flo@np{6}\def\flo@tk{1}%
      \fi
      \flo@loop{flrr}\flo@kb{1}{\flo@np}{%
        \flo@calc\flo@xa{\flo@len*(\flo@x{\the\flo@kb}*\flo@c-\flo@y{\the\flo@kb}*\flo@sn)}%
        \flo@calc\flo@ya{\flo@len*(\flo@x{\the\flo@kb}*\flo@sn+\flo@y{\the\flo@kb}*\flo@c)}%
        \expandafter\let\csname flo@TX\the\flo@kb\endcsname\flo@xa\expandafter\let\csname flo@TY\the\flo@kb\endcsname\flo@ya}%
      \flo@loop{flrs}\flo@kb{1}{\flo@np}{\flo@put{\the\flo@kb}{\csname flo@TX\the\flo@kb\endcsname}{\csname flo@TY\the\flo@kb\endcsname}}%
      \flo@smoothprepT{\flo@np}{\flo@tk}%
      \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@x1}{\flo@y1}}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}%
      \flo@loop{flrc}\flo@i{1}{\flo@np}{%
        \edef\flo@ib{\the\numexpr\ifnum\flo@i=\flo@np\space 1\else\flo@i+1\fi\relax}%
        \edef\flo@tmp{\noexpand\pgfpathcurveto{\noexpand\flo@P{\csname flo@A\the\flo@i\endcsname}{\csname flo@B\the\flo@i\endcsname}}%
          {\noexpand\flo@P{\csname flo@C\the\flo@i\endcsname}{\csname flo@D\the\flo@i\endcsname}}{\noexpand\flo@P{\flo@x\flo@ib}{\flo@y\flo@ib}}}%
        \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
      \flo@spk\expandafter{\the\flo@spk\pgfpathclose}}%
    \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.22}{0.42}\else\edef\flo@tq{\flo@vf@tone}\fi
    \flo@vtone{flo@c}{\flo@tq}\flo@vfill{flo@c}{1}{0}{\the\flo@spk}%
    \ifdim#1pt>0.05pt \flo@vfill{white}{0.75}{0}{\pgfpathcircle{\flo@P00}{0.35pt}}\fi
    \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.16pt}}%
  \fi}

% flora.bud: a teardrop and three sepals, base at the origin, +y, length 1; #1 cm per unit;
% tone \flo@vf@tone (empty: drawn)
\def\flo@vbud#1{%
  \flo@sym\flo@bend{0.1}%
  \flo@loop{bds}\flo@kb{0}{18}{%
    \flo@calc\flo@v{\the\flo@kb/18}\flo@calc\flo@sx{\flo@bend*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
  \flo@normals{19}%
  \flo@loop{bdw}\flo@kb{0}{18}{%
    \flo@calc\flo@v{\the\flo@kb/18}\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
    \ifdim\flo@v pt>0pt \flo@calc\flo@w{0.3*pow(max(0,sin(180*pow(\flo@v,0.6))),0.8)}\else\def\flo@w{0}\fi
    \ifdim\flo@w pt<0pt \def\flo@w{0}\fi
    \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@w}%
    \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@w}%
    \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
    \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
  \flo@bladeassemble{18}\flo@smoothprep{36}\flo@keep{bd}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.3}{0.42}\else\edef\flo@tq{\flo@vf@tone}\fi
  \flo@vtone{flo@c}{\flo@tq}\flo@vfill{flo@c}{1}{0}{\flo@kept{bd}}%
  \begin{pgfscope}\flo@kept{bd}\pgfusepath{clip}%
    \flo@calc\flo@ta{\flo@tq-0.2}\flo@calc\flo@tb{\flo@tq+0.2}\flo@vmottle{-0.3}{0}{0.3}{1}{5}{0.1}\flo@ta\flo@tb{0}%
    \def\flo@twa{0.06}\def\flo@twb{0.005}\flo@calc\flo@t{\flo@bend*0.8}%
    \flo@vfill{white}{0.7}{0}{\flo@vtaper{-0.08}{0.05}{-0.1}{0.35}{-0.05}{0.65}\flo@t{0.95}}%
    \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{1.4*(#1)}\flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\flo@kept{bd}}%
  \end{pgfscope}%
  % the sepals: three small blades, transformed here so that they fill as one path
  \flo@spk={}%
  \flo@loop{sep}\flo@ka{0}{2}{%
    \edef\flo@k{\the\numexpr\flo@ka-1\relax}\flo@sym\flo@t{6}\flo@calc\flo@a{\flo@k*24+\flo@t}%
    \ifnum\flo@k=0 \def\flo@sy{0.22}\else\def\flo@sy{0.32}\fi
    \flo@loop{seps}\flo@kb{0}{8}{\flo@calc\flo@v{\the\flo@kb/8}\flo@calc\flo@sx{-\flo@k*0.4*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
    \flo@normals{9}%
    \flo@loop{sepw}\flo@kb{0}{8}{%
      \flo@calc\flo@v{\the\flo@kb/8}\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
      \ifdim\flo@v pt>0pt \flo@calc\flo@w{sin(180*pow(\flo@v,0.6))}\else\def\flo@w{0}\fi
      \ifdim\flo@w pt<0pt \def\flo@w{0}\fi
      \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@w}%
      \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@w}%
      \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
      \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
    \flo@bladeassemble{8}%
    % into the sepal's place: scale (0.06, \flo@sy), turn by \flo@a, move to (0.05 k, -0.02)
    \flo@loop{sept}\flo@kb{1}{16}{%
      \flo@calc\flo@xa{0.06*\flo@x{\the\flo@kb}}\flo@calc\flo@ya{\flo@sy*\flo@y{\the\flo@kb}}%
      \flo@calc\flo@xb{\flo@k*0.05+\flo@xa*cos(\flo@a)-\flo@ya*sin(\flo@a)}\flo@calc\flo@yb{-0.02+\flo@xa*sin(\flo@a)+\flo@ya*cos(\flo@a)}%
      \flo@put{\the\flo@kb}{\flo@xb}{\flo@yb}}%
    \flo@smoothprep{16}%
    \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@x1}{\flo@y1}}}%
    \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}%
    \flo@loop{sepc}\flo@i{1}{16}{%
      \edef\flo@ib{\the\numexpr\ifnum\flo@i=16 1\else\flo@i+1\fi\relax}%
      \edef\flo@tmp{\noexpand\pgfpathcurveto{\noexpand\flo@P{\csname flo@A\the\flo@i\endcsname}{\csname flo@B\the\flo@i\endcsname}}%
        {\noexpand\flo@P{\csname flo@C\the\flo@i\endcsname}{\csname flo@D\the\flo@i\endcsname}}{\noexpand\flo@P{\flo@x\flo@ib}{\flo@y\flo@ib}}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \flo@spk\expandafter{\the\flo@spk\pgfpathclose}}%
  \flo@vtone{flo@c}{0.14}\flo@vfill{flo@c}{0.9}{0}{\the\flo@spk}}

% ================================================================ the species, in v1.3's hand
% defaults: drawn as flora draws them
\def\flo@vf@star{}\def\flo@vf@tone{}
% the flower's tone from its color group, as florilegium's ramp sees colors: blue as flora
% draws it (\flo@vf@tone empty), violet deeper, pink, green, yellow and white paler but
% close enough to flora's range that a page keeps v1.3's weight of ink,
% red and orange in the accent's ramp (copper)
\def\flo@stone{%
  \edef\flo@col{\flo@get{color}}\def\flo@rampname{flo@ramp}\def\flo@vf@tone{}%
  \def\flo@tmp{violet}\ifx\flo@col\flo@tmp\flo@range\flo@vf@tone{0.18}{0.26}\fi
  \def\flo@tmp{pink}\ifx\flo@col\flo@tmp\flo@range\flo@vf@tone{0.34}{0.42}\fi
  \def\flo@tmp{white}\ifx\flo@col\flo@tmp\flo@range\flo@vf@tone{0.46}{0.54}\fi
  \def\flo@tmp{yellow}\ifx\flo@col\flo@tmp\flo@range\flo@vf@tone{0.4}{0.48}\fi
  \def\flo@tmp{green}\ifx\flo@col\flo@tmp\flo@range\flo@vf@tone{0.38}{0.46}\fi
  \def\flo@tmp{red}\ifx\flo@col\flo@tmp\def\flo@rampname{flo@aramp}\flo@range\flo@vf@tone{0.3}{0.4}\fi
  \def\flo@tmp{orange}\ifx\flo@col\flo@tmp\def\flo@rampname{flo@aramp}\flo@range\flo@vf@tone{0.42}{0.52}\fi}
% the species' flower face on, diameter 1 (lily: star at a tilt; head: rays around a disk;
% small: a floret; else flora's flower with the species' parts); #1 diameter on the page in pt
\def\flo@sflower#1{%
  \edef\flo@sfd{#1}\edef\flo@form{\flo@get{form}}\edef\flo@nn{\flo@get{merosity}}%
  \ifnum\flo@get{merovar}=1 \flo@int\flo@t{1}{10}%
    \ifnum\flo@t=1 \edef\flo@nn{\the\numexpr\flo@nn-1\relax}\fi
    \ifnum\flo@t>7 \edef\flo@nn{\the\numexpr\flo@nn+1\relax}\fi\fi
  \edef\flo@ps{\flo@get{petalshape}}\def\flo@vf@pointed{0}%
  \def\flo@tmp{lanceolate}\ifx\flo@ps\flo@tmp\def\flo@vf@pointed{1}\fi
  \def\flo@tmp{linear}\ifx\flo@ps\flo@tmp\def\flo@vf@pointed{1}\fi
  \def\flo@tmp{head}%
  \ifx\flo@form\flo@tmp\flo@sdaisy\flo@sfd\else
  \def\flo@tmp{lily}%
  \ifx\flo@form\flo@tmp
    \begin{pgfscope}\pgftransformscale{0.48}\flo@calc\flo@oarg{(\flo@sfd)*0.48/28.45276}\flo@vlily\flo@oarg
      \edef\flo@t{\flo@get{corona}}\def\flo@tmp{none}\ifx\flo@t\flo@tmp\else\flo@vcorona\flo@oarg\fi\end{pgfscope}%
  \else
    \def\flo@tmp{iris}\def\flo@ivon{0}\ifx\flo@form\flo@tmp\ifdim\flo@sfd pt<8pt \else\def\flo@ivon{1}\fi\fi
    \ifnum\flo@ivon=1 \flo@viris\flo@sfd\else
    \ifdim\flo@sfd pt<22pt
      % small: a floret (under about 3 mm) or a blossom of the species' parts
      \flo@calc\flo@t{max(4,min(6,\flo@nn))}\pgfmathtruncatemacro\flo@fp{\flo@t}%
      \ifdim\flo@sfd pt<8pt
        \edef\flo@vf@star{\flo@vf@pointed}%
        \begin{pgfscope}\pgftransformscale{0.5}\flo@calc\flo@oarg{(\flo@sfd)*0.5/28.45276}\flo@vfloret\flo@oarg\flo@fp\end{pgfscope}%
      \else
        \begin{pgfscope}\pgftransformscale{0.5}\flo@calc\flo@oarg{(\flo@sfd)*0.5/28.45276}\flo@vblossom\flo@oarg\flo@fp\end{pgfscope}%
      \fi
    \else
      \edef\flo@cl{\flo@get{clade}}\def\flo@tmp{monocot}%
      \ifx\flo@cl\flo@tmp\edef\flo@np{\the\numexpr2*\flo@nn\relax}\else\edef\flo@np{\flo@nn}\fi
      \ifnum\flo@vf@pointed=1 \let\flo@vf@W\undefined
      \else\flo@calc\flo@vf@W{max(0.28,min(0.5,0.66/\flo@get{petalaspect}))}%
        \def\flo@tmp{cruciform}\ifx\flo@form\flo@tmp\def\flo@vf@W{0.3}\fi\fi
      \edef\flo@g{\flo@get{guides}}\def\flo@tmp{none}%
      \ifx\flo@g\flo@tmp\ifnum\flo@vf@pointed=0 \def\flo@vf@ns{5}\else\let\flo@vf@ns\undefined\fi
      \else\let\flo@vf@ns\undefined\fi
      \def\flo@tmp{rosaceous}\ifx\flo@form\flo@tmp
        \def\flo@vf@ns{3}\def\flo@vp@notchp{0.85}\def\flo@vp@notchk{1.6}\fi
      \begin{pgfscope}\pgftransformscale{0.45}\flo@calc\flo@vs{(\flo@sfd)*0.45/28.45276}\flo@vflower\flo@vs\flo@np\end{pgfscope}%
      \ifx\flo@form\flo@tmp\flo@vboss\fi
    \fi\fi
  \fi\fi}
% one part of an iris: from the origin toward #1 degrees, #2 long, a narrow haft for
% \flo@ivc of it (none at 0), then flora's petal: #3 half-wide, bent #4, tone #5, a white
% heart (#6 1) or none, #7 white streaks (empty: drawn), notched with chance #8; #9 cm per
% unit of the flower; pointed when \flo@ivpt is 1
\def\flo@ivc{0}\def\flo@ivpt{0}
\def\flo@ivpart#1#2#3#4#5#6#7#8#9{%
  \edef\flo@iva{#1}\edef\flo@ivl{#2}\edef\flo@ivw{#3}\edef\flo@ivb{#4}\edef\flo@ivt{#5}%
  \edef\flo@ivh{#6}\edef\flo@ivn{#7}\edef\flo@ivp{#8}\edef\flo@ivu{#9}%
  \begin{pgfscope}\flo@calc\flo@t{\flo@iva-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@ivl}%
    \ifdim\flo@ivc pt>0pt
      \flo@calc\flo@twa{0.3*\flo@ivw}\flo@calc\flo@twb{0.34*\flo@ivw*(1-\flo@ivc)}%
      \flo@vtone{flo@c}{\flo@ivt}\flo@calc\flo@t{\flo@ivc*0.5}\flo@calc\flo@ya{\flo@ivc+0.01}%
      \flo@vfill{flo@c}{1}{0}{\flo@vtaper{0}{0}{0}\flo@t{0}\flo@t{0}\flo@ya}%
      \def\flo@twa{0.02}\def\flo@twb{0.004}\flo@calc\flo@ya{\flo@ivc*0.95}%
      \flo@vfill{white}{0.6}{0}{\flo@vtaper{0}{0.02}{0}\flo@t{0}\flo@t{0}\flo@ya}%
      \pgftransformshift{\flo@P0\flo@ivc}\flo@calc\flo@t{1-\flo@ivc}\pgftransformscale{\flo@t}%
    \fi
    \let\flo@vp@pointed\flo@ivpt\let\flo@vp@W\flo@ivw\let\flo@vp@bend\flo@ivb\let\flo@vp@ns\flo@ivn
    \let\flo@vp@heart\flo@ivh\let\flo@vp@tone\flo@ivt\let\flo@vp@notchp\flo@ivp\def\flo@vp@notchk{1.6}%
    \flo@calc\flo@vp@u{\flo@ivu*\flo@ivl*(1-\flo@ivc)}\flo@vpetal\end{pgfscope}}
% an iris, three-quarters from the front, diameter 1, its heart at the origin: three
% standards that rise and cup together, the back one behind; three falls that spread and
% droop, the front one toward the viewer with a copper beard and the species' guides; a
% pale crest (a style arm) over each fall's base. #1 its diameter on the page in pt
\def\flo@viris#1{%
  \flo@calc\flo@ivs{(#1)/28.45276}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@ivq{0.28}{0.38}\else\edef\flo@ivq{\flo@vf@tone}\fi
  % the standards' hafts are shorter than the falls' (the species' claw)
  \flo@calc\flo@ivcf{0.7*min(0.45,\flo@get{claw})}\flo@calc\flo@ivc{0.55*\flo@ivcf}%
  % the back standard
  \flo@sym\flo@t{6}\flo@calc\flo@a{90+\flo@t}\flo@range\flo@len{0.46}{0.52}\flo@sym\flo@b{0.06}%
  \flo@calc\flo@tp{\flo@ivq+0.04}\flo@ivpart\flo@a\flo@len{0.27}\flo@b\flo@tp{0}{5}{0.5}\flo@ivs
  % the side falls, each with its crest
  \flo@loop{ivf}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{20}{45}\flo@calc\flo@a{-90+\flo@sg*\flo@t}%
    \flo@range\flo@len{0.52}{0.6}\flo@range\flo@b{0.15}{0.3}\flo@calc\flo@b{\flo@sg*\flo@b}%
    \flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@ivq+\flo@t}%
    \let\flo@ivc\flo@ivcf\flo@ivpart\flo@a\flo@len{0.34}\flo@b\flo@tp{0}{}{0.3}\flo@ivs
    \def\flo@ivc{0}\flo@range\flo@len{0.26}{0.32}\flo@calc\flo@tp{\flo@ivq+0.18}%
    \flo@ivpart\flo@a\flo@len{0.24}{0}\flo@tp{0}{3}{0.9}\flo@ivs}%
  \flo@calc\flo@ivc{0.55*\flo@ivcf}%
  % the front standards, cupping toward each other
  \flo@loop{ivs}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{8}{28}\flo@calc\flo@a{90-\flo@sg*\flo@t}%
    \flo@range\flo@len{0.48}{0.56}\flo@range\flo@b{0.15}{0.3}\flo@calc\flo@b{-\flo@sg*\flo@b}%
    \flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@ivq+0.02+\flo@t}%
    \flo@ivpart\flo@a\flo@len{0.27}\flo@b\flo@tp{0}{5}{0.5}\flo@ivs}%
  % the front fall, its guides and beard, its crest
  \flo@sym\flo@t{6}\flo@calc\flo@a{-90+\flo@t}\flo@range\flo@len{0.56}{0.64}\flo@sym\flo@b{0.08}%
  \let\flo@ivc\flo@ivcf\flo@ivpart\flo@a\flo@len{0.36}\flo@b\flo@ivq{0}{}{0.3}\flo@ivs\def\flo@ivc{0}%
  \flo@calc\flo@t{\flo@ivs*\flo@len}%
  \ifdim\flo@t pt>0.15pt
    \begin{pgfscope}\flo@calc\flo@t{\flo@a-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@len}%
      \edef\flo@g{\flo@get{guides}}%
      \def\flo@tmp{lines}\ifx\flo@g\flo@tmp
        \flo@vtone{flo@c}{0.06}\def\flo@twb{0.004}\def\flo@twa{0.035}%
        \flo@loop{ivg}\flo@kb{-2}{2}{%
          \flo@sym\flo@t{0.03}\flo@calc\flo@f{\the\flo@kb*0.07+\flo@t}\flo@range\flo@ya{0.25}{0.38}%
          \flo@calc\flo@xb{0.6*\flo@f}\flo@calc\flo@xc{1.1*\flo@f}\flo@calc\flo@xd{1.4*\flo@f}%
          \flo@calc\flo@yb{0.35*\flo@ya+0.4}\flo@calc\flo@yc{0.7*\flo@ya+0.4}\flo@calc\flo@yd{\flo@ya+0.4}%
          \flo@vfill{flo@c}{0.45}{1}{\flo@vtaper\flo@f{0.4}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}\fi
      \def\flo@tmp{blotch}\ifx\flo@g\flo@tmp
        \flo@vblob{0}{0.62}{0.16}{0.12}{0.25}{9}\flo@vfill{white}{0.7}{0}{\flo@smoothpath}%
        \flo@vblob{0}{0.62}{0.07}{0.05}{0.3}{7}\flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.5}{1}{\flo@smoothpath}\fi
      \def\flo@tmp{dots}\ifx\flo@g\flo@tmp
        \flo@spk={}%
        \flo@loop{ivd}\flo@kb{1}{9}{%
          \flo@sym\flo@xa{0.16}\flo@range\flo@ya{0.45}{0.8}\flo@range\flo@r{0.012}{0.024}%
          \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@r pt}}%
          \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
        \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.7}{1}{\the\flo@spk}\fi
      % the beard: copper hairs along the fall's middle, beyond its crest
      \flo@spk={}%
      \flo@loop{ivb}\flo@kb{1}{14}{%
        \flo@sym\flo@xa{0.035}\flo@calc\flo@ya{0.38+0.024*\the\flo@kb}\flo@range\flo@r{0.012}{0.022}%
        \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@r pt}}%
        \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
      \flo@vaccent{flo@c}{0.1}\flo@vfill{flo@c}{0.9}{0}{\the\flo@spk}%
    \end{pgfscope}%
  \fi
  \flo@range\flo@len{0.26}{0.32}\flo@calc\flo@tp{\flo@ivq+0.18}%
  \flo@ivpart\flo@a\flo@len{0.24}{0}\flo@tp{0}{3}{0.9}\flo@ivs}
% an orchid face on, diameter 1, upright: pointed sepals in a star, one above and two
% below, two narrower petals raised beside the upper one, a lip at the bottom of two small
% side lobes and a notched middle lobe with a pale heart and the species' guides, and the
% column over it; flora's petals (\flo@ivpart). #1 cm per unit
\def\flo@vorchid#1{%
  \edef\flo@ocu{#1}\def\flo@ivc{0}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@ocq{0.28}{0.38}\else\edef\flo@ocq{\flo@vf@tone}\fi
  % the lateral sepals, then the dorsal one
  \def\flo@ivpt{1}%
  \flo@loop{ocs}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{45}{60}\flo@calc\flo@a{-90+\flo@sg*\flo@t}\flo@range\flo@len{0.42}{0.5}%
    \flo@sym\flo@b{0.08}\flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@ocq+0.02+\flo@t}%
    \flo@ivpart\flo@a\flo@len{0.12}\flo@b\flo@tp{0}{3}{0}\flo@ocu}%
  \flo@sym\flo@t{6}\flo@calc\flo@a{90+\flo@t}\flo@range\flo@len{0.4}{0.48}\flo@sym\flo@b{0.08}%
  \flo@calc\flo@tp{\flo@ocq+0.02}\flo@ivpart\flo@a\flo@len{0.13}\flo@b\flo@tp{0}{3}{0}\flo@ocu
  \def\flo@ivpt{0}%
  % the petals, raised beside the dorsal sepal
  \flo@loop{ocp}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{45}{65}\flo@calc\flo@a{90-\flo@sg*\flo@t}\flo@range\flo@len{0.36}{0.44}%
    \flo@range\flo@b{0}{0.12}\flo@calc\flo@b{\flo@sg*\flo@b}\flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@ocq+\flo@t}%
    \flo@ivpart\flo@a\flo@len{0.2}\flo@b\flo@tp{0}{5}{0.3}\flo@ocu}%
  % the lip: two side lobes, the middle lobe, its guides
  \flo@calc\flo@tp{\flo@ocq-0.06}%
  \flo@loop{ocl}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{40}{55}\flo@calc\flo@a{-90+\flo@sg*\flo@t}\flo@range\flo@len{0.18}{0.24}%
    \flo@ivpart\flo@a\flo@len{0.35}{0}\flo@tp{0}{3}{0}\flo@ocu}%
  \flo@sym\flo@t{6}\flo@calc\flo@a{-90+\flo@t}\flo@range\flo@len{0.44}{0.54}\flo@sym\flo@b{0.06}%
  \flo@ivpart\flo@a\flo@len{0.38}\flo@b\flo@tp{1}{5}{0.85}\flo@ocu
  \flo@calc\flo@t{\flo@ocu*\flo@len}%
  \ifdim\flo@t pt>0.15pt
    \begin{pgfscope}\flo@calc\flo@t{\flo@a-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@len}%
      \edef\flo@g{\flo@get{guides}}%
      \def\flo@tmp{lines}\ifx\flo@g\flo@tmp
        \flo@vtone{flo@c}{0.06}\def\flo@twb{0.004}\def\flo@twa{0.035}%
        \flo@loop{ocg}\flo@kb{-2}{2}{%
          \flo@sym\flo@t{0.03}\flo@calc\flo@f{\the\flo@kb*0.09+\flo@t}\flo@range\flo@ya{0.35}{0.5}%
          \flo@calc\flo@xb{0.7*\flo@f}\flo@calc\flo@xc{1.2*\flo@f}\flo@calc\flo@xd{1.5*\flo@f}%
          \flo@calc\flo@yb{0.35*\flo@ya+0.12}\flo@calc\flo@yc{0.7*\flo@ya+0.12}\flo@calc\flo@yd{\flo@ya+0.12}%
          \flo@vfill{flo@c}{0.45}{1}{\flo@vtaper\flo@f{0.12}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}\fi
      \def\flo@tmp{blotch}\ifx\flo@g\flo@tmp
        \flo@vblob{0}{0.4}{0.2}{0.15}{0.3}{9}\flo@vfill{white}{0.65}{0}{\flo@smoothpath}%
        \flo@spk={}%
        \flo@loop{ocb}\flo@kb{1}{8}{%
          \flo@sym\flo@xa{0.14}\flo@range\flo@ya{0.3}{0.5}\flo@range\flo@r{0.015}{0.03}%
          \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@r pt}}%
          \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
        \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.7}{1}{\the\flo@spk}\fi
      \def\flo@tmp{dots}\ifx\flo@g\flo@tmp
        \flo@spk={}%
        \flo@loop{ocd}\flo@kb{1}{11}{%
          \flo@sym\flo@xa{0.24}\flo@range\flo@ya{0.2}{0.75}\flo@range\flo@r{0.014}{0.028}%
          \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@r pt}}%
          \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
        \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.7}{1}{\the\flo@spk}\fi
    \end{pgfscope}%
  \fi
  % the column: pale, hooded, a dark cap
  \flo@vblob{0}{0.05}{0.05}{0.085}{0.15}{8}\flo@vfill{white}{0.85}{0}{\flo@smoothpath}%
  \flo@vtone{flo@c}{0.1}\flo@vstroke{flo@c}{0.2}{0.5}{0}{\flo@smoothpath}%
  \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P0{0.11}}{0.022pt}}}
% a lily's corona (the monocot's cup or trumpet, as a daffodil's), in \flo@vlily's frame
% after its star (petal length 1, the face toward +y, \flo@tilt its squash): a body that
% flares from the heart toward the face, a frilled rim seen as an ellipse, the throat
% inside darker; a cup is short, a trumpet long. #1 cm per unit
\def\flo@vcorona#1{%
  \edef\flo@cqu{#1}\edef\flo@cqf{\flo@get{corona}}\def\flo@tmp{trumpet}%
  \ifx\flo@cqf\flo@tmp\flo@range\flo@cqh{0.4}{0.6}\def\flo@cqb{0.1}\flo@range\flo@cqR{0.24}{0.32}%
  \else\flo@range\flo@cqh{0.12}{0.2}\def\flo@cqb{0.14}\flo@range\flo@cqR{0.2}{0.28}\fi
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@cqq{0.24}{0.32}\else\flo@calc\flo@cqq{\flo@vf@tone-0.08}\fi
  \flo@int\flo@cqn{9}{14}\flo@range\flo@cqp{0}{360}%
  % the body: the base's near half, the right side, the rim's near half, the left side
  \flo@loop{cqa}\flo@kb{0}{4}{%
    \flo@calc\flo@a{180+45*\the\flo@kb}%
    \flo@calc\flo@xa{\flo@cqb*cos(\flo@a)}\flo@calc\flo@ya{\flo@cqb*\flo@tilt*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@kb+1\relax}\flo@xa\flo@ya}%
  \flo@loop{cqb}\flo@kb{1}{3}{%
    \flo@calc\flo@v{\the\flo@kb/4}\flo@calc\flo@xa{\flo@cqb+(\flo@cqR-\flo@cqb)*pow(\flo@v,1.6)}\flo@calc\flo@ya{\flo@cqh*\flo@v}%
    \flo@put{\the\numexpr\flo@kb+5\relax}\flo@xa\flo@ya}%
  \flo@loop{cqc}\flo@kb{0}{6}{%
    \flo@calc\flo@a{-30*\the\flo@kb}%
    \flo@calc\flo@r{1+0.09*sin(\flo@cqn*\flo@a+\flo@cqp)}%
    \flo@calc\flo@xa{\flo@cqR*\flo@r*cos(\flo@a)}\flo@calc\flo@ya{\flo@cqh+\flo@cqR*\flo@r*\flo@tilt*sin(\flo@a)}%
    \flo@put{\the\numexpr\flo@kb+9\relax}\flo@xa\flo@ya}%
  \flo@loop{cqd}\flo@kb{1}{3}{%
    \flo@calc\flo@v{1-\the\flo@kb/4}\flo@calc\flo@xa{-\flo@cqb-(\flo@cqR-\flo@cqb)*pow(\flo@v,1.6)}\flo@calc\flo@ya{\flo@cqh*\flo@v}%
    \flo@put{\the\numexpr\flo@kb+15\relax}\flo@xa\flo@ya}%
  \flo@smoothprepT{18}{0.9}\flo@keep{cqo}%
  \flo@vtone{flo@c}{\flo@cqq}\flo@vfill{flo@c}{1}{0}{\flo@kept{cqo}}%
  \ifdim\flo@cqu pt>0.12pt
    \begin{pgfscope}\flo@kept{cqo}\pgfusepath{clip}%
      % streaks up the body, white and dark by turns
      \def\flo@twa{0.025}\def\flo@twb{0.008}%
      \flo@loop{cqs}\flo@ka{-2}{2}{%
        \flo@calc\flo@f{\the\flo@ka/2.6}\flo@sym\flo@t{0.02}%
        \flo@calc\flo@xa{\flo@f*\flo@cqb}\flo@calc\flo@xd{\flo@f*\flo@cqR+\flo@t}\flo@calc\flo@ya{-0.02}\flo@calc\flo@yd{\flo@cqh}%
        \flo@calc\flo@xb{0.7*\flo@xa+0.3*\flo@xd}\flo@calc\flo@yb{0.4*\flo@cqh}\flo@calc\flo@xc{0.3*\flo@xa+0.7*\flo@xd}\flo@calc\flo@yc{0.75*\flo@cqh}%
        \ifodd\flo@ka\flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.25}{1}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}%
        \else\flo@vfill{white}{0.5}{0}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}\fi}%
    \end{pgfscope}%
  \fi
  % the opening: the rim's ellipse, frilled, paler, the throat darker inside
  \flo@loop{cqe}\flo@kb{1}{16}{%
    \flo@calc\flo@a{22.5*\the\flo@kb}\flo@calc\flo@r{1+0.09*sin(\flo@cqn*\flo@a+\flo@cqp)}%
    \flo@calc\flo@xa{\flo@cqR*\flo@r*cos(\flo@a)}\flo@calc\flo@ya{\flo@cqh+\flo@cqR*\flo@r*\flo@tilt*sin(\flo@a)}%
    \flo@put{\the\flo@kb}\flo@xa\flo@ya}%
  \flo@smoothprepT{16}{1}\flo@keep{cqr}%
  \flo@calc\flo@t{\flo@cqq+0.12}\flo@vtone{flo@c}{\flo@t}\flo@vfill{flo@c}{1}{0}{\flo@kept{cqr}}%
  \flo@calc\flo@t{0.55*\flo@cqR}\flo@calc\flo@ya{\flo@cqh-0.15*\flo@cqR*\flo@tilt}\flo@calc\flo@r{\flo@t*\flo@tilt}%
  \flo@vblob{0}\flo@ya\flo@t\flo@r{0.15}{8}\flo@calc\flo@t{\flo@cqq-0.12}\flo@vtone{flo@c}{\flo@t}\flo@vfill{flo@c}{0.6}{1}{\flo@smoothpath}%
  \flo@vtone{flo@c}{0.08}\flo@vstroke{flo@c}{0.2}{0.6}{0}{\flo@kept{cqr}}%
  \flo@vstroke{flo@c}{0.2}{0.35}{0}{\flo@kept{cqo}}}
% a columbine in profile (a spurred flower), in \flo@vtube's units: the stalk meets it at
% the origin, its face toward +y. Pointed sepals spread like a star, two swept back and
% two forward; three of its five spurs run back past the stalk, tapering to a knob, their
% tips drawn together or spread apart; the cup of petal blades in front (\flo@vtube's
% aqcup: paler, lobed, stamens out of it). #1 cm per unit
\def\flo@vaquilegia#1{%
  \edef\flo@aqu{#1}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@aqq{0.3}{0.4}\else\edef\flo@aqq{\flo@vf@tone}\fi
  % the sepals swept back
  \def\flo@ivc{0}\def\flo@ivpt{1}%
  \flo@loop{aqb}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{105}{135}\flo@calc\flo@a{90-\flo@sg*\flo@t}\flo@range\flo@len{0.32}{0.4}%
    \flo@sym\flo@b{0.08}\flo@calc\flo@tp{\flo@aqq-0.04}%
    \begin{pgfscope}\pgftransformshift{\flo@P0{0.12}}\flo@ivpart\flo@a\flo@len{0.14}\flo@b\flo@tp{0}{3}{0}\flo@aqu\end{pgfscope}}%
  % the spurs
  \flo@range\flo@aqh{0}{0.16}\def\flo@twb{0.024}%
  \flo@loop{aqs}\flo@ka{-1}{1}{%
    \flo@range\flo@len{0.38}{0.58}\flo@sym\flo@t{0.03}%
    \flo@calc\flo@xa{\the\flo@ka*0.08}\flo@calc\flo@xb{\the\flo@ka*0.16+\flo@t}\flo@calc\flo@yb{0.16-0.4*\flo@len}%
    \flo@calc\flo@xc{\the\flo@ka*0.14+\flo@t}\flo@calc\flo@yc{0.16-0.8*\flo@len}%
    \flo@calc\flo@xd{\the\flo@ka*(0.16-\flo@aqh)+\flo@t}\flo@calc\flo@yd{0.16-\flo@len}%
    \ifnum\flo@ka=0 \flo@calc\flo@tp{\flo@aqq-0.06}\else\edef\flo@tp{\flo@aqq}\fi
    \def\flo@twa{0.12}\flo@vtone{flo@c}{\flo@tp}%
    \flo@vfill{flo@c}{1}{0}{\flo@vtaper\flo@xa{0.16}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}%
    \ifdim\flo@aqu pt>0.15pt
      \def\flo@twa{0.018}\flo@calc\flo@xa{\flo@xa+0.025}\flo@calc\flo@xb{\flo@xb+0.018}\flo@calc\flo@xc{\flo@xc+0.01}%
      \flo@vfill{white}{0.35}{0}{\flo@vtaper\flo@xa{0.14}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}\fi
    \flo@calc\flo@t{\flo@tp-0.12}\flo@vtone{flo@c}{\flo@t}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xd\flo@yd}{0.03pt}}}%
  % the sepals swept forward
  \flo@loop{aqf}\flo@ka{0}{1}{%
    \ifnum\flo@ka=0 \def\flo@sg{-1}\else\def\flo@sg{1}\fi
    \flo@range\flo@t{45}{70}\flo@calc\flo@a{90-\flo@sg*\flo@t}\flo@range\flo@len{0.3}{0.38}%
    \flo@sym\flo@b{0.08}\flo@sym\flo@t{0.03}\flo@calc\flo@tp{\flo@aqq+\flo@t}%
    \begin{pgfscope}\pgftransformshift{\flo@P0{0.12}}\flo@ivpart\flo@a\flo@len{0.14}\flo@b\flo@tp{0}{3}{0}\flo@aqu\end{pgfscope}}%
  \def\flo@ivpt{0}%
  % the cup of petal blades, paler, in front
  \begin{pgfscope}\pgftransformshift{\flo@P0{0.08}}\flo@calc\flo@vf@tone{\flo@aqq+0.1}\flo@vtube\flo@aqu{aqcup}\end{pgfscope}}
% a daisy head, diameter 1: rays (flora's petals, narrow and round-tipped, as ligules are) around a disk of florets
\def\flo@sdaisy#1{%
  \edef\flo@nr{\flo@get{merosity}}\flo@range\flo@spin{0}{360}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.3}{0.46}\else\edef\flo@tq{\flo@vf@tone}\fi
  \flo@calc\flo@vu{(#1)*0.36/28.45276}%
  \flo@loop{ray}\flo@ka{1}{\flo@nr}{%
    \flo@sym\flo@t{4}\flo@calc\flo@a{\flo@spin+\the\flo@ka*360/\flo@nr+\flo@t-90}%
    \flo@range\flo@js{0.9}{1.05}\flo@sym\flo@t{0.04}\flo@calc\flo@tp{\flo@tq+\flo@t}%
    \flo@calc\flo@lw{min(0.17,1.6/\flo@nr)}%
    \begin{pgfscope}\pgftransformrotate{\flo@a}\pgftransformshift{\flo@P0{0.1}}\pgftransformscale{0.4}\pgftransformscale{\flo@js}%
      \def\flo@vp@pointed{0}\edef\flo@vp@W{\flo@lw}\def\flo@vp@bend{}\def\flo@vp@ns{2}\def\flo@vp@heart{0}%
      \edef\flo@vp@tone{\flo@tp}\edef\flo@vp@u{\flo@vu}\flo@vpetal\end{pgfscope}}%
  % the disk: deep copper, florets in spirals (Vogel 1979), paler toward the rim
  \let\flo@savedramp\flo@rampname\def\flo@rampname{flo@aramp}%
  \flo@vtone{flo@c}{0.3}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.105pt}}%
  \flo@calc\flo@nd{int(min(90,max(24,(#1)*1.2)))}%
  \flo@vtone{flo@c}{0.68}\flo@spk={}%
  \flo@loop{disk}\flo@ka{1}{\flo@nd}{%
    \flo@calc\flo@r{0.095*sqrt(\the\flo@ka/\flo@nd)}\flo@calc\flo@a{137.508*\the\flo@ka}%
    \flo@calc\flo@dx{\flo@r*cos(\flo@a)}\flo@calc\flo@dy{\flo@r*sin(\flo@a)}%
    \flo@calc\flo@dr{0.004+0.006*sqrt(\the\flo@ka/\flo@nd)}%
    \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@dx}{\flo@dy}}{\flo@dr pt}}%
    \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
  \flo@vfill{flo@c}{0.9}{0}{\the\flo@spk}%
  \let\flo@rampname\flo@savedramp}
% the rose family's boss, face on, in the flower's units (diameter about 1): a ring of many
% stamens, copper anthers, around a pale receptacle with the styles as dots
\def\flo@vboss{%
  \edef\flo@stm{\flo@get{stamens}}\def\flo@tmp{exserted}%
  \ifx\flo@stm\flo@tmp\def\flo@bl{0.04}\else\def\flo@bl{0}\fi
  \flo@int\flo@bn{36}{52}\flo@range\flo@bph{0}{360}%
  \flo@spk={}\flo@spa={}%
  \flo@loop{bos}\flo@Gc{1}{\flo@bn}{%
    \flo@sym\flo@t{4}\flo@calc\flo@a{\flo@bph+360/\flo@bn*\the\flo@Gc+\flo@t}%
    \flo@range\flo@t{0.09}{0.17}\flo@calc\flo@r{\flo@t+\flo@bl}%
    \flo@calc\flo@xa{0.035*cos(\flo@a)}\flo@calc\flo@ya{0.035*sin(\flo@a)}%
    \flo@calc\flo@xb{\flo@r*cos(\flo@a)}\flo@calc\flo@yb{\flo@r*sin(\flo@a)}%
    \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@ya}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xb}{\flo@yb}}}%
    \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}%
    \flo@range\flo@t{0.007}{0.011}%
    \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xb}{\flo@yb}}{\flo@t pt}}%
    \flo@spa\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spa\flo@tmp}}%
  \flo@vtone{flo@c}{0.14}\flo@vstroke{flo@c}{0.2}{0.8}{0}{\the\flo@spk}%
  \let\flo@savedramp\flo@rampname\def\flo@rampname{flo@aramp}%
  \flo@vtone{flo@c}{0.42}\flo@vfill{flo@c}{1}{0}{\the\flo@spa}%
  \flo@vtone{flo@c}{0.66}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.045pt}}%
  \let\flo@rampname\flo@savedramp
  \flo@vtone{flo@c}{0.2}\flo@vfill{flo@c}{0.9}{0}{\pgfpathcircle{\flo@P{0.014}{0.009}}{0.009pt}%
    \pgfpathcircle{\flo@P{-0.012}{0.013}}{0.009pt}\pgfpathcircle{\flo@P{-0.002}{-0.015}}{0.009pt}}}
% the leaf of the species along +y, length 1: its simple leaf (\flo@sleaf, lobed or toothed),
% a strap leaf for parallel veins, its leaflets (\flo@sleaflet) on a rachis for a compound
% leaf, a fern's frond; #1 its length on the page in pt
\def\flo@leaf#1{%
  \edef\flo@lfpt{#1}\def\flo@shd{0}%
  \ifx\flo@lsd\pgfutil@empty\else\edef\flo@t{\flo@get{attachment}}\def\flo@tmp{sheathing}%
    \ifx\flo@t\flo@tmp\flo@sheath\fi\fi
  \ifnum\flo@shd=1 \begin{pgfscope}\pgftransformshift{\flo@P\flo@shx\flo@shy}\flo@leaf@\flo@lfpt\end{pgfscope}%
  \else\flo@leaf@\flo@lfpt\fi}
% A sheathing leaf's base wrapped round the stem from the node up (a grass's or an
% umbellifer's), \flo@lsd degrees from the leaf's axis, \flo@lsw wide, in the leaf's units;
% the leaf goes on from its top, \flo@shx,\flo@shy
\def\flo@sheath{%
  \flo@range\flo@shl{0.14}{0.22}%
  \flo@calc\flo@shx{-\flo@shl*sin(\flo@lsd)}\flo@calc\flo@shy{\flo@shl*cos(\flo@lsd)}%
  \edef\flo@twa{\flo@lsw}\flo@calc\flo@twb{0.8*\flo@lsw}%
  \flo@calc\flo@xa{\flo@shx/3}\flo@calc\flo@ya{\flo@shy/3}\flo@calc\flo@xb{2*\flo@shx/3}\flo@calc\flo@yb{2*\flo@shy/3}%
  \flo@vtone{flo@c}{0.34}\flo@vfill{flo@c}{1}{0}{\flo@vtaper{0}{0}\flo@xa\flo@ya\flo@xb\flo@yb\flo@shx\flo@shy}%
  \flo@vtone{flo@c}{0.08}\flo@vstroke{flo@c}{0.2}{0.6}{0}{\flo@vtaper{0}{0}\flo@xa\flo@ya\flo@xb\flo@yb\flo@shx\flo@shy}%
  \def\flo@shd{1}}
\def\flo@leaf@#1{%
  \edef\flo@lfpt{#1}\edef\flo@cp{\flo@get{compound}}\edef\flo@ve{\flo@get{venation}}%
  \flo@calc\flo@vl@u{(\flo@lfpt)/28.45276}%
  \def\flo@tmp{simple}%
  \ifx\flo@cp\flo@tmp
    \def\flo@tmp{parallel}%
    \ifx\flo@ve\flo@tmp
      \flo@calc\flo@lW{max(0.025,min(0.12,0.42/\flo@get{leafaspect}))}\flo@vstrap
    \else
      \ifdefined\flo@sbend\let\flo@vl@bend\flo@sbend\else\def\flo@vl@bend{}\fi\def\flo@vl@tone{}%
      \edef\flo@lm{\flo@get{leafmargin}}\def\flo@vl@depth{0}\def\flo@vl@lobes{3}%
      \def\flo@tmp{lobed}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
      \def\flo@tmp{pinnatifid}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
      \def\flo@tmp{palmatelobed}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
      \def\flo@tmp{x}\ifx\flo@vl@depth\flo@tmp
        \flo@calc\flo@vl@depth{min(0.85,max(0.3,\flo@get{dissection}))}%
        \flo@calc\flo@t{max(2,min(6,\flo@get{teeth}))}\pgfmathtruncatemacro\flo@vl@lobes{\flo@t}\fi
      \flo@sleaf
    \fi
  \else\def\flo@tmp{frond}\ifx\flo@cp\flo@tmp\flo@frond\flo@lfpt\else
    \flo@range\flo@lt{0.24}{0.4}%
    % stipules at the foot, small or (a pea's) leafy
    \edef\flo@t{\flo@get{stipules}}\def\flo@tmp{none}%
    \ifx\flo@t\flo@tmp\else
      \def\flo@tmp{leafy}%
      \ifx\flo@t\flo@tmp\def\flo@sta{0.1}\def\flo@stb{0.16}\def\flo@vl@W{0.36}\else\def\flo@sta{0.05}\def\flo@stb{0.08}\def\flo@vl@W{0.3}\fi
      \flo@loop{cstip}\flo@kc{0}{1}{%
        \flo@range\flo@t{55}{80}\ifnum\flo@kc=1 \flo@calc\flo@t{-\flo@t}\fi\flo@range\flo@ts{\flo@sta}{\flo@stb}%
        \begin{pgfscope}%
          \pgftransformshift{\flo@P0{0.01}}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@ts}%
          \def\flo@vl@tone{0.3}\flo@calc\flo@vl@u{\flo@lfpt*\flo@ts/28.45276}\flo@vleaflet
        \end{pgfscope}}%
    \fi
    \flo@tone{flo@c}{0.07}{flo@ink}\pgfsetstrokecolor{flo@c}%
    \flo@calc\flo@lw{max(0.25,0.006*(\flo@lfpt))}\pgfsetlinewidth{\flo@lw bp}\pgfsetroundcap
    \edef\flo@ptend{\flo@get{tendrils}}%
    \def\flo@tmp{pinnate}\ifx\flo@cp\flo@tmp\flo@calc\flo@t{int(min(7,\flo@get{leaflets}))}\flo@pinnate\flo@lfpt\flo@t{0.4}\fi
    \def\flo@tmp{bipinnate}\ifx\flo@cp\flo@tmp\flo@bipinnate\flo@lfpt\fi
    \def\flo@tmp{palmate}\ifx\flo@cp\flo@tmp\flo@palmate\flo@lfpt{\flo@get{leaflets}}\fi
    \def\flo@tmp{trifoliate}\ifx\flo@cp\flo@tmp\flo@trifoliate\flo@lfpt\fi
  \fi\fi}
% a leaflet of a compound leaf in the species' hand (\flo@sblade): its shape, apex, base
% and margin, with no stalk or stipules, two or three lobes a side (under 7 mm, scallops
% instead, or a pinnatifid leaflet's deep teeth: \flo@lmover); along +y, length 1; #1 its
% tone, \flo@vl@u its length on the page in cm
\def\flo@sleaflet#1{%
  \def\flo@vl@bend{}\edef\flo@vl@tone{#1}\def\flo@vl@depth{0}\def\flo@vl@lobes{3}%
  \edef\flo@lm{\flo@get{leafmargin}}%
  \def\flo@tmp{lobed}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
  \def\flo@tmp{pinnatifid}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
  \def\flo@tmp{palmatelobed}\ifx\flo@lm\flo@tmp\def\flo@vl@depth{x}\fi
  \def\flo@lmover{}\def\flo@tmp{x}%
  \ifx\flo@vl@depth\flo@tmp
    \ifdim\flo@vl@u pt<0.7pt \def\flo@vl@depth{0}\def\flo@lmover{crenate}%
      \def\flo@tmp{pinnatifid}\ifx\flo@lm\flo@tmp\def\flo@lmover{dentate}\fi\else
    \flo@calc\flo@vl@depth{min(0.85,max(0.3,\flo@get{dissection}))}%
    \flo@calc\flo@t{max(2,min(3,\flo@get{teeth}))}\pgfmathtruncatemacro\flo@vl@lobes{\flo@t}\fi\fi
  \flo@sshape@
  \flo@calc\flo@lsc{min(1,0.3/\flo@lW)}%
  \def\flo@tmp{palmatelobed}\ifx\flo@lm\flo@tmp\flo@calc\flo@lsc{min(1,0.3/max(\flo@lW,0.55))}\fi
  \begin{pgfscope}%
    \ifdim\flo@lsc pt<1pt \pgftransformscale{\flo@lsc}\flo@calc\flo@vl@u{\flo@vl@u*\flo@lsc}\fi
    \def\flo@lleaflet{1}\flo@sblade
  \end{pgfscope}}

% flora.blossom: a small flower of #2 round petals (flora: 5), radius 1; #1 its radius on
% the page in cm (no random part); tone \flo@vf@tone (empty: drawn)
\def\flo@vblossom#1#2{%
  \edef\flo@bnp{#2}\flo@range\flo@spin{0}{72}%
  \ifx\flo@vf@tone\pgfutil@empty\flo@range\flo@tq{0.30}{0.45}\else\edef\flo@tq{\flo@vf@tone}\fi
  \flo@loop{bls}\flo@ka{0}{\flo@bnp-1}{%
    \flo@sym\flo@t{8}\flo@calc\flo@a{\flo@spin+\the\flo@ka*360/\flo@bnp+\flo@t}\flo@range\flo@js{0.9}{1.08}%
    \flo@range\flo@pW{0.36}{0.44}%
    \begin{pgfscope}\pgftransformrotate{\flo@a}\pgftransformscale{\flo@js}%
      \def\flo@vp@pointed{0}%
      \flo@loop{blo}\flo@kb{0}{18}{%
        \flo@calc\flo@v{\the\flo@kb/18}\flo@vhalf\flo@v\edef\flo@q{\the\numexpr\flo@kb+1\relax}%
        \flo@calc\flo@xl{-\flo@h}\expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@v
        \expandafter\let\csname flo@QX\flo@q\endcsname\flo@h\expandafter\let\csname flo@QY\flo@q\endcsname\flo@v}%
      \flo@bladeassemble{18}\flo@smoothprep{36}\flo@keep{bl}%
      \flo@sym\flo@t{0.05}\flo@vtone{flo@c}{\flo@tq+\flo@t}\flo@vfill{flo@c}{1}{0}{\flo@kept{bl}}%
      \begin{pgfscope}\flo@kept{bl}\pgfusepath{clip}%
        \flo@sym\flo@mx{0.2}\flo@range\flo@my{0.5}{0.9}%
        \flo@vblob\flo@mx\flo@my{0.35}{0.3}{0.3}{8}\flo@vtone{flo@c}{\flo@tq-0.2}\flo@vfill{flo@c}{0.3}{1}{\flo@smoothpath}%
        \def\flo@twa{0.12}\def\flo@twb{0.01}\flo@sym\flo@t{0.05}%
        \flo@vfill{white}{0.7}{0}{\flo@vtaper{0}{0}{0.02}{0.2}{-0.02}{0.4}\flo@t{0.55}}%
        \flo@vtone{flo@c}{0.08}\flo@calc\flo@t{1.2*(#1)}\flo@vstroke{flo@c}{\flo@t}{0.25}{1}{\flo@kept{bl}}%
      \end{pgfscope}%
    \end{pgfscope}}%
  \flo@vfill{white}{0.85}{0}{\pgfpathcircle{\flo@P00}{0.22pt}}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P00}{0.09pt}}}


% ================================================================ ferns
% A fern's frond along +y, length 1: the stipe from the origin, then the rachis through the
% blade, turning \flo@fearch degrees by its tip (+ to the left; empty: drawn from the
% species' curl), as fronds arch over. Its pinnae come in pairs, a little alternate, inside
% the blade's outline, spread at the foot and swept forward toward the tip, as wide as their
% spacing allows and curving toward the tip; once divided, each pinna is a blade with the
% species' tip and edge; twice, a comb of pinnules; three times, pinnules lobed in turn. Set
% before: \flo@feun, how far it has unrolled (1 open; below 0.97 the rest of the blade is
% still rolled in a crozier at the top, the pinnae just below it still small);
% \flo@fefert 1 for a dimorphic fern's fertile frond (narrow, its pinnae rows of beads, in
% the accent); \flo@feund 1 for a frond turned to show its underside (paler, with the sori
% in the accent, darkened). #1 its length on the page in pt
\def\flo@feun{1}\def\flo@fefert{0}\def\flo@feund{0}\def\flo@fearch{}
\def\flo@feput#1#2#3{\expandafter\edef\csname flo@feX#1\endcsname{#2}\expandafter\edef\csname flo@feY#1\endcsname{#3}}
\def\flo@fex@#1{\csname flo@feX#1\endcsname}\def\flo@fey@#1{\csname flo@feY#1\endcsname}
% the outline: its widest point, the share of the longest pinna at the foot, how the tip
% narrows, the longest pinna to the blade
\def\flo@feol@lanceolate{\def\flo@febm{0.3}\def\flo@felo{0.45}\def\flo@fekx{0.8}\def\flo@fewr{0.26}}
\def\flo@feol@oblong{\def\flo@febm{0.12}\def\flo@felo{0.7}\def\flo@fekx{0.35}\def\flo@fewr{0.2}}
\def\flo@feol@ovate{\def\flo@febm{0.2}\def\flo@felo{0.75}\def\flo@fekx{0.9}\def\flo@fewr{0.32}}
\def\flo@feol@deltoid{\def\flo@febm{0.04}\def\flo@felo{0.9}\def\flo@fekx{1.3}\def\flo@fewr{0.42}}
% a pinna's tip (how its sides close) and edge (scallops or teeth, their depth)
\def\flo@feap@acute{\def\flo@fekp{1.6}\def\flo@fekq{0.9}}
\def\flo@feap@obtuse{\def\flo@fekp{3}\def\flo@fekq{0.6}}
\def\flo@feap@rounded{\def\flo@fekp{5}\def\flo@fekq{0.45}}
\def\flo@fem@entire{\def\flo@fetd{0}}\def\flo@fem@crenate{\def\flo@fetd{0.2}}\def\flo@fem@serrate{\def\flo@fetd{0.26}}
\def\flo@frond#1{%
  \edef\flo@fept{#1}\flo@calc\flo@fecm{(#1)/28.45276}%
  \ifx\flo@fearch\pgfutil@empty\flo@sym\flo@t{1}\flo@calc\flo@fearch{\flo@t*(20+70*\flo@get{curl})}\fi
  \ifdim\flo@feun pt<0.97pt \else\def\flo@feun{1}\fi
  \ifnum\flo@fefert=1 \def\flo@rampname{flo@aramp}\fi
  \edef\flo@fest{\flo@get{stipe}}\edef\flo@fen{\flo@get{pinnae}}\edef\flo@fediv{\flo@get{division}}%
  \csname flo@feol@\flo@get{outline}\endcsname\csname flo@feap@\flo@get{leafapex}\endcsname
  \csname flo@fem@\flo@get{leafmargin}\endcsname
  \edef\flo@fesh{\flo@get{leafshape}}\def\flo@tmp{lanceolate}%
  \ifx\flo@fesh\flo@tmp\def\flo@fenar{0.3}\else\def\flo@fenar{0}\fi
  % the open part: the stipe and the blade up to \flo@feo (a young frond's axis lengthens
  % before its blade unrolls); its spine in 32 steps
  \flo@calc\flo@feo{\flo@fest+(1-\flo@fest)*(\flo@feun<1 ? 0.3+0.7*\flo@feun : 1)}%
  \def\flo@fex{0}\def\flo@fey{0}\flo@feput1{0}{0}%
  \flo@loop{fesp}\flo@kb{1}{32}{%
    \flo@calc\flo@t{\flo@feo*(\the\flo@kb-0.5)/32}\flo@calc\flo@fea{90+\flo@fearch*pow(\flo@t,1.5)}%
    \flo@calc\flo@fex{\flo@fex+\flo@feo/32*cos(\flo@fea)}\flo@calc\flo@fey{\flo@fey+\flo@feo/32*sin(\flo@fea)}%
    \flo@feput{\the\numexpr\flo@kb+1\relax}\flo@fex\flo@fey}%
  % the crozier: the rest of the blade rolled toward the side the frond arches, a spiral of
  % 24 steps closing to a quarter of its radius, \flo@fecT degrees in all (fewer as it
  % unrolls), as long as two thirds of the blade it holds; points 34..57
  \ifdim\flo@feun pt<1pt
    \ifdim\flo@fearch pt<0pt \def\flo@fesg{-1}\else\def\flo@fesg{1}\fi
    \flo@calc\flo@fecT{100+440*(1-\flo@feun)}%
    \flo@calc\flo@fecr{0.65*(1-\flo@feo)/(\flo@fecT*0.0174533*0.541)}%
    \flo@calc\flo@fea{90+\flo@fearch*pow(\flo@feo,1.5)}%
    \flo@loop{fecl}\flo@kb{1}{24}{%
      \flo@calc\flo@fea{\flo@fea+\flo@fesg*\flo@fecT/24}%
      \flo@calc\flo@t{\flo@fecr*pow(0.25,(\the\flo@kb-0.5)/24)*\flo@fecT/24*0.0174533}%
      \flo@calc\flo@fex{\flo@fex+\flo@t*cos(\flo@fea)}\flo@calc\flo@fey{\flo@fey+\flo@t*sin(\flo@fea)}%
      \flo@feput{\the\numexpr\flo@kb+33\relax}\flo@fex\flo@fey}%
  \fi
  % the pinnae, pair by pair from the foot; the longest \flo@fepm, the frond's tone
  \flo@range\flo@t{0.9}{1.1}\flo@calc\flo@fepm{(1-\flo@fest)*\flo@fewr*\flo@t}%
  \ifnum\flo@fefert=1 \flo@calc\flo@fepm{0.45*\flo@fepm}\fi
  \flo@range\flo@fetone{0.24}{0.34}\ifnum\flo@feund=1 \flo@calc\flo@fetone{\flo@fetone+0.14}\fi
  \flo@loop{fepn}\flo@Gd{1}{\flo@fen}{%
    \flo@loop{feps}\flo@Ge{0}{1}{%
      \flo@calc\flo@feb{0.93*pow((\the\flo@Gd-0.5+0.42*\the\flo@Ge)/\flo@fen,0.85)}%
      \flo@calc\flo@fes{\flo@fest+(1-\flo@fest)*\flo@feb}%
      \ifdim\flo@feb pt<\flo@febm pt \flo@calc\flo@fee{\flo@felo+(1-\flo@felo)*sin(90*\flo@feb/\flo@febm)}%
      \else\flo@calc\flo@fee{pow(max(0.0001,cos(90*(\flo@feb-\flo@febm)/(1-\flo@febm))),\flo@fekx)}\fi
      \ifdim\flo@feun pt<1pt \flo@calc\flo@fee{\flo@fee*max(0,min(1,0.3+0.7*(\flo@feo-\flo@fes)/0.15))}\fi
      \flo@range\flo@t{0.92}{1.06}\flo@calc\flo@fel{\flo@fepm*\flo@fee*\flo@t}%
      \flo@sym\flo@t{4}\flo@calc\flo@fal{70-30*\flo@feb+\flo@t}%
      \flo@calc\flo@fepcm{\flo@fel*\flo@fecm}%
      \flo@calc\flo@t{\flo@fes<\flo@feo-0.004 && \flo@fepcm>0.08 ? 1 : 0}%
      \ifdim\flo@t pt>0.5pt
        % two thirds as wide as the gap to the next pinna on its side
        \flo@calc\flo@t{0.93*(1-\flo@fest)*(pow((\the\flo@Gd+0.5)/\flo@fen,0.85)-pow((\the\flo@Gd-0.5)/\flo@fen,0.85))}%
        \flo@calc\flo@feW{min(0.22,0.34*\flo@t*sin(\flo@fal)/\flo@fel)}%
        % where it leaves the rachis, and the rachis' direction there
        \flo@calc\flo@t{\flo@fes/\flo@feo*32}\pgfmathtruncatemacro\flo@fei{\flo@t}\flo@calc\flo@fef{\flo@t-\flo@fei}%
        \edef\flo@fia{\the\numexpr\flo@fei+1\relax}\edef\flo@fib{\the\numexpr\flo@fei+2\relax}%
        \flo@calc\flo@fpx{\flo@fex@\flo@fia+(\flo@fex@\flo@fib-(\flo@fex@\flo@fia))*\flo@fef}%
        \flo@calc\flo@fpy{\flo@fey@\flo@fia+(\flo@fey@\flo@fib-(\flo@fey@\flo@fia))*\flo@fef}%
        \flo@calc\flo@fea{90+\flo@fearch*pow(\flo@fes,1.5)}%
        \begin{pgfscope}%
          \pgftransformshift{\flo@P\flo@fpx\flo@fpy}%
          \ifnum\flo@Ge=0 \flo@calc\flo@t{\flo@fea+\flo@fal-90}\else\flo@calc\flo@t{\flo@fea-\flo@fal-90}\fi
          \pgftransformrotate{\flo@t}\ifnum\flo@Ge=1 \pgftransformxscale{-1}\fi\pgftransformscale{\flo@fel}%
          \ifnum\flo@fefert=1 \flo@febeads
          \else\ifnum\flo@fediv>1 \ifdim\flo@fepcm pt>0.45pt \flo@fecomb\else\flo@fepinna\fi\else\flo@fepinna\fi\fi
        \end{pgfscope}%
      \fi}}%
  % an open frond ends in a pinna-like tip along the rachis
  \ifdim\flo@feun pt<1pt\else\ifnum\flo@fefert=0
    \flo@calc\flo@fes{\flo@fest+0.91*(1-\flo@fest)}\flo@calc\flo@fel{0.1*(1-\flo@fest)}%
    \flo@calc\flo@t{\flo@fes*32}\pgfmathtruncatemacro\flo@fei{\flo@t}\flo@calc\flo@fef{\flo@t-\flo@fei}%
    \edef\flo@fia{\the\numexpr\flo@fei+1\relax}\edef\flo@fib{\the\numexpr\flo@fei+2\relax}%
    \flo@calc\flo@fpx{\flo@fex@\flo@fia+(\flo@fex@\flo@fib-(\flo@fex@\flo@fia))*\flo@fef}%
    \flo@calc\flo@fpy{\flo@fey@\flo@fia+(\flo@fey@\flo@fib-(\flo@fey@\flo@fia))*\flo@fef}%
    \flo@calc\flo@fea{90+\flo@fearch*pow(\flo@fes,1.5)}\def\flo@feW{0.13}\flo@calc\flo@fepcm{\flo@fel*\flo@fecm}%
    \begin{pgfscope}\pgftransformshift{\flo@P\flo@fpx\flo@fpy}\flo@calc\flo@t{\flo@fea-90}\pgftransformrotate{\flo@t}%
      \pgftransformscale{\flo@fel}\flo@fepinna\end{pgfscope}%
  \fi\fi
  % the stipe and rachis, dark, over the pinnae's feet
  \flo@loop{fecp}\flo@kb{1}{33}{\flo@put{\the\flo@kb}{\flo@fex@{\the\flo@kb}}{\flo@fey@{\the\flo@kb}}}%
  \flo@calc\flo@fewb{0.0025+0.006*(1-\flo@feun)}\flo@vtone{flo@c}{0.1}\flo@feribbon{33}{0.012}\flo@fewb
  % scales on the stipe, brown, on a scaly fern
  \ifnum\flo@get{hairy}=1
    \flo@spk={}%
    \flo@loop{fesc}\flo@kb{2}{32}{%
      \flo@calc\flo@t{\flo@feo*(\the\flo@kb-1)/32<0.9*\flo@fest && mod(\the\flo@kb,2)==0 ? 1 : 0}%
      \ifdim\flo@t pt>0.5pt
        \edef\flo@fia{\the\numexpr\flo@kb+1\relax}%
        \flo@calc\flo@da{\flo@fex@\flo@fia-(\flo@fex@{\the\flo@kb})}\flo@calc\flo@db{\flo@fey@\flo@fia-(\flo@fey@{\the\flo@kb})}%
        \flo@nrm\flo@da\flo@db\flo@nax\flo@nay
        \flo@calc\flo@t{mod(\the\flo@kb,4)==0 ? 1 : -1}\flo@range\flo@ts{0.012}{0.02}%
        \flo@calc\flo@xa{\flo@fex@{\the\flo@kb}+\flo@t*\flo@nax*0.005}\flo@calc\flo@ya{\flo@fey@{\the\flo@kb}+\flo@t*\flo@nay*0.005}%
        \flo@calc\flo@xb{\flo@xa+\flo@t*\flo@nax*\flo@ts+\flo@da*12*\flo@ts}\flo@calc\flo@yb{\flo@ya+\flo@t*\flo@nay*\flo@ts+\flo@db*12*\flo@ts}%
        \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@ya}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xb}{\flo@yb}}}%
        \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}%
      \fi}%
    \flo@vaccent{flo@c}{-0.3}\flo@vstroke{flo@c}{0.35}{0.85}{0}{\the\flo@spk}%
  \fi
  % the crozier: a coil thick with the pinnae rolled in it, scalloped along its outside,
  % a pale line along it
  \ifdim\flo@feun pt<1pt
    \flo@loop{fecc}\flo@kb{1}{25}{\flo@put{\the\flo@kb}{\flo@fex@{\the\numexpr\flo@kb+32\relax}}{\flo@fey@{\the\numexpr\flo@kb+32\relax}}}%
    \flo@normals{25}\flo@spk={}%
    \flo@loop{fecb}\flo@kb{2}{24}{%
      \flo@calc\flo@r{\flo@fecr*pow(0.25,(\the\flo@kb-1)/24)}%
      \flo@calc\flo@xa{\flo@x{\the\flo@kb}-\flo@fesg*\csname flo@NX\the\flo@kb\endcsname*0.33*\flo@r}%
      \flo@calc\flo@ya{\flo@y{\the\flo@kb}-\flo@fesg*\csname flo@NY\the\flo@kb\endcsname*0.33*\flo@r}%
      \flo@calc\flo@t{(\ifodd\flo@kb 0.15\else 0.21\fi)*\flo@r}%
      \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@t pt}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \flo@calc\flo@fewa{0.56*\flo@fecr}\flo@calc\flo@fewb{0.16*\flo@fecr}%
    \flo@vtone{flo@c}{0.27}\flo@feribbon{25}\flo@fewa\flo@fewb
    \flo@vtone{flo@c}{0.2}\flo@vfill{flo@c}{1}{0}{\the\flo@spk}%
    \flo@vtone{flo@c}{0.06}\flo@vstroke{flo@c}{0.25}{0.35}{1}{\the\flo@spk}%
    \flo@loop{fecd}\flo@kb{1}{22}{\flo@put{\the\flo@kb}{\flo@fex@{\the\numexpr\flo@kb+32\relax}}{\flo@fey@{\the\numexpr\flo@kb+32\relax}}}%
    \flo@calc\flo@fewa{0.14*\flo@fecr}\flo@vstreak{22}\flo@fewa{0.002}{white}{0.5}%
  \fi}
% a filled ribbon along points 1..#1 of flo@X/Y, widths #2 to #3 in the drawing's units
% (read at each point: not \flo@t, which \flo@normals takes), in the color flo@c
% (\flo@vstem's ribbon)
\def\flo@feribbon#1#2#3{%
  \edef\flo@sn{\the\numexpr#1\relax}\flo@normals\flo@sn
  \def\flo@acc{0}\expandafter\def\csname flo@S1\endcsname{0}%
  \flo@loop{fera}\flo@kb{2}{\flo@sn}{%
    \edef\flo@ia{\the\numexpr\flo@kb-1\relax}%
    \flo@calc\flo@acc{\flo@acc+veclen(\flo@x{\the\flo@kb}-(\flo@x\flo@ia),\flo@y{\the\flo@kb}-(\flo@y\flo@ia))}%
    \expandafter\let\csname flo@S\the\flo@kb\endcsname\flo@acc}%
  \flo@loop{ferr}\flo@kb{1}{\flo@sn}{%
    \flo@calc\flo@w{((#2)+((#3)-(#2))*\csname flo@S\the\flo@kb\endcsname/\flo@acc)/2}%
    \flo@calc\flo@xl{\flo@x{\the\flo@kb}+\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@yl{\flo@y{\the\flo@kb}+\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@xr{\flo@x{\the\flo@kb}-\csname flo@NX\the\flo@kb\endcsname*\flo@w}%
    \flo@calc\flo@yr{\flo@y{\the\flo@kb}-\csname flo@NY\the\flo@kb\endcsname*\flo@w}%
    \expandafter\let\csname flo@RX\the\flo@kb\endcsname\flo@xl\expandafter\let\csname flo@RY\the\flo@kb\endcsname\flo@yl
    \expandafter\let\csname flo@QX\the\flo@kb\endcsname\flo@xr\expandafter\let\csname flo@QY\the\flo@kb\endcsname\flo@yr}%
  \flo@loop{fero}\flo@kb{1}{\flo@sn}{%
    \flo@put{\the\flo@kb}{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}%
    \flo@put{\the\numexpr2*\flo@sn+1-\flo@kb\relax}{\csname flo@QX\the\flo@kb\endcsname}{\csname flo@QY\the\flo@kb\endcsname}}%
  \flo@smoothprep{\the\numexpr2*\flo@sn\relax}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}}
% a pinna (or pinnule, or a frond's tip) along +y, length 1, \flo@feW its half-width, curving
% toward the frond's tip (+x); \flo@fepcm its length in cm. Its sides close by the species'
% tip, narrow toward it if lanceolate, and on a pinna 6 mm long or more go in and out by
% the species' edge (2 points a tooth, a tooth's crest set forward if serrate). Then the
% darker half away from the tip, the white midrib, and the sori on an underside
\def\flo@fepinna{%
  \flo@range\flo@fefb{0.05}{0.16}\flo@sym\flo@t{0.03}\flo@calc\flo@fet{\flo@fetone+\flo@t}%
  \def\flo@fenp{10}\def\flo@fetk{0}%
  \ifdim\flo@fepcm pt<0.3pt \def\flo@fenp{6}\fi
  \ifdim\flo@fepcm pt>0.6pt \ifdim\flo@fetd pt>0pt
    \edef\flo@fetk{\flo@fetd}\flo@calc\flo@fenp{2*int(min(9,3+4*\flo@fepcm))}\pgfmathtruncatemacro\flo@fenp{\flo@fenp}\fi\fi
  \def\flo@fecs{0}\def\flo@tmp{serrate}\edef\flo@t{\flo@get{leafmargin}}%
  \ifdim\flo@fetk pt>0pt \ifx\flo@t\flo@tmp\flo@calc\flo@fecs{0.35/\flo@fenp}\fi\fi
  \flo@loop{fpsp}\flo@kb{0}{\flo@fenp}{%
    \flo@calc\flo@v{\the\flo@kb/\flo@fenp}%
    \ifodd\flo@kb\ifnum\flo@kb<\flo@fenp \flo@calc\flo@v{\flo@v+\flo@fecs}\fi\fi
    \flo@calc\flo@sx{\flo@fefb*\flo@v*\flo@v}\flo@put{\the\numexpr\flo@kb+1\relax}{\flo@sx}{\flo@v}}%
  \flo@normals{\the\numexpr\flo@fenp+1\relax}%
  \flo@loop{fpsw}\flo@kb{0}{\flo@fenp}{%
    \edef\flo@q{\the\numexpr\flo@kb+1\relax}\edef\flo@v{\flo@y\flo@q}%
    \ifdim\flo@v pt>0pt \ifdim\flo@v pt<1pt
      \flo@calc\flo@w{\flo@feW*pow(min(1,\flo@v/0.12),0.45)*pow(max(0.0001,1-pow(\flo@v,\flo@fekp)),\flo@fekq)*(1-\flo@fenar*\flo@v)}%
      \ifodd\flo@kb\else\flo@calc\flo@w{\flo@w*(1-\flo@fetk)}\fi
    \else\def\flo@w{0}\fi\else\def\flo@w{0}\fi
    \flo@calc\flo@xl{\flo@x\flo@q+\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yl{\flo@y\flo@q+\csname flo@NY\flo@q\endcsname*\flo@w}%
    \flo@calc\flo@xr{\flo@x\flo@q-\csname flo@NX\flo@q\endcsname*\flo@w}\flo@calc\flo@yr{\flo@y\flo@q-\csname flo@NY\flo@q\endcsname*\flo@w}%
    \expandafter\let\csname flo@RX\flo@q\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@q\endcsname\flo@yl
    \expandafter\let\csname flo@QX\flo@q\endcsname\flo@xr\expandafter\let\csname flo@QY\flo@q\endcsname\flo@yr}%
  \flo@bladeassemble\flo@fenp\flo@smoothprep{\the\numexpr2*\flo@fenp\relax}\flo@keep{fep}%
  \flo@vtone{flo@c}{\flo@fet}\flo@vfill{flo@c}{1}{0}{\flo@kept{fep}}%
  \ifdim\flo@fepcm pt>0.2pt \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.28}{1}{\flo@fehalf{fep}\flo@fenp}\fi
  \ifdim\flo@fepcm pt>0.35pt
    \def\flo@twa{0.03}\def\flo@twb{0.004}%
    \flo@calc\flo@xb{\flo@fefb*0.82*0.82/3}\flo@calc\flo@xc{\flo@fefb*0.82*0.82}%
    \flo@vfill{white}{0.6}{0}{\flo@vtaper{0}{0}{0}{0.2733}\flo@xb{0.5467}\flo@xc{0.82}}%
  \fi
  \ifnum\flo@feund=1 \ifdim\flo@fepcm pt>0.35pt \flo@fesori{fep}\fi\fi}
% the half of kept shape #1 (#2 points a side) on its left, from its base to its tip, then
% back down the midrib (\flo@fefb's parabola)
\def\flo@fehalf#1#2{%
  \edef\flo@kn{\csname flo@#1@N\endcsname}\edef\flo@fehn{#2}%
  \pgfpathmoveto{\flo@P{\csname flo@#1@X1\endcsname}{\csname flo@#1@Y1\endcsname}}%
  \flo@loop{feh}\flo@i{1}{\flo@fehn}{%
    \edef\flo@ib{\the\numexpr\flo@i+1\relax}%
    \pgfpathcurveto{\flo@P{\csname flo@#1@A\the\flo@i\endcsname}{\csname flo@#1@B\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@#1@C\the\flo@i\endcsname}{\csname flo@#1@D\the\flo@i\endcsname}}%
      {\flo@P{\csname flo@#1@X\flo@ib\endcsname}{\csname flo@#1@Y\flo@ib\endcsname}}}%
  \flo@loop{fehm}\flo@i{1}{8}{\flo@calc\flo@v{1-\the\flo@i/8}\flo@calc\flo@sx{\flo@fefb*\flo@v*\flo@v}%
    \pgfpathlineto{\flo@P\flo@sx\flo@v}}%
  \pgfpathclose}
% the sori under kept shape #1 (a pinna): two rows of dots beside the midrib, lines slanting
% out from it, or a band along the edge; the accent, darkened
\def\flo@fesori#1{%
  \edef\flo@fesr{\flo@get{sori}}\flo@vaccent{flo@c}{-0.35}%
  \def\flo@tmp{marginal}\ifx\flo@fesr\flo@tmp
    \flo@calc\flo@t{min(0.5,0.3*\flo@fepcm)}\flo@vstroke{flo@c}{\flo@t}{0.75}{0}{\flo@kept{#1}}\fi
  \def\flo@tmp{dots}\ifx\flo@fesr\flo@tmp
    \flo@spk={}\flo@calc\flo@t{int(min(7,2+4*\flo@fepcm))}\pgfmathtruncatemacro\flo@fend{\flo@t}%
    \flo@loop{fesd}\flo@kb{1}{\flo@fend}{%
      \flo@calc\flo@v{0.14+0.66*(\the\flo@kb-1)/max(1,\flo@fend-1)}\flo@calc\flo@sx{\flo@fefb*\flo@v*\flo@v}%
      \flo@calc\flo@w{0.5*\flo@feW*(1-0.5*\flo@v)}\flo@calc\flo@t{0.3*\flo@feW*(1-0.4*\flo@v)}%
      \flo@calc\flo@xa{\flo@sx-\flo@w}\flo@calc\flo@xb{\flo@sx+\flo@w}%
      \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@v}}{\flo@t pt}\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xb}{\flo@v}}{\flo@t pt}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \flo@vfill{flo@c}{0.9}{0}{\the\flo@spk}%
  \fi
  \def\flo@tmp{lines}\ifx\flo@fesr\flo@tmp
    \flo@spk={}\flo@calc\flo@t{int(min(6,2+3*\flo@fepcm))}\pgfmathtruncatemacro\flo@fend{\flo@t}%
    \flo@loop{fesl}\flo@kb{1}{\flo@fend}{%
      \flo@calc\flo@v{0.12+0.62*(\the\flo@kb-1)/max(1,\flo@fend-1)}\flo@calc\flo@sx{\flo@fefb*\flo@v*\flo@v}%
      \flo@calc\flo@w{0.7*\flo@feW*(1-0.5*\flo@v)}%
      \flo@calc\flo@xa{\flo@sx-0.15*\flo@w}\flo@calc\flo@xb{\flo@sx-\flo@w}\flo@calc\flo@ya{\flo@v+0.6*\flo@w}%
      \flo@calc\flo@xc{\flo@sx+0.15*\flo@w}\flo@calc\flo@xd{\flo@sx+\flo@w}%
      \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@v}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xb}{\flo@ya}}%
        \noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xc}{\flo@v}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xd}{\flo@ya}}}%
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \flo@vstroke{flo@c}{0.45}{0.85}{0}{\the\flo@spk}%
  \fi}
% a pinna cut into pinnules (twice divided): a comb along +y, length 1, \flo@feW the longest
% pinnule, \flo@fecn pinnules a side, each set forward and shorter toward the pinna's tip,
% joined by a narrow wing; three times divided, each pinnule's sides go in once (lobed).
% The darker half, the midrib, the sori as for a pinna
\def\flo@fecomb{%
  \flo@range\flo@fefb{0.04}{0.12}\flo@sym\flo@t{0.03}\flo@calc\flo@fet{\flo@fetone+\flo@t}%
  \flo@calc\flo@t{int(max(3,min(9,\flo@fepcm/0.15)))}\pgfmathtruncatemacro\flo@fecn{\flo@t}%
  \flo@calc\flo@fecd{0.9/\flo@fecn}\flo@calc\flo@fecs{0.35*\flo@fecd}%
  % one side's points into flo@RX/RY (x < 0, base to tip), the other mirrored
  \def\flo@fecp{1}\expandafter\def\csname flo@RX1\endcsname{0}\expandafter\def\csname flo@RY1\endcsname{0}%
  \flo@loop{fecm}\flo@kb{1}{\flo@fecn}{%
    \flo@calc\flo@v{0.05+\flo@fecd*(\the\flo@kb-0.5)}\flo@range\flo@t{0.9}{1.06}%
    \flo@calc\flo@fecl{\flo@feW*(1-0.72*pow(\flo@v,1.5))*\flo@t}%
    \ifnum\flo@fediv>2
      \flo@fecpt{0.12*\flo@feW}{\flo@v-0.5*\flo@fecd}\flo@fecpt{0.5*\flo@fecl}{\flo@v-0.4*\flo@fecd+0.3*\flo@fecs}%
      \flo@fecpt{0.62*\flo@fecl}{\flo@v-0.2*\flo@fecd+0.55*\flo@fecs}\flo@fecpt{\flo@fecl}{\flo@v+\flo@fecs}%
      \flo@fecpt{0.66*\flo@fecl}{\flo@v+0.24*\flo@fecd+0.7*\flo@fecs}\flo@fecpt{0.52*\flo@fecl}{\flo@v+0.38*\flo@fecd+0.5*\flo@fecs}%
    \else
      \flo@fecpt{0.12*\flo@feW}{\flo@v-0.5*\flo@fecd}\flo@fecpt{0.58*\flo@fecl}{\flo@v-0.36*\flo@fecd+0.5*\flo@fecs}%
      \flo@fecpt{\flo@fecl}{\flo@v+\flo@fecs}\flo@fecpt{0.62*\flo@fecl}{\flo@v+0.36*\flo@fecd+0.6*\flo@fecs}%
    \fi}%
  % the tip, then the other side back down
  \edef\flo@fech{\flo@fecp}\edef\flo@fecp{\the\numexpr\flo@fecp+1\relax}%
  \expandafter\edef\csname flo@RX\flo@fecp\endcsname{\flo@fefb}\expandafter\def\csname flo@RY\flo@fecp\endcsname{1}%
  \flo@loop{fecr}\flo@kb{2}{\flo@fech}{%
    \edef\flo@q{\the\numexpr\flo@fech+2-\flo@kb\relax}\edef\flo@ia{\the\numexpr\flo@fecp+\flo@kb-1\relax}%
    \flo@calc\flo@t{\csname flo@RY\flo@q\endcsname}\flo@calc\flo@xl{2*\flo@fefb*\flo@t*\flo@t-(\csname flo@RX\flo@q\endcsname)}%
    \expandafter\let\csname flo@RX\flo@ia\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@ia\endcsname\flo@t}%
  \edef\flo@fecp{\the\numexpr2*\flo@fech\relax}%
  \flo@loop{fecx}\flo@kb{1}{\flo@fecp}{\flo@put{\the\flo@kb}{\csname flo@RX\the\flo@kb\endcsname}{\csname flo@RY\the\flo@kb\endcsname}}%
  \flo@smoothprep\flo@fecp\flo@keep{fec}%
  \flo@vtone{flo@c}{\flo@fet}\flo@vfill{flo@c}{1}{0}{\flo@kept{fec}}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.28}{1}{\flo@fehalf{fec}\flo@fech}%
  \def\flo@twa{0.025}\def\flo@twb{0.004}%
  \flo@calc\flo@xb{\flo@fefb*0.9*0.9/3}\flo@calc\flo@xc{\flo@fefb*0.9*0.9}%
  \flo@vfill{white}{0.55}{0}{\flo@vtaper{0}{0}{0}{0.3}\flo@xb{0.6}\flo@xc{0.9}}%
  \ifnum\flo@feund=1 \flo@fesorc\fi}
% a comb's point at #1 out from the midrib (to the left), #2 along it
\def\flo@fecpt#1#2{%
  \edef\flo@fecp{\the\numexpr\flo@fecp+1\relax}\flo@calc\flo@t{#2}%
  \flo@calc\flo@xl{\flo@fefb*\flo@t*\flo@t-(#1)}%
  \expandafter\let\csname flo@RX\flo@fecp\endcsname\flo@xl\expandafter\let\csname flo@RY\flo@fecp\endcsname\flo@t}
% the sori of a comb: a dot in each pinnule, a line along it, or a band along the edge
\def\flo@fesorc{%
  \edef\flo@fesr{\flo@get{sori}}\flo@vaccent{flo@c}{-0.35}%
  \def\flo@tmp{marginal}\ifx\flo@fesr\flo@tmp
    \flo@calc\flo@t{min(0.4,0.22*\flo@fepcm)}\flo@vstroke{flo@c}{\flo@t}{0.75}{0}{\flo@kept{fec}}\else
    \flo@spk={}%
    \flo@loop{fesq}\flo@kb{1}{\flo@fecn}{%
      \flo@calc\flo@v{0.05+\flo@fecd*(\the\flo@kb-0.5)}\flo@calc\flo@fecl{\flo@feW*(1-0.72*pow(\flo@v,1.5))}%
      \flo@calc\flo@ya{\flo@v+0.35*\flo@fecs}\flo@calc\flo@sx{\flo@fefb*\flo@ya*\flo@ya}%
      \flo@calc\flo@xa{\flo@sx-0.45*\flo@fecl}\flo@calc\flo@xb{\flo@sx+0.45*\flo@fecl}%
      \def\flo@tmp{dots}\ifx\flo@fesr\flo@tmp
        \flo@calc\flo@t{0.16*min(\flo@fecd,\flo@fecl)}%
        \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xa}{\flo@ya}}{\flo@t pt}\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@xb}{\flo@ya}}{\flo@t pt}}%
      \else
        \flo@calc\flo@xc{\flo@sx-0.7*\flo@fecl}\flo@calc\flo@xd{\flo@sx+0.7*\flo@fecl}\flo@calc\flo@yb{\flo@ya+0.6*\flo@fecs}%
        \edef\flo@tmp{\noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xa}{\flo@ya}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xc}{\flo@yb}}%
          \noexpand\pgfpathmoveto{\noexpand\flo@P{\flo@xb}{\flo@ya}}\noexpand\pgfpathlineto{\noexpand\flo@P{\flo@xd}{\flo@yb}}}%
      \fi
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
    \def\flo@tmp{dots}\ifx\flo@fesr\flo@tmp\flo@vfill{flo@c}{0.9}{0}{\the\flo@spk}\else
    \def\flo@tmp{lines}\ifx\flo@fesr\flo@tmp\flo@vstroke{flo@c}{0.45}{0.85}{0}{\the\flo@spk}\fi\fi
  \fi}
% a fertile pinna of a dimorphic fern: a row of beads (the pinna rolled round its sori)
% along +y, length 1, smaller toward its tip, on a thin midrib
\def\flo@febeads{%
  \flo@range\flo@fefb{0.02}{0.08}\flo@calc\flo@t{int(max(2,min(7,2+5*\flo@fepcm)))}\pgfmathtruncatemacro\flo@fend{\flo@t}%
  \flo@vtone{flo@c}{0.12}\flo@calc\flo@xb{\flo@fefb*0.9*0.9/3}\flo@calc\flo@xc{\flo@fefb*0.9*0.9}%
  \flo@vstroke{flo@c}{0.3}{0.8}{0}{\pgfpathmoveto{\flo@P00}\pgfpathcurveto{\flo@P0{0.3}}{\flo@P\flo@xb{0.6}}{\flo@P\flo@xc{0.9}}}%
  \flo@spk={}%
  \flo@loop{febd}\flo@kb{1}{\flo@fend}{%
    \flo@calc\flo@v{0.95*(\the\flo@kb-0.3)/\flo@fend}\flo@calc\flo@sx{\flo@fefb*\flo@v*\flo@v}%
    \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@t{0.6/\flo@fend*(1-0.4*\flo@v)*\flo@t}%
    \edef\flo@tmp{\noexpand\pgfpathcircle{\noexpand\flo@P{\flo@sx}{\flo@v}}{\flo@t pt}}%
    \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@tmp}}%
  \flo@sym\flo@t{0.04}\flo@vtone{flo@c}{0.32+\flo@t}\flo@vfill{flo@c}{1}{0}{\the\flo@spk}%
  \flo@vtone{flo@c}{0.08}\flo@vstroke{flo@c}{0.25}{0.45}{1}{\the\flo@spk}}
% A fern's crown at the origin, in centimeters, \flo@gH the longest frond, in the season
% \flo@o@season: three to five fronds fanning out and arching away from the middle, the
% middle ones longest; in spring still unrolling from fiddleheads, each a little behind
% the season or ahead of it; two in five of the open ones turned to show the sori beneath;
% a dimorphic fern's fertile frond upright in the middle from midsummer. Each frond draws
% from its own stream (\flo@seedorgan)
\def\flo@ferncrown{%
  \pgfsetroundcap\pgfsetroundjoin\pgftransformscale{28.45276}%
  \pgfmathparse{\flo@o@season}\let\flo@season\pgfmathresult\flo@int\flo@fenf{3}{5}%
  \flo@loop{fecu}\flo@Ga{1}{\flo@fenf}{%
    \flo@calc\flo@f{(\the\flo@Ga-(\flo@fenf+1)/2)/((\flo@fenf-1)/2)}%
    \flo@sym\flo@t{8}\flo@calc\flo@fela{90-44*\flo@f+\flo@t}%
    \flo@range\flo@t{0.8}{1.2}\flo@calc\flo@feac{(\flo@f<0 ? 1 : -1)*(20+70*\flo@get{curl})*\flo@t*(0.4+0.6*abs(\flo@f))}%
    \flo@range\flo@t{0.85}{1}\flo@calc\flo@fell{\flo@gH*(1-0.22*abs(\flo@f))*\flo@t}%
    \flo@range\flo@t{0}{0.3}\flo@calc\flo@feuu{max(0,min(1,(\flo@season-0.1-\flo@get{phenology}-\flo@t)/0.4))}%
    \flo@chance{0.4}\ifflo@yes\def\flo@feuf{1}\else\def\flo@feuf{0}\fi
    \flo@rnd\flo@lc\flo@calc\flo@fexx{0.06*\flo@f}%
    \flo@seedorgan
    \flo@organ{%
      \edef\flo@feun{\flo@feuu}\edef\flo@fearch{\flo@feac}%
      \ifdim\flo@feun pt<0.97pt \def\flo@feund{0}\else\edef\flo@feund{\flo@feuf}\fi
      \pgftransformshift{\flo@P\flo@fexx{0}}\flo@calc\flo@t{\flo@fela-90}\pgftransformrotate{\flo@t}%
      \pgftransformscale{\flo@fell}\flo@autumnleaf
      \flo@calc\flo@oarg{\flo@fell*28.45276}\flo@frond\flo@oarg}}%
  \ifnum\flo@get{dimorphic}=1 \ifdim\flo@season pt>0.55pt
    \flo@sym\flo@t{6}\flo@calc\flo@fela{90+\flo@t}\flo@sym\flo@feac{12}%
    \flo@range\flo@t{0.55}{0.7}\flo@calc\flo@fell{\flo@gH*\flo@t}%
    \flo@seedorgan
    \flo@organ{%
      \def\flo@fefert{1}\edef\flo@fearch{\flo@feac}\def\flo@feun{1}%
      \flo@calc\flo@t{\flo@fela-90}\pgftransformrotate{\flo@t}\pgftransformscale{\flo@fell}%
      \flo@calc\flo@oarg{\flo@fell*28.45276}\flo@frond\flo@oarg}%
  \fi\fi}

% ================================================================ visitors
% A visitor is drawn as a plant is: the pic samples it (\florilegiumvisitor), then
% reseeds pgf's generator for the drawing (draw=, or the seed + 1).
%
% Butterflies and moths: florilegium-flora.lua's butterfly, shaped and painted by the
% genome. In units of half the wingspan, the thorax at the origin, the head toward +y; a
% side's wings are drawn to the right, the left side mirrored, so the pattern is the
% same on both and only the wash differs. The forewing's tip sets its outline (rounded,
% angular, falcate: hooked, pointed: a hawkmoth's narrow swept wing); a scalloped or
% toothed edge gets three points between each two along the outer margin, every other one
% drawn toward the root; a tail hangs from the hindwing, or two thread tails. Inside each
% wing, as flora paints one: the wash and mottle, then the groundplan's systems (the
% nymphalid groundplan of Schwanwitsch 1924 and Süffert 1927): a dark wash at the base, a
% central band or a row of spots with a discal spot on the cell, at the border a dark
% band, a row of spots or of eyespots with one to three rings (and an arc outside each),
% pale lunules along the edge; the pooled rim; white veins from the root and pale spots at
% the rim. Poses: open; a moth's flat or tent (its
% forewings swept back over the hindwings); closed (one side seen from the side, the
% underside paler, the legs gripping); hover (a hawkmoth's wings a blur).
\newcount\flo@Wa \newcount\flo@Wb \newcount\flo@Wc \newcount\flo@Wd
\def\flo@wgput#1#2#3#4{\expandafter\edef\csname flo@wg#1X#2\endcsname{#3}\expandafter\edef\csname flo@wg#1Y#2\endcsname{#4}}
\def\flo@wgx#1#2{\csname flo@wg#1X#2\endcsname}
\def\flo@wgy#1#2{\csname flo@wg#1Y#2\endcsname}
% the outlines (flora's), then the forewing's tip
\def\flo@wgshape{%
  \flo@wgput{fw}1{0.05}{0.1}\flo@wgput{fw}2{0.3}{0.45}\flo@wgput{fw}3{0.65}{0.68}%
  \flo@wgput{fw}4{0.92}{0.66}\flo@wgput{fw}5{1}{0.5}\flo@wgput{fw}6{0.88}{0.25}%
  \flo@wgput{fw}7{0.55}{0.05}\flo@wgput{fw}8{0.15}{-0.02}%
  \flo@wgput{hw}1{0.06}{-0.02}\flo@wgput{hw}2{0.45}{-0.02}\flo@wgput{hw}3{0.72}{-0.22}%
  \flo@wgput{hw}4{0.7}{-0.5}\flo@wgput{hw}5{0.5}{-0.72}\flo@wgput{hw}6{0.25}{-0.7}%
  \flo@wgput{hw}7{0.08}{-0.35}%
  \csname flo@wgap@\flo@xget{apex}\endcsname}
\def\flo@wgap@rounded{}
\def\flo@wgap@angular{\flo@wgput{fw}3{0.66}{0.7}\flo@wgput{fw}4{1}{0.72}\flo@wgput{fw}5{0.98}{0.52}}
\def\flo@wgap@falcate{\flo@wgput{fw}3{0.66}{0.72}\flo@wgput{fw}4{1.04}{0.78}\flo@wgput{fw}5{0.9}{0.55}}
\def\flo@wgap@pointed{%
  \flo@wgput{fw}1{0.05}{0.08}\flo@wgput{fw}2{0.35}{0.36}\flo@wgput{fw}3{0.72}{0.42}%
  \flo@wgput{fw}4{1}{0.38}\flo@wgput{fw}5{0.97}{0.28}\flo@wgput{fw}6{0.7}{0.16}%
  \flo@wgput{fw}7{0.38}{0.04}\flo@wgput{fw}8{0.12}{-0.02}%
  \flo@wgput{hw}2{0.4}{-0.02}\flo@wgput{hw}3{0.55}{-0.12}\flo@wgput{hw}4{0.52}{-0.28}%
  \flo@wgput{hw}5{0.38}{-0.38}\flo@wgput{hw}6{0.2}{-0.36}\flo@wgput{hw}7{0.07}{-0.2}}
% each point of wing #1 (#2 points) moved a little (flora: rng.sym(0.03) each way)
\def\flo@wgjit#1#2{\flo@loop{wgj#1}\flo@Wa{1}{#2}{%
  \flo@sym\flo@t{0.03}\flo@calc\flo@xa{\flo@wgx{#1}{\the\flo@Wa}+\flo@t}%
  \flo@sym\flo@t{0.03}\flo@calc\flo@ya{\flo@wgy{#1}{\the\flo@Wa}+\flo@t}%
  \flo@wgput{#1}{\the\flo@Wa}\flo@xa\flo@ya}}
% a tail strap after the hindwing's point 5: five points off it
\expandafter\def\csname flo@wgtx1\endcsname{-0.05}\expandafter\def\csname flo@wgty1\endcsname{-0.04}
\expandafter\def\csname flo@wgtx2\endcsname{-0.06}\expandafter\def\csname flo@wgty2\endcsname{-0.19}
\expandafter\def\csname flo@wgtx3\endcsname{-0.1}\expandafter\def\csname flo@wgty3\endcsname{-0.25}
\expandafter\def\csname flo@wgtx4\endcsname{-0.15}\expandafter\def\csname flo@wgty4\endcsname{-0.2}
\expandafter\def\csname flo@wgtx5\endcsname{-0.13}\expandafter\def\csname flo@wgty5\endcsname{-0.04}
\def\flo@wgtailpts{%
  \edef\flo@xb{\flo@wgx{hw}5}\edef\flo@yb{\flo@wgy{hw}5}%
  \flo@loop{wgtl}\flo@Wb{1}{5}{%
    \flo@calc\flo@xa{\flo@xb+\csname flo@wgtx\the\flo@Wb\endcsname}%
    \flo@calc\flo@ya{\flo@yb+\csname flo@wgty\the\flo@Wb\endcsname}%
    \advance\flo@Wc by1 \flo@put{\the\flo@Wc}\flo@xa\flo@ya}}
% the outline of wing #1 (#2 points; the edge from point #3 to #4) into flo@X/Y, prepared
\def\flo@wgoutline#1#2#3#4{%
  \flo@Wc=0
  \flo@loop{wgo#1}\flo@Wa{1}{#2}{%
    \advance\flo@Wc by1 \flo@put{\the\flo@Wc}{\flo@wgx{#1}{\the\flo@Wa}}{\flo@wgy{#1}{\the\flo@Wa}}%
    \ifnum\flo@wgtail=\flo@Wa\relax\flo@wgtailpts\fi
    \ifdim\flo@wgdep pt>0pt \ifnum\flo@Wa<#4 \ifnum\flo@Wa>\numexpr#3-1\relax
      \edef\flo@wgn{\the\numexpr\flo@Wa+1\relax}%
      \flo@loop{wgs#1}\flo@Wb{1}{3}{%
        \flo@calc\flo@t{\the\flo@Wb/4}%
        \flo@calc\flo@xa{\flo@wgx{#1}{\the\flo@Wa}+(\flo@wgx{#1}\flo@wgn-(\flo@wgx{#1}{\the\flo@Wa}))*\flo@t}%
        \flo@calc\flo@ya{\flo@wgy{#1}{\the\flo@Wa}+(\flo@wgy{#1}\flo@wgn-(\flo@wgy{#1}{\the\flo@Wa}))*\flo@t}%
        \ifodd\flo@Wb\flo@calc\flo@xa{\flo@xa*(1-\flo@wgdep)}\flo@calc\flo@ya{\flo@ya*(1-\flo@wgdep)}\fi
        \advance\flo@Wc by1 \flo@put{\the\flo@Wc}\flo@xa\flo@ya}%
    \fi\fi\fi}%
  \flo@smoothprep{\the\flo@Wc}}
% a point s (0..1) along wing #1's edge from point #2 to #3, #5 of the way out from the
% root: \flo@wx, \flo@wy
\def\flo@wgat#1#2#3#4#5{%
  \edef\flo@wm{\the\numexpr#3-#2\relax}%
  \flo@calc\flo@wq{(#4)*\flo@wm}\pgfmathtruncatemacro\flo@wk{min(\flo@wm-1,floor(\flo@wq))}%
  \flo@calc\flo@wf{\flo@wq-\flo@wk}%
  \edef\flo@wi{\the\numexpr#2+\flo@wk\relax}\edef\flo@wj{\the\numexpr#2+\flo@wk+1\relax}%
  \flo@calc\flo@wx{(\flo@wgx{#1}\flo@wi+(\flo@wgx{#1}\flo@wj-(\flo@wgx{#1}\flo@wi))*\flo@wf)*(#5)}%
  \flo@calc\flo@wy{(\flo@wgy{#1}\flo@wi+(\flo@wgy{#1}\flo@wj-(\flo@wgy{#1}\flo@wi))*\flo@wf)*(#5)}}
% an eyespot at (#1,#2), radius #3: dark, a pale ring, a copper ring or pupil, a dark
% pupil with a white glint, as many as its rings
\def\flo@wgeye#1#2#3{%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.85}{0}{\pgfpathcircle{\flo@P{#1}{#2}}{#3pt}}%
  \ifnum\flo@xget{rings}>1 \flo@calc\flo@t{(#3)*0.68}\flo@vfill{white}{0.85}{0}{\pgfpathcircle{\flo@P{#1}{#2}}{\flo@t pt}}\fi
  \flo@calc\flo@t{(#3)*(\flo@xget{rings}>2 ? 0.46 : 0.34)}%
  \flo@vaccent{flo@c}{0}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P{#1}{#2}}{\flo@t pt}}%
  \ifnum\flo@xget{rings}>2
    \flo@calc\flo@t{(#3)*0.22}\flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P{#1}{#2}}{\flo@t pt}}%
    \flo@calc\flo@xa{#1+(#3)*0.1}\flo@calc\flo@ya{#2+(#3)*0.1}\flo@calc\flo@t{(#3)*0.08}%
    \flo@vfill{white}{0.9}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{\flo@t pt}}%
  \fi
  % the parafocal arc, outside it, facing away from the root
  \ifnum\flo@xget{parafocal}=1
    \flo@calc\flo@wa{atan2(#2,#1)}\flo@calc\flo@wr{(#3)*1.5}%
    \flo@calc\flo@xa{#1+\flo@wr*cos(\flo@wa-55)}\flo@calc\flo@ya{#2+\flo@wr*sin(\flo@wa-55)}%
    \flo@calc\flo@xb{#1+\flo@wr*1.15*cos(\flo@wa-20)}\flo@calc\flo@yb{#2+\flo@wr*1.15*sin(\flo@wa-20)}%
    \flo@calc\flo@xc{#1+\flo@wr*1.15*cos(\flo@wa+20)}\flo@calc\flo@yc{#2+\flo@wr*1.15*sin(\flo@wa+20)}%
    \flo@calc\flo@xd{#1+\flo@wr*cos(\flo@wa+55)}\flo@calc\flo@yd{#2+\flo@wr*sin(\flo@wa+55)}%
    \flo@calc\flo@twa{(#3)*0.22}\flo@calc\flo@twb{(#3)*0.22}%
    \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.6}{1}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}%
  \fi}
% the band, spots and wash anchors of each wing
\def\flo@wgbx@fw{0.12}\def\flo@wgby@fw{0.12}\def\flo@wgbx@hw{0.12}\def\flo@wgby@hw{-0.12}
\def\flo@wgry@fw{0.04}\def\flo@wgry@hw{-0.04}
\def\flo@wgcb@fw{\flo@calc\flo@xa{0.47+\flo@wgcj}\flo@calc\flo@xb{0.42+\flo@wgcj}%
  \flo@vtaper{0.5}{0.66}\flo@xa{0.45}\flo@xb{0.25}{0.36}{0.04}}
\def\flo@wgcb@hw{\flo@calc\flo@xa{0.37+\flo@wgcj}\flo@calc\flo@xb{0.28+\flo@wgcj}%
  \flo@vtaper{0.42}{-0.02}\flo@xa{-0.2}\flo@xb{-0.38}{0.14}{-0.55}}
\def\flo@wgcs@fw{\flo@calc\flo@xa{0.47+\flo@wgcj}\flo@calc\flo@xb{0.42+\flo@wgcj}%
  \def\flo@ya{0.45}\def\flo@yb{0.25}}
\def\flo@wgcs@hw{\flo@calc\flo@xa{0.37+\flo@wgcj}\flo@calc\flo@xb{0.28+\flo@wgcj}%
  \def\flo@ya{-0.2}\def\flo@yb{-0.38}}
\def\flo@wgds@fw{\flo@calc\flo@xa{0.47+\flo@wgcj*0.5}\def\flo@ya{0.42}}
\def\flo@wgds@hw{\flo@calc\flo@xa{0.34+\flo@wgcj*0.5}\def\flo@ya{-0.27}}
% paint wing #1 (#2 points, its edge from #3 to #4): the wash, then in its clip the
% mottle, the pattern, the pooled rim, veins and rim spots; a hindwing's thread tails
\def\flo@wgpaint#1#2#3#4{%
  \flo@vtone{flo@c}{\flo@wgt}\flo@vfill{flo@c}{\flo@wgop}{0}{\flo@kept{wg#1}}%
  \ifnum\flo@wgblur=0
  \begin{pgfscope}%
    \flo@kept{wg#1}\pgfusepath{clip}%
    \flo@calc\flo@ta{\flo@wgt-0.2}\flo@calc\flo@tb{\flo@wgt+0.2}%
    \ifnum\flo@fine=1 \flo@vmottle{-1.2}{-1.2}{1.2}{1.2}{9}{0.14}\flo@ta\flo@tb{8}%
    \else\flo@vmottle{-1.2}{-1.2}{1.2}{1.2}{4}{0.14}\flo@ta\flo@tb{0}\fi
    \ifnum\flo@xget{basal}=1
      \flo@vblob{\csname flo@wgbx@#1\endcsname}{\csname flo@wgby@#1\endcsname}{0.2}{0.15}{0.3}{9}%
      \flo@calc\flo@t{\flo@wgt-0.18}\flo@vtone{flo@c}\flo@t\flo@vfill{flo@c}{0.45}{1}{\flo@smoothpath}%
    \fi
    \edef\flo@wgsys{\flo@xget{central}}%
    \def\flo@tmp{band}\ifx\flo@wgsys\flo@tmp
      \edef\flo@twa{\flo@wgcw}\flo@calc\flo@twb{\flo@wgcw*0.8}%
      \flo@calc\flo@t{\flo@wgt-0.2}\flo@vtone{flo@c}\flo@t
      \flo@vfill{flo@c}{0.6}{1}{\csname flo@wgcb@#1\endcsname}%
    \fi
    \def\flo@tmp{spots}\ifx\flo@wgsys\flo@tmp
      \csname flo@wgcs@#1\endcsname
      \flo@calc\flo@xc{(\flo@xa+\flo@xb)/2}\flo@calc\flo@yc{(\flo@ya+\flo@yb)/2}%
      \flo@calc\flo@t{\flo@wgt-0.22}\flo@vtone{flo@c}\flo@t
      \flo@vfill{flo@c}{0.65}{1}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{0.045pt}%
        \pgfpathcircle{\flo@P\flo@xb\flo@yb}{0.045pt}\pgfpathcircle{\flo@P\flo@xc\flo@yc}{0.04pt}}%
    \fi
    \ifnum\flo@xget{discal}=1
      \csname flo@wgds@#1\endcsname
      \flo@calc\flo@t{\flo@wgt-0.25}\flo@vtone{flo@c}\flo@t
      \flo@vfill{flo@c}{0.75}{1}{\pgfpathellipse{\flo@P\flo@xa\flo@ya}{\flo@P{0.03}0}{\flo@P0{0.045}}}%
    \fi
    \edef\flo@wgsys{\flo@xget{border}}%
    \def\flo@tmp{band}\ifx\flo@wgsys\flo@tmp
      \flo@calc\flo@t{6.8*\flo@wgu}\flo@calc\flo@ta{\flo@wgt-0.22}\flo@vtone{flo@c}\flo@ta
      \flo@vstroke{flo@c}{\flo@t}{0.55}{1}{\flo@kept{wg#1}}%
    \fi
    % the pooled rim (flora: tone 0.05, 0.26 of a unit wide, multiplied)
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{7.37*\flo@wgu}\flo@vstroke{flo@c}{\flo@t}{0.55}{1}{\flo@kept{wg#1}}%
    \def\flo@tmp{spots}\ifx\flo@wgsys\flo@tmp
      \flo@vtone{flo@c}{0.06}%
      \flo@loop{wgsp#1}\flo@Wb{1}{\flo@xget{eyes}}{%
        \flo@calc\flo@t{(\the\flo@Wb-0.5)/\flo@xget{eyes}}\flo@wgat{#1}{#3}{#4}\flo@t{0.86}%
        \flo@vfill{flo@c}{0.8}{0}{\pgfpathcircle{\flo@P\flo@wx\flo@wy}{\csname flo@wgsr@#1\endcsname pt}}}%
    \fi
    \def\flo@tmp{eyes}\ifx\flo@wgsys\flo@tmp
      \flo@loop{wgey#1}\flo@Wb{1}{\csname flo@wgne@#1\endcsname}{%
        \flo@calc\flo@t{\csname flo@wges@#1\endcsname+(\the\flo@Wb-1)*\csname flo@wged@#1\endcsname}%
        \flo@wgat{#1}{#3}{#4}\flo@t{0.78}%
        \flo@wgeye\flo@wx\flo@wy{\csname flo@wger@#1\endcsname}}%
    \fi
    % lunules: rows of pale crescents along the edge
    \ifnum\flo@xget{lunules}>0
      \edef\flo@wgnc{\the\numexpr2*(#4-#3)\relax}%
      \flo@loop{wglr#1}\flo@Wc{1}{\flo@xget{lunules}}{%
        \flo@calc\flo@wgf{0.95-0.07*(\the\flo@Wc-1)}%
        \flo@loop{wglu#1}\flo@Wb{1}{\flo@wgnc}{%
          \flo@calc\flo@t{(\the\flo@Wb-0.85)/\flo@wgnc}\flo@wgat{#1}{#3}{#4}\flo@t\flo@wgf
          \let\flo@xc\flo@wx\let\flo@yc\flo@wy
          \flo@calc\flo@t{(\the\flo@Wb-0.15)/\flo@wgnc}\flo@wgat{#1}{#3}{#4}\flo@t\flo@wgf
          \flo@calc\flo@xa{\flo@xc+(\flo@wx-\flo@xc)/3}\flo@calc\flo@ya{\flo@yc+(\flo@wy-\flo@yc)/3}%
          \flo@calc\flo@xb{\flo@xc+(\flo@wx-\flo@xc)*2/3}\flo@calc\flo@yb{\flo@yc+(\flo@wy-\flo@yc)*2/3}%
          \flo@calc\flo@xa{\flo@xa*0.96}\flo@calc\flo@ya{\flo@ya*0.96}\flo@calc\flo@xb{\flo@xb*0.96}\flo@calc\flo@yb{\flo@yb*0.96}%
          \def\flo@twa{0.03}\def\flo@twb{0.008}%
          \flo@vfill{white}{0.55}{0}{\flo@vtaper\flo@xc\flo@yc\flo@xa\flo@ya\flo@xb\flo@yb\flo@wx\flo@wy}}}%
    \fi
    % veins: white streaks fanning from the root to each point (flora), pale spots at the rim
    \ifnum\flo@xget{veins}=1
      \def\flo@wgrx{0.04}\edef\flo@wgry{\csname flo@wgry@#1\endcsname}%
      \flo@loop{wgvn#1}\flo@Wb{1}{#2}{%
        \flo@range\flo@f{0.7}{0.88}%
        \flo@calc\flo@xd{\flo@wgrx+(\flo@wgx{#1}{\the\flo@Wb}-\flo@wgrx)*\flo@f}%
        \flo@calc\flo@yd{\flo@wgry+(\flo@wgy{#1}{\the\flo@Wb}-(\flo@wgry))*\flo@f}%
        \flo@put1\flo@wgrx\flo@wgry
        \flo@calc\flo@xa{\flo@wgrx+(\flo@xd-\flo@wgrx)*0.3}\flo@calc\flo@ya{\flo@wgry+(\flo@yd-(\flo@wgry))*0.4}\flo@put2\flo@xa\flo@ya
        \flo@calc\flo@xa{\flo@wgrx+(\flo@xd-\flo@wgrx)*0.7}\flo@calc\flo@ya{\flo@wgry+(\flo@yd-(\flo@wgry))*0.75}\flo@put3\flo@xa\flo@ya
        \flo@put4\flo@xd\flo@yd
        \flo@range\flo@op{0.35}{0.6}\flo@vstreak{4}{0.035}{0.004}{white}\flo@op
        \def\flo@tmp{none}\ifx\flo@wgsys\flo@tmp\ifnum\flo@fine=1 \ifnum\flo@Wb>1 \ifnum\flo@Wb<#2
          \flo@calc\flo@xa{\flo@wgrx+(\flo@wgx{#1}{\the\flo@Wb}-\flo@wgrx)*0.9}%
          \flo@calc\flo@ya{\flo@wgry+(\flo@wgy{#1}{\the\flo@Wb}-(\flo@wgry))*0.9}%
          \flo@range\flo@t{0.025}{0.04}\flo@vfill{white}{0.8}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{\flo@t pt}}%
        \fi\fi\fi\fi}%
    \fi
  \end{pgfscope}%
  % thread tails off the hindwing
  \ifnum\flo@xget{tails}=2 \def\flo@tmp{#1}\def\flo@tmpb{hw}\ifx\flo@tmp\flo@tmpb
    \edef\flo@xb{\flo@wgx{hw}5}\edef\flo@yb{\flo@wgy{hw}5}%
    \def\flo@twa{0.022}\def\flo@twb{0.006}\flo@vtone{flo@c}{0.08}%
    \flo@vfill{flo@c}{0.9}{0}{%
      \flo@calc\flo@xa{\flo@xb-0.05}\flo@calc\flo@ya{\flo@yb-0.02}\flo@calc\flo@xd{\flo@xb-0.02}\flo@calc\flo@yd{\flo@yb-0.26}%
      \flo@calc\flo@xc{\flo@xb-0.04}\flo@calc\flo@yc{\flo@yb-0.1}\flo@calc\flo@xe{\flo@xb-0.025}\flo@calc\flo@ye{\flo@yb-0.18}%
      \flo@vtaper\flo@xa\flo@ya\flo@xc\flo@yc\flo@xe\flo@ye\flo@xd\flo@yd
      \flo@calc\flo@xa{\flo@xb-0.14}\flo@calc\flo@xd{\flo@xb-0.13}\flo@calc\flo@yd{\flo@yb-0.2}%
      \flo@calc\flo@xc{\flo@xb-0.14}\flo@calc\flo@yc{\flo@yb-0.08}\flo@calc\flo@xe{\flo@xb-0.135}\flo@calc\flo@ye{\flo@yb-0.14}%
      \flo@vtaper\flo@xa\flo@yb\flo@xc\flo@yc\flo@xe\flo@ye\flo@xd\flo@yd}%
  \fi\fi
  \fi}
% the body: abdomen (a blade, flora's), banded on a hawkmoth; thorax, hairy on a moth;
% head; feelers clubbed, threadlike or feathery; legs in profile
\def\flo@wgbody{%
  \flo@loop{wgab}\flo@Wb{0}{10}{%
    \flo@calc\flo@v{\the\flo@Wb/10}\flo@calc\flo@h{\flo@wgaw*sin(180*pow(\flo@v,0.7))}%
    \flo@calc\flo@ya{-\flo@wgal+\flo@wgal*\flo@v}\flo@calc\flo@xa{-\flo@h}%
    \flo@put{\the\numexpr\flo@Wb+1\relax}\flo@xa\flo@ya
    \ifnum\flo@Wb>0 \ifnum\flo@Wb<10 \flo@put{\the\numexpr21-\flo@Wb\relax}\flo@h\flo@ya\fi\fi}%
  \flo@smoothprep{20}\flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}%
  \ifnum\flo@xget{bands}>0
    \def\flo@twa{0.03}\def\flo@twb{0.03}%
    \flo@loop{wgbd}\flo@Wb{1}{\flo@xget{bands}}{%
      \flo@calc\flo@ya{-\flo@wgal*\the\flo@Wb/(\flo@xget{bands}+1)}\flo@calc\flo@xa{\flo@wgaw*0.9}\flo@calc\flo@xb{-\flo@wgaw*0.9}%
      \flo@calc\flo@xc{\flo@wgaw*0.3}\flo@calc\flo@xd{-\flo@wgaw*0.3}%
      \flo@vfill{white}{0.45}{0}{\flo@vtaper\flo@xb\flo@ya\flo@xd\flo@ya\flo@xc\flo@ya\flo@xa\flo@ya}}%
  \fi
  \flo@vtone{flo@c}{0.04}\flo@vfill{flo@c}{1}{0}{\pgfpathellipse{\flo@P0{0.08}}{\flo@P\flo@wgtw0}{\flo@P0{0.13}}}%
  \ifdim\flo@xget{hair}pt>0pt
    \pgfmathtruncatemacro\flo@wgnh{4+12*\flo@xget{hair}}\flo@vtone{flo@c}{0.12}%
    \def\flo@twa{0.022}\def\flo@twb{0.003}%
    \flo@loop{wghr}\flo@Wb{1}{\flo@wgnh}{%
      \flo@range\flo@wa{0}{360}\flo@range\flo@t{0.03}{0.06}%
      \flo@calc\flo@xa{\flo@wgtw*cos(\flo@wa)}\flo@calc\flo@ya{0.08+0.13*sin(\flo@wa)}%
      \flo@calc\flo@xd{(\flo@wgtw+\flo@t)*cos(\flo@wa)}\flo@calc\flo@yd{0.08+(0.13+\flo@t)*sin(\flo@wa)}%
      \flo@calc\flo@xb{\flo@xa+(\flo@xd-\flo@xa)/3}\flo@calc\flo@yb{\flo@ya+(\flo@yd-\flo@ya)/3}%
      \flo@calc\flo@xc{\flo@xa+(\flo@xd-\flo@xa)*2/3}\flo@calc\flo@yc{\flo@ya+(\flo@yd-\flo@ya)*2/3}%
      \flo@vfill{flo@c}{0.7}{0}{\flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}%
  \fi
  \flo@vtone{flo@c}{0.04}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P0{0.27}}{\flo@wghr pt}}%
  % feelers: from the head, a cubic out to (\flo@ex,\flo@ey)
  \flo@calc\flo@wgw{max(0.3,0.5*\flo@wgu)}%
  \flo@loop{wgan}\flo@Wb{1}{2}{%
    \ifnum\flo@wgsides=1 \def\flo@sx{1}\else\ifnum\flo@Wb=1 \def\flo@sx{-1}\else\def\flo@sx{1}\fi\fi
    \edef\flo@t{\flo@xget{antenna}}%
    \def\flo@tmp{clubbed}\ifx\flo@t\flo@tmp\flo@range\flo@ex{0.22}{0.3}\flo@range\flo@ey{0.78}{0.9}\else
    \def\flo@tmp{feathery}\ifx\flo@t\flo@tmp\flo@range\flo@ex{0.24}{0.32}\flo@range\flo@ey{0.62}{0.72}\else
    \flo@range\flo@ex{0.26}{0.36}\flo@range\flo@ey{0.72}{0.88}\fi\fi% a thread, and any other kind's feeler
    \ifnum\flo@wgsides=1 \ifnum\flo@Wb=2 \flo@calc\flo@ex{\flo@ex*0.8}\flo@calc\flo@ey{\flo@ey*0.95}\fi\fi
    \flo@calc\flo@ex{\flo@sx*\flo@ex}\flo@calc\flo@xa{\flo@sx*0.02}\flo@calc\flo@xb{\flo@sx*0.05}%
    \flo@calc\flo@xc{\flo@ex*0.6}\flo@calc\flo@yc{\flo@ey*0.9}%
    \flo@vtone{flo@c}{0.08}%
    \flo@vstroke{flo@c}{\flo@wgw}{1}{0}{\pgfpathmoveto{\flo@P\flo@xa{0.31}}%
      \pgfpathcurveto{\flo@P\flo@xb{0.5}}{\flo@P\flo@xc\flo@yc}{\flo@P\flo@ex\flo@ey}}%
    \def\flo@tmp{clubbed}\ifx\flo@t\flo@tmp
      \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@ex\flo@ey}{0.025pt}}\fi
    \def\flo@tmp{feathery}\ifx\flo@t\flo@tmp
      \flo@calc\flo@t{0.5*\flo@wgw}%
      \flo@vstroke{flo@c}{\flo@t}{1}{0}{%
        \flo@loop{wgbb}\flo@Wc{3}{9}{%
          \flo@calc\flo@v{\the\flo@Wc/10}\flo@calc\flo@wf{1-\flo@v}%
          \flo@calc\flo@wx{\flo@wf*\flo@wf*\flo@wf*\flo@xa+3*\flo@wf*\flo@wf*\flo@v*\flo@xb+3*\flo@wf*\flo@v*\flo@v*\flo@xc+\flo@v*\flo@v*\flo@v*\flo@ex}%
          \flo@calc\flo@wy{\flo@wf*\flo@wf*\flo@wf*0.31+3*\flo@wf*\flo@wf*\flo@v*0.5+3*\flo@wf*\flo@v*\flo@v*\flo@yc+\flo@v*\flo@v*\flo@v*\flo@ey}%
          \flo@calc\flo@da{3*\flo@wf*\flo@wf*(\flo@xb-\flo@xa)+6*\flo@wf*\flo@v*(\flo@xc-\flo@xb)+3*\flo@v*\flo@v*(\flo@ex-\flo@xc)}%
          \flo@calc\flo@db{3*\flo@wf*\flo@wf*0.19+6*\flo@wf*\flo@v*(\flo@yc-0.5)+3*\flo@v*\flo@v*(\flo@ey-\flo@yc)}%
          \flo@nrm\flo@da\flo@db\flo@nx\flo@ny\flo@calc\flo@wr{0.05*(1.1-\flo@v)}%
          \flo@calc\flo@xd{\flo@wx+\flo@nx*\flo@wr}\flo@calc\flo@yd{\flo@wy+\flo@ny*\flo@wr}%
          \flo@calc\flo@xe{\flo@wx-\flo@nx*\flo@wr}\flo@calc\flo@ye{\flo@wy-\flo@ny*\flo@wr}%
          \pgfpathmoveto{\flo@P\flo@xd\flo@yd}\pgfpathlineto{\flo@P\flo@xe\flo@ye}}}%
    \fi}%
  % legs, seen from the side
  \ifnum\flo@wgsides=1
    \flo@vtone{flo@c}{0.08}%
    \flo@vstroke{flo@c}{\flo@wgw}{1}{0}{%
      \flo@loop{wglg}\flo@Wb{0}{2}{%
        \flo@calc\flo@ya{0.16-0.08*\the\flo@Wb}\flo@calc\flo@yb{\flo@ya+0.03}\flo@calc\flo@yc{\flo@ya-0.12}%
        \pgfpathmoveto{\flo@P{-0.03}\flo@ya}\pgfpathlineto{\flo@P{-0.12}\flo@yb}\pgfpathlineto{\flo@P{-0.2}\flo@yc}}}%
  \fi
  \ifnum\flo@fine=1 \def\flo@tmp{butterfly}\ifx\flo@wgk\flo@tmp
    \flo@calc\flo@t{\flo@wgal/0.62}%
    \flo@calc\flo@ya{-0.55*\flo@t}\flo@put1{-0.015}\flo@ya\flo@calc\flo@ya{-0.35*\flo@t}\flo@put2{-0.02}\flo@ya
    \flo@calc\flo@ya{-0.1*\flo@t}\flo@put3{-0.02}\flo@ya\flo@put4{-0.01}{0}%
    \flo@vstreak{4}{0.015}{0.004}{white}{0.45}%
  \fi\fi}
% a wing of the side: rotated #2 degrees about its root, painted (#1, then the paint's arguments)
\def\flo@wgwing#1#2#3#4#5{\begin{pgfscope}%
  \pgftransformshift{\flo@P{0.04}{0}}\pgftransformrotate{#2}\pgftransformshift{\flo@P{-0.04}{0}}%
  \flo@wgpaint{#1}{#3}{#4}{#5}\end{pgfscope}}
% a butterfly or moth; #1 its wingspan on the page in pt
\def\flo@lepid#1{%
  \flo@calc\flo@wgu{(#1)/56.90552}%
  \ifdim\flo@wgu pt>0.3pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@wgk{\flo@xget{kind}}\edef\flo@wgpose{\flo@xget{pose}}\edef\flo@wgground{\flo@xget{ground}}%
  % the wash: the ink's, paler, darker, or the copper's; the underside paler
  \edef\flo@wgt{\flo@xget{tone}}%
  \def\flo@tmp{pale}\ifx\flo@wgground\flo@tmp\flo@calc\flo@wgt{min(0.78,\flo@wgt+0.32)}\fi
  \def\flo@tmp{dark}\ifx\flo@wgground\flo@tmp\flo@calc\flo@wgt{\flo@wgt-0.12}\fi
  \def\flo@tmp{copper}\ifx\flo@wgground\flo@tmp\def\flo@rampname{flo@aramp}\fi
  \def\flo@wgsides{2}\def\flo@wgop{1}\def\flo@wgblur{0}\def\flo@wgxs{1}%
  \def\flo@wgrf{0}\def\flo@wgrh{0}\def\flo@wgpass{1}%
  \def\flo@tmp{closed}\ifx\flo@wgpose\flo@tmp\def\flo@wgsides{1}\def\flo@wgrf{18}\def\flo@wgrh{18}%
    \flo@calc\flo@wgt{min(0.8,\flo@wgt+0.12)}\fi
  \def\flo@tmp{flat}\ifx\flo@wgpose\flo@tmp\def\flo@wgrf{-18}\def\flo@wgrh{-10}\fi
  \def\flo@tmp{tent}\ifx\flo@wgpose\flo@tmp\def\flo@wgrf{-58}\def\flo@wgrh{-38}\def\flo@wgxs{0.8}\fi
  \def\flo@tmp{hover}\ifx\flo@wgpose\flo@tmp\def\flo@wgop{0.3}\def\flo@wgblur{1}\def\flo@wgpass{2}\fi
  % the body's proportions: a moth's stouter
  \def\flo@wgaw{0.05}\def\flo@wgal{0.62}\def\flo@wgtw{0.075}\def\flo@wghr{0.06}%
  \def\flo@tmp{moth}\ifx\flo@wgk\flo@tmp\def\flo@wgaw{0.075}\def\flo@wgtw{0.095}\def\flo@wghr{0.07}\fi
  \def\flo@tmp{hawkmoth}\ifx\flo@wgk\flo@tmp\def\flo@wgaw{0.075}\def\flo@wgal{0.85}\def\flo@wgtw{0.09}\def\flo@wghr{0.07}\fi
  \ifnum\flo@wgsides=1 \flo@calc\flo@wgaw{\flo@wgaw*0.8}\fi
  % the wings' outlines
  \flo@wgshape\flo@wgjit{fw}{8}\flo@wgjit{hw}{7}%
  \edef\flo@t{\flo@xget{wingedge}}\def\flo@wgdep{0}%
  \def\flo@tmp{scalloped}\ifx\flo@t\flo@tmp\def\flo@wgdep{0.045}\fi
  \def\flo@tmp{toothed}\ifx\flo@t\flo@tmp\def\flo@wgdep{0.09}\fi
  \def\flo@wgtail{0}\flo@wgoutline{fw}{8}{4}{6}\flo@keep{wgfw}%
  \ifnum\flo@xget{tails}=1 \def\flo@wgtail{5}\fi\flo@wgoutline{hw}{7}{3}{6}\flo@keep{wghw}%
  % the pattern's place: the central band's width and sway; eyespots, a row on the hindwing
  % and one at the forewing's tip
  \flo@range\flo@wgcw{0.07}{0.11}\flo@sym\flo@wgcj{0.04}%
  \edef\flo@wgne@hw{\flo@xget{eyes}}\def\flo@wgne@fw{0}\ifnum\flo@xget{eyes}>2 \def\flo@wgne@fw{1}\fi
  \ifnum\flo@wgne@hw>0 \flo@calc\flo@wger@hw{min(0.1,0.34/\flo@wgne@hw)}\flo@calc\flo@wges@hw{0.5/\flo@wgne@hw}%
    \flo@calc\flo@wged@hw{1/\flo@wgne@hw}\fi
  \def\flo@wger@fw{0.065}\def\flo@wges@fw{0.22}\def\flo@wged@fw{0}%
  \def\flo@wgsr@fw{0.03}\def\flo@wgsr@hw{0.034}%
  % closed, it stands: the body level, the head to the left, the wings raised
  \ifnum\flo@wgsides=1 \pgftransformrotate{90}\fi
  \flo@loop{wgsd}\flo@Wa{1}{\flo@wgsides}{%
    \begin{pgfscope}%
      \ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi
      \ifdim\flo@wgxs pt<1pt \pgftransformxscale{\flo@wgxs}\fi
      \flo@loop{wgps}\flo@Wd{1}{\flo@wgpass}{%
        \ifnum\flo@wgpass=2 \ifnum\flo@Wd=1 \def\flo@wgrf{14}\def\flo@wgrh{14}\else\def\flo@wgrf{-14}\def\flo@wgrh{-14}\fi\fi
        \ifnum\flo@wgsides=1
          \flo@wgwing{fw}\flo@wgrf{8}{4}{6}\flo@wgwing{hw}\flo@wgrh{7}{3}{6}%
        \else
          \flo@wgwing{hw}\flo@wgrh{7}{3}{6}\flo@wgwing{fw}\flo@wgrf{8}{4}{6}%
        \fi}%
    \end{pgfscope}}%
  \flo@wgbody}
% ---------------------------------------------------------------- bees and hoverflies
% Bees and hoverflies: florilegium-flora.lua's bee, shaped and painted by the genome. In
% units of the body's length, seen from above, the head toward +y, the waist near the
% origin. A honeybee's abdomen is an egg in the wash with dark bands across it; a
% bumblebee is round and black with pale bands (as many as its bands: the collar, the
% second segment, the back of the thorax, the first segment), a pale tail and a fringe of
% hair all round that takes the color it grows from; a solitary bee is slim and dark with
% thin bands of pale hair; a hoverfly is flat and dark with pairs of pale marks split by a
% dark line down its back, a wide head that is nearly all eye, short feelers and one pair
% of wings. Pollen is a copper lump on each hind leg. Poses: a bee visiting (legs spread,
% wings folded back over the abdomen) or in flight (legs hanging, the wings a faint wash,
% flora's dotted trail looping behind); a hoverfly resting (wings out at 45 degrees) or
% hovering (its wings a wash).
\newtoks\flo@spw
\def\flo@bgell#1#2#3#4{\pgfpathellipse{\flo@P{#1}{#2}}{\flo@P{#3}0}{\flo@P0{#4}}}
% a band across the body from y #1 down to #2, its middle #3 nearer the tail
\def\flo@bgband#1#2#3{%
  \flo@calc\flo@bya{#1-(#3)}\flo@calc\flo@byb{#2-(#3)}%
  \pgfpathmoveto{\flo@P{-0.5}{#1}}\pgfpathcurveto{\flo@P{-0.17}\flo@bya}{\flo@P{0.17}\flo@bya}{\flo@P{0.5}{#1}}%
  \pgfpathlineto{\flo@P{0.5}{#2}}\pgfpathcurveto{\flo@P{0.17}\flo@byb}{\flo@P{-0.17}\flo@byb}{\flo@P{-0.5}{#2}}%
  \pgfpathclose}
% the abdomen's outline: 16 points round an egg (a hoverfly's squarer), kept as bgab
\def\flo@bgabdomen{%
  \flo@loop{bgao}\flo@Wa{1}{16}{%
    \flo@calc\flo@wa{22.5*\the\flo@Wa-11.25}\flo@calc\flo@t{cos(\flo@wa)}\flo@calc\flo@v{sin(\flo@wa)}%
    \flo@calc\flo@xa{\flo@bgrx*(\flo@t<0 ? -1 : 1)*pow(abs(\flo@t),\flo@bgsq)}%
    \flo@calc\flo@ya{\flo@bgay+\flo@bgry*\flo@v*(\flo@v<0 ? \flo@bgegg : 1)}%
    \flo@put{\the\flo@Wa}\flo@xa\flo@ya}%
  \flo@smoothprep{16}\flo@keep{bgab}}
% a bumblebee's pale bands on part #1 (t the thorax, a the abdomen), in flo@c; its tail
\def\flo@bgpale#1{%
  \flo@loop{bgpl}\flo@Wb{1}{\flo@xget{bands}}{%
    \edef\flo@t{\csname flo@bgbp\the\flo@Wb\endcsname}\def\flo@tmp{#1}%
    \ifx\flo@t\flo@tmp
      \flo@vfill{flo@c}{0.95}{0}{\flo@bgband{\csname flo@bgbh\the\flo@Wb\endcsname}{\csname flo@bgbl\the\flo@Wb\endcsname}{0.02}}%
    \fi}%
  \def\flo@t{#1}\def\flo@tmp{a}\ifx\flo@t\flo@tmp\ifnum\flo@xget{paletail}=1
    \flo@bgwhite\flo@vfill{flo@c}{1}{0}{\flo@bgband\flo@bgtl{-2}{0.02}}\fi\fi}
% a bumblebee's white: the ink's palest
\def\flo@bgwhite{\let\flo@savedramp\flo@rampname\def\flo@rampname{flo@ramp}\flo@vtone{flo@c}{0.93}\let\flo@rampname\flo@savedramp}
% the color of the hair at height #1 on part #2: \flo@bgc 0 dark, 1 pale, 2 white
\def\flo@bgcolorat#1#2{%
  \def\flo@bgc{0}%
  \def\flo@tmp{bumblebee}\ifx\flo@bgk\flo@tmp
    \flo@loop{bgct}\flo@Wd{1}{\flo@xget{bands}}{%
      \edef\flo@t{\csname flo@bgbp\the\flo@Wd\endcsname}\def\flo@tmp{#2}%
      \ifx\flo@t\flo@tmp
        \ifdim#1pt<\csname flo@bgbh\the\flo@Wd\endcsname pt \ifdim#1pt>\csname flo@bgbl\the\flo@Wd\endcsname pt
          \def\flo@bgc{1}\fi\fi
      \fi}%
    \def\flo@t{#2}\def\flo@tmp{a}\ifx\flo@t\flo@tmp\ifnum\flo@xget{paletail}=1 \ifdim#1pt<\flo@bgtl pt
      \def\flo@bgc{2}\fi\fi\fi
  \fi}
% a fringe of #3 hairs round the ellipse at (0,#1), half-width #2, half-height #4 above
% the middle and #5 below, on part #6; each hair the color of the band it grows from
\def\flo@bgfur#1#2#3#4#5#6{%
  \flo@spk={}\flo@spa={}\flo@spw={}\def\flo@bgnd{0}\def\flo@bgnp{0}\def\flo@bgnw{0}%
  \flo@calc\flo@bghl{0.5+\flo@xget{hair}}%
  \flo@loop{bgfr}\flo@Wb{1}{#3}{%
    \flo@range\flo@wa{0}{360}\flo@range\flo@t{0.02}{0.045}\flo@sym\flo@wb{25}%
    \flo@calc\flo@t{\flo@t*\flo@bghl+0.014}\flo@calc\flo@v{sin(\flo@wa)}%
    \flo@calc\flo@wr{(\flo@v<0 ? #5 : #4)-0.014}%
    \flo@calc\flo@xa{(#2-0.014)*cos(\flo@wa)}\flo@calc\flo@ya{#1+\flo@wr*\flo@v}%
    \flo@calc\flo@xd{\flo@xa+\flo@t*cos(\flo@wa+\flo@wb)}\flo@calc\flo@yd{\flo@ya+\flo@t*sin(\flo@wa+\flo@wb)}%
    \flo@calc\flo@xb{\flo@xa+(\flo@xd-\flo@xa)/3}\flo@calc\flo@yb{\flo@ya+(\flo@yd-\flo@ya)/3}%
    \flo@calc\flo@xc{\flo@xa+(\flo@xd-\flo@xa)*2/3}\flo@calc\flo@yc{\flo@ya+(\flo@yd-\flo@ya)*2/3}%
    \edef\flo@bghair{\noexpand\flo@vtaper{\flo@xa}{\flo@ya}{\flo@xb}{\flo@yb}{\flo@xc}{\flo@yc}{\flo@xd}{\flo@yd}}%
    \flo@bgcolorat\flo@ya{#6}%
    \ifcase\flo@bgc
      \flo@spk\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spk\flo@bghair}%
      \edef\flo@bgnd{\the\numexpr\flo@bgnd+1}%
    \or
      \flo@spa\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spa\flo@bghair}%
      \edef\flo@bgnp{\the\numexpr\flo@bgnp+1}%
    \else
      \flo@spw\expandafter\expandafter\expandafter{\expandafter\the\expandafter\flo@spw\flo@bghair}%
      \edef\flo@bgnw{\the\numexpr\flo@bgnw+1}%
    \fi}%
  \def\flo@twa{0.013}\def\flo@twb{0.003}%
  \ifnum\flo@bgnd>0 \flo@vtone{flo@c}{\flo@bgfd}\flo@vfill{flo@c}{0.8}{0}{\the\flo@spk}\fi
  \ifnum\flo@bgnp>0 \flo@vtone{flo@c}{\flo@bgpt}\flo@vfill{flo@c}{0.9}{0}{\the\flo@spa}\fi
  \ifnum\flo@bgnw>0 \flo@bgwhite\flo@vfill{flo@c}{0.9}{0}{\the\flo@spw}\fi}
% the abdomen's pattern, in its clip
\def\flo@bgab@honeybee{%
  \flo@calc\flo@bgsp{\flo@bgla/(\flo@xget{bands}+0.6)}\flo@calc\flo@bgbt{0.42*\flo@bgsp}%
  \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{0.88}{0}{%
    \flo@loop{bghb}\flo@Wb{1}{\flo@xget{bands}}{%
      \flo@calc\flo@ya{\flo@bgat-\flo@bgsp*(\the\flo@Wb+0.15)+\flo@bgbt/2}\flo@calc\flo@yb{\flo@ya-\flo@bgbt}%
      \flo@bgband\flo@ya\flo@yb{0.03}}}}
\def\flo@bgab@bumblebee{\flo@vtone{flo@c}{\flo@bgpt}\flo@bgpale{a}}
\def\flo@bgab@solitarybee{%
  \flo@vfill{white}{0.6}{0}{%
    \flo@loop{bgsb}\flo@Wb{1}{\flo@xget{bands}}{%
      \flo@calc\flo@ya{\flo@bgat-\flo@bgla*(0.12+0.17*\the\flo@Wb)}\flo@calc\flo@yb{\flo@ya-0.035}%
      \flo@bgband\flo@ya\flo@yb{0.025}}}}
\def\flo@bgab@hoverfly{%
  \flo@calc\flo@bgsp{\flo@bgla/(\flo@xget{bands}+0.5)}%
  \def\flo@tmp{copper}\ifx\flo@bgground\flo@tmp\flo@vaccent{flo@c}{0.1}%
  \else\flo@calc\flo@t{min(0.86,\flo@bgt+0.4)}\flo@vtone{flo@c}\flo@t\fi
  \flo@vfill{flo@c}{0.92}{0}{%
    \flo@loop{bghf}\flo@Wb{1}{\flo@xget{bands}}{%
      \flo@calc\flo@yd{\flo@bgat-\flo@bgsp*(\the\flo@Wb-0.2)}%
      \flo@calc\flo@twa{0.42*\flo@bgsp}\ifnum\flo@Wb=1 \flo@calc\flo@twa{0.3*\flo@bgsp}\fi
      \flo@calc\flo@twb{0.15*\flo@bgsp}%
      \flo@loop{bghs}\flo@Wc{1}{2}{%
        \ifnum\flo@Wc=1 \def\flo@sx{-1}\else\def\flo@sx{1}\fi
        \flo@calc\flo@xa{\flo@sx*0.03}\flo@calc\flo@ya{\flo@yd+0.01}%
        \flo@calc\flo@xb{\flo@sx*\flo@bgrx*0.4}\flo@calc\flo@yb{\flo@yd+0.03}%
        \flo@calc\flo@xc{\flo@sx*\flo@bgrx*0.75}\flo@calc\flo@yc{\flo@yd}%
        \flo@calc\flo@xe{\flo@sx*\flo@bgrx*1.05}\flo@calc\flo@ye{\flo@yd-0.04}%
        \flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xe\flo@ye}}}}
% the abdomen: its wash, the pattern, mottle, the pooled rim and a highlight down one side
\def\flo@bgpaintab{%
  \flo@vtone{flo@c}{\flo@bgabt}\flo@vfill{flo@c}{1}{0}{\flo@kept{bgab}}%
  \begin{pgfscope}\flo@kept{bgab}\pgfusepath{clip}%
    \csname flo@bgab@\flo@bgk\endcsname
    \ifnum\flo@fine=1
      \flo@calc\flo@bgxl{-\flo@bgrx}\flo@calc\flo@bgyl{\flo@bgat-\flo@bgla}%
      \flo@calc\flo@ta{\flo@bgabt-0.18}\flo@calc\flo@tb{\flo@bgabt+0.17}%
      \flo@vmottle\flo@bgxl\flo@bgyl\flo@bgrx\flo@bgat{4}{0.06}\flo@ta\flo@tb\flo@bgspk
    \fi
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{3.4*\flo@bgu}\flo@vstroke{flo@c}{\flo@t}{\flo@bgrim}{1}{\flo@kept{bgab}}%
    \flo@calc\flo@t{\flo@bgrx/0.19}\flo@calc\flo@v{\flo@bgry/0.3}%
    \flo@calc\flo@xa{-0.1*\flo@t}\flo@calc\flo@ya{\flo@bgay-0.18*\flo@v}\flo@put1\flo@xa\flo@ya
    \flo@calc\flo@xa{-0.13*\flo@t}\flo@calc\flo@ya{\flo@bgay-0.05*\flo@v}\flo@put2\flo@xa\flo@ya
    \flo@calc\flo@xa{-0.12*\flo@t}\flo@calc\flo@ya{\flo@bgay+0.08*\flo@v}\flo@put3\flo@xa\flo@ya
    \flo@calc\flo@xa{-0.08*\flo@t}\flo@calc\flo@ya{\flo@bgay+0.2*\flo@v}\flo@put4\flo@xa\flo@ya
    \flo@vstreak{4}{0.04}{0.008}{white}{0.5}%
  \end{pgfscope}}
% the thorax: a blob, a bumblebee's bands on it, mottle
\def\flo@bgthorax{%
  \flo@calc\flo@t{\flo@bgtr*0.93}\flo@vblob{0}\flo@bgty\flo@bgtr\flo@t{0.1}{12}\flo@keep{bgth}%
  \flo@vtone{flo@c}{\flo@bgtt}\flo@vfill{flo@c}{1}{0}{\flo@kept{bgth}}%
  \begin{pgfscope}\flo@kept{bgth}\pgfusepath{clip}%
    \def\flo@tmp{bumblebee}\ifx\flo@bgk\flo@tmp\flo@vtone{flo@c}{\flo@bgpt}\flo@bgpale{t}\fi
    \ifnum\flo@fine=1
      \flo@calc\flo@bgxl{-\flo@bgtr}\flo@calc\flo@bgyl{\flo@bgty-\flo@bgtr}\flo@calc\flo@bgyh{\flo@bgty+\flo@bgtr}%
      \flo@calc\flo@ta{\flo@bgtt-0.04}\flo@calc\flo@tb{\flo@bgtt+0.24}%
      \flo@vmottle\flo@bgxl\flo@bgyl\flo@bgtr\flo@bgyh{3}{0.05}\flo@ta\flo@tb{6}%
    \fi
  \end{pgfscope}}
% the head: eyes at its sides, or a hoverfly's that nearly cover it; a glint in each
\def\flo@bghead{%
  \flo@vtone{flo@c}{\flo@bght}\flo@vfill{flo@c}{1}{0}{\flo@bgell0\flo@bghy\flo@bghx\flo@bghr}%
  \flo@calc\flo@ya{\flo@bghy+0.008}%
  \def\flo@tmp{hoverfly}\ifx\flo@bgk\flo@tmp
    \def\flo@xa{0.055}\def\flo@xb{0.068}\def\flo@yb{0.08}%
  \else
    \flo@calc\flo@xa{\flo@bghx-0.022}\def\flo@xb{0.028}\def\flo@yb{0.05}%
  \fi
  \flo@vtone{flo@c}{0.02}\flo@vfill{flo@c}{1}{0}{\flo@bgell{-\flo@xa}\flo@ya\flo@xb\flo@yb\flo@bgell\flo@xa\flo@ya\flo@xb\flo@yb}%
  \ifnum\flo@fine=1
    \flo@calc\flo@xc{\flo@xa-0.3*\flo@xb}\flo@calc\flo@yc{\flo@ya+0.35*\flo@yb}%
    \flo@vfill{white}{0.7}{0}{\pgfpathcircle{\flo@P{-\flo@xc}\flo@yc}{0.011pt}\pgfpathcircle{\flo@P\flo@xc\flo@yc}{0.011pt}}%
  \fi}
% feelers: a bee's elbowed, a hoverfly's short with a bristle
\def\flo@bgfeelers{%
  \flo@vtone{flo@c}{0.06}%
  \def\flo@tmp{hoverfly}\ifx\flo@bgk\flo@tmp
    \flo@calc\flo@ya{\flo@bghy+0.07}\flo@calc\flo@yb{\flo@bghy+0.11}\flo@calc\flo@yc{\flo@bghy+0.14}%
    \flo@vstroke{flo@c}{\flo@bgw}{1}{0}{\pgfpathmoveto{\flo@P{-0.02}\flo@ya}\pgfpathlineto{\flo@P{-0.035}\flo@yb}%
      \pgfpathmoveto{\flo@P{0.02}\flo@ya}\pgfpathlineto{\flo@P{0.035}\flo@yb}}%
    \flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P{-0.035}\flo@yb}{0.014pt}\pgfpathcircle{\flo@P{0.035}\flo@yb}{0.014pt}}%
    \ifnum\flo@fine=1 \flo@calc\flo@t{0.5*\flo@bgw}%
      \flo@vstroke{flo@c}{\flo@t}{1}{0}{\pgfpathmoveto{\flo@P{-0.035}\flo@yb}\pgfpathlineto{\flo@P{-0.075}\flo@yc}%
        \pgfpathmoveto{\flo@P{0.035}\flo@yb}\pgfpathlineto{\flo@P{0.075}\flo@yc}}%
    \fi
  \else
    \flo@calc\flo@ya{\flo@bghy+0.05}%
    \flo@vstroke{flo@c}{\flo@bgw}{1}{0}{%
      \flo@loop{bgfl}\flo@Wb{1}{2}{%
        \ifnum\flo@Wb=1 \def\flo@sx{-1}\else\def\flo@sx{1}\fi
        \flo@range\flo@xb{0.05}{0.08}\flo@range\flo@yb{0.11}{0.15}\flo@range\flo@xc{0.11}{0.17}\flo@range\flo@yc{0.17}{0.23}%
        \flo@calc\flo@xa{\flo@sx*0.03}\flo@calc\flo@xb{\flo@sx*\flo@xb}\flo@calc\flo@yb{\flo@bghy+\flo@yb}%
        \flo@calc\flo@xc{\flo@sx*\flo@xc}\flo@calc\flo@yc{\flo@bghy+\flo@yc}%
        \pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}\pgfpathlineto{\flo@P\flo@xc\flo@yc}}}%
  \fi}
% the legs of a side, root, knee and foot (x along the side, y from the thorax's middle):
% spread on a flower, hanging in flight
\def\flo@bgLvi{{0.05}{0.06}{0.17}{0.1}{0.2}{0.22}}\def\flo@bgLvii{{0.06}{0}{0.23}{-0.03}{0.3}{-0.15}}
\def\flo@bgLviii{{0.06}{-0.06}{0.28}{-0.16}{0.32}{-0.42}}
\def\flo@bgLfi{{0.05}{0.04}{0.13}{0}{0.15}{-0.1}}\def\flo@bgLfii{{0.06}{0}{0.17}{-0.08}{0.18}{-0.24}}
\def\flo@bgLfiii{{0.06}{-0.05}{0.21}{-0.16}{0.22}{-0.44}}
% the points of leg \flo@Wb: \flo@bgL[a-f]<i>, the knee and foot moved a little
\def\flo@bglegpts#1#2#3#4#5#6{%
  \edef\flo@bgi{\the\flo@Wb}%
  \flo@calc\flo@t{(#1)*\flo@bglx}\expandafter\let\csname flo@bgLa\flo@bgi\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgty+(#2)}\expandafter\let\csname flo@bgLb\flo@bgi\endcsname\flo@t
  \flo@sym\flo@v{0.02}\flo@calc\flo@t{(#3)*\flo@bglx+\flo@v}\expandafter\let\csname flo@bgLc\flo@bgi\endcsname\flo@t
  \flo@sym\flo@v{0.02}\flo@calc\flo@t{\flo@bgty+(#4)+\flo@v}\expandafter\let\csname flo@bgLd\flo@bgi\endcsname\flo@t
  \flo@sym\flo@v{0.025}\flo@calc\flo@t{(#5)*\flo@bglx+\flo@v}\expandafter\let\csname flo@bgLe\flo@bgi\endcsname\flo@t
  \flo@sym\flo@v{0.025}\flo@calc\flo@t{\flo@bgty+(#6)+\flo@v}\expandafter\let\csname flo@bgLf\flo@bgi\endcsname\flo@t}
% the legs of the side (drawn to the right): thigh and shank tapered; pollen on the hind leg
\def\flo@bglegs{%
  \flo@loop{bglp}\flo@Wb{1}{3}{%
    \expandafter\expandafter\expandafter\flo@bglegpts\csname flo@bgL\flo@bglp\romannumeral\flo@Wb\endcsname}%
  \flo@vtone{flo@c}{0.08}%
  \flo@vfill{flo@c}{1}{0}{\flo@loop{bglg}\flo@Wb{1}{3}{%
    \edef\flo@bgi{\the\flo@Wb}%
    \edef\flo@xa{\csname flo@bgLa\flo@bgi\endcsname}\edef\flo@ya{\csname flo@bgLb\flo@bgi\endcsname}%
    \edef\flo@xd{\csname flo@bgLc\flo@bgi\endcsname}\edef\flo@yd{\csname flo@bgLd\flo@bgi\endcsname}%
    \edef\flo@xe{\csname flo@bgLe\flo@bgi\endcsname}\edef\flo@ye{\csname flo@bgLf\flo@bgi\endcsname}%
    \flo@calc\flo@xb{\flo@xa+(\flo@xd-\flo@xa)/3}\flo@calc\flo@yb{\flo@ya+(\flo@yd-\flo@ya)/3}%
    \flo@calc\flo@xc{\flo@xa+(\flo@xd-\flo@xa)*2/3}\flo@calc\flo@yc{\flo@ya+(\flo@yd-\flo@ya)*2/3}%
    \edef\flo@twa{\flo@bgfw}\flo@calc\flo@twb{\flo@bgfw*0.8}%
    \flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd
    \flo@calc\flo@xb{\flo@xd+(\flo@xe-\flo@xd)/3}\flo@calc\flo@yb{\flo@yd+(\flo@ye-\flo@yd)/3}%
    \flo@calc\flo@xc{\flo@xd+(\flo@xe-\flo@xd)*2/3}\flo@calc\flo@yc{\flo@yd+(\flo@ye-\flo@yd)*2/3}%
    \flo@calc\flo@twa{\flo@bgfw*0.8}\flo@calc\flo@twb{\flo@bgfw*0.35}%
    \flo@vtaper\flo@xd\flo@yd\flo@xb\flo@yb\flo@xc\flo@yc\flo@xe\flo@ye}}%
  \ifnum\flo@xget{pollen}=1
    \flo@calc\flo@da{\csname flo@bgLe3\endcsname-(\csname flo@bgLc3\endcsname)}\flo@calc\flo@db{\csname flo@bgLf3\endcsname-(\csname flo@bgLd3\endcsname)}%
    \flo@nrm\flo@da\flo@db\flo@nx\flo@ny
    \flo@calc\flo@xa{\csname flo@bgLc3\endcsname+0.45*\flo@da}\flo@calc\flo@ya{\csname flo@bgLd3\endcsname+0.45*\flo@db}%
    \flo@calc\flo@xb{\flo@ny*0.065*\flo@bgpr}\flo@calc\flo@yb{-(\flo@nx)*0.065*\flo@bgpr}%
    \flo@calc\flo@xc{\flo@nx*0.042*\flo@bgpr}\flo@calc\flo@yc{\flo@ny*0.042*\flo@bgpr}%
    \flo@vaccent{flo@c}{0}\flo@vfill{flo@c}{1}{0}{\pgfpathellipse{\flo@P\flo@xa\flo@ya}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xc\flo@yc}}%
    \ifnum\flo@fine=1
      \flo@calc\flo@xa{\flo@xa+0.35*\flo@xc-0.25*\flo@xb}\flo@calc\flo@ya{\flo@ya+0.35*\flo@yc-0.25*\flo@yb}%
      \flo@vfill{white}{0.6}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{0.012pt}}%
    \fi
  \fi}
% a wing's outline: eight points round a teardrop #1 long and #2 wide each way, each
% moved a little; kept as #3
\def\flo@bgWd#1#2#3{\expandafter\def\csname flo@bgWx#1\endcsname{#2}\expandafter\def\csname flo@bgWy#1\endcsname{#3}}
\flo@bgWd1{0.02}{0}\flo@bgWd2{0.15}{0.55}\flo@bgWd3{0.45}{0.95}\flo@bgWd4{0.8}{0.85}
\flo@bgWd5{1}{0.25}\flo@bgWd6{0.92}{-0.45}\flo@bgWd7{0.6}{-0.8}\flo@bgWd8{0.25}{-0.55}
\def\flo@bgwingshape#1#2#3{%
  \flo@loop{bgws}\flo@Wb{1}{8}{%
    \flo@sym\flo@t{0.012}\flo@calc\flo@xa{\csname flo@bgWx\the\flo@Wb\endcsname*(#1)+\flo@t}%
    \flo@sym\flo@t{0.012}\flo@calc\flo@ya{\csname flo@bgWy\the\flo@Wb\endcsname*(#2)+\flo@t}%
    \flo@put{\the\flo@Wb}\flo@xa\flo@ya}%
  \flo@smoothprep{8}\flo@keep{#3}}
% veins, at (#1 of the length, #2 of the width): \flo@bgvm moves there, \flo@bgvl draws to it
\def\flo@bgvm#1#2{\flo@calc\flo@xa{(#1)*\flo@bgwl}\flo@calc\flo@ya{(#2)*\flo@bgww}\pgfpathmoveto{\flo@P\flo@xa\flo@ya}}
\def\flo@bgvl#1#2{\flo@calc\flo@xa{(#1)*\flo@bgwl}\flo@calc\flo@ya{(#2)*\flo@bgww}\pgfpathlineto{\flo@P\flo@xa\flo@ya}}
\def\flo@bgV@f{% a bee's forewing
  \flo@bgvm{0.03}{0.3}\flo@bgvl{0.35}{0.72}\flo@bgvl{0.62}{0.78}%
  \flo@bgvm{0.03}{0.05}\flo@bgvl{0.3}{0.2}\flo@bgvl{0.62}{0.25}\flo@bgvl{0.85}{0.32}%
  \flo@bgvm{0.05}{-0.15}\flo@bgvl{0.35}{-0.25}\flo@bgvl{0.6}{-0.3}%
  \flo@bgvm{0.62}{0.78}\flo@bgvl{0.62}{0.25}\flo@bgvl{0.6}{-0.3}}
\def\flo@bgV@h{\flo@bgvm{0.03}{0.05}\flo@bgvl{0.55}{0.15}}
\def\flo@bgV@v{% a hoverfly's wing: the vein that dips before the tip, the cross veins along the edge
  \flo@bgvm{0.03}{0.35}\flo@bgvl{0.5}{0.8}\flo@bgvl{0.85}{0.62}%
  \flo@bgvm{0.03}{0}\flo@bgvl{0.5}{0.1}\flo@bgvl{0.78}{0.22}\flo@bgvl{0.92}{0.05}%
  \flo@bgvm{0.05}{-0.2}\flo@bgvl{0.45}{-0.32}\flo@bgvl{0.72}{-0.28}\flo@bgvl{0.86}{-0.08}%
  \flo@bgvm{0.5}{0.8}\flo@bgvl{0.5}{0.1}\flo@bgvl{0.45}{-0.32}}
% wing #1 (kept) at its root (#2,#3), turned #4 degrees, its wash at opacity #5 in the ink's
% pale; with #6 = 1 its rim and veins (#7: f, h or v)
\def\flo@bgwing#1#2#3#4#5#6#7{\begin{pgfscope}%
  \def\flo@rampname{flo@ramp}%
  \pgftransformshift{\flo@P{#2}{#3}}\pgftransformrotate{#4}%
  \flo@vtone{flo@c}{0.85}\flo@vfill{flo@c}{#5}{0}{\flo@kept{#1}}%
  \ifnum#6=1
    \flo@vtone{flo@c}{0.15}\flo@vstroke{flo@c}{\flo@bglw}{0.75}{0}{\flo@kept{#1}}%
    \ifnum\flo@fine=1 \flo@vtone{flo@c}{0.2}\flo@vstroke{flo@c}{\flo@bgvw}{0.6}{0}{\csname flo@bgV@#7\endcsname}\fi
  \fi\end{pgfscope}}
% the wings of the side: a bee's hindwing under its forewing; still, or a wash of three
\def\flo@bgwings{%
  \flo@bgwingshape\flo@bgFl\flo@bgFw{bgwf}%
  \ifdim\flo@bgHl pt>0pt \flo@bgwingshape\flo@bgHl\flo@bgHw{bgwh}\fi
  \flo@calc\flo@bgyf{\flo@bgty+0.05}\flo@calc\flo@bgyh{\flo@bgty-0.01}%
  \ifnum\flo@bgblur=1
    \flo@loop{bgwb}\flo@Wb{1}{3}{%
      \ifdim\flo@bgHl pt>0pt \flo@calc\flo@t{\flo@bgah+(\the\flo@Wb-2)*\flo@bgdl}\flo@bgwing{bgwh}{0.06}\flo@bgyh\flo@t{0.16}{0}{h}\fi
      \flo@calc\flo@t{\flo@bgaf+(\the\flo@Wb-2)*\flo@bgdl}\flo@bgwing{bgwf}{0.06}\flo@bgyf\flo@t{0.16}{0}{f}}%
  \else
    \ifdim\flo@bgHl pt>0pt \let\flo@bgwl\flo@bgHl\let\flo@bgww\flo@bgHw\flo@bgwing{bgwh}{0.06}\flo@bgyh\flo@bgah{0.55}{1}{h}\fi
    \let\flo@bgwl\flo@bgFl\let\flo@bgww\flo@bgFw\flo@bgwing{bgwf}{0.06}\flo@bgyf\flo@bgaf{0.55}{1}\flo@bgvn
  \fi}
% flora's flight path: a dotted line looping away behind
\def\flo@bgtrail{%
  \flo@range\flo@bgtc{0.16}{0.22}\flo@range\flo@bgtn{1}{1.3}\flo@chance{0.5}%
  \ifflo@yes\def\flo@sx{1}\else\def\flo@sx{-1}\fi
  \flo@calc\flo@t{max(0.6,1.1*\flo@bgu)}\flo@calc\flo@v{max(2.2,3.2*\flo@bgu)}%
  \begin{pgfscope}\pgfsetdash{{0bp}{\flo@v bp}}{0bp}%
  \flo@vtone{flo@c}{0.18}\flo@vstroke{flo@c}{\flo@t}{0.7}{0}{%
    \flo@loop{bgtr}\flo@Wb{0}{40}{%
      \flo@calc\flo@wa{\the\flo@Wb/40*\flo@bgtn*360}%
      \flo@calc\flo@xa{\flo@sx*0.32*sin(\flo@wa)}%
      \flo@calc\flo@ya{\flo@bgtip-0.06-\flo@bgtc*\flo@wa*0.0174533+0.192*(cos(\flo@wa)-1)}%
      \ifnum\flo@Wb=0 \pgfpathmoveto{\flo@P\flo@xa\flo@ya}\else\pgfpathlineto{\flo@P\flo@xa\flo@ya}\fi}}%
  \end{pgfscope}}
% a bee or a hoverfly; #1 its length on the page in pt
\def\flo@bee#1{%
  \flo@calc\flo@bgu{(#1)/28.45276}%
  \ifdim\flo@bgu pt>0.25pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@bgk{\flo@xget{kind}}\edef\flo@bgpose{\flo@xget{pose}}\edef\flo@bgground{\flo@xget{ground}}%
  \edef\flo@bgt{\flo@xget{tone}}\def\flo@bgpt{0.74}%
  \def\flo@tmp{dark}\ifx\flo@bgground\flo@tmp\flo@calc\flo@bgt{\flo@bgt-0.12}\fi
  \def\flo@tmp{pale}\ifx\flo@bgground\flo@tmp\flo@calc\flo@bgt{min(0.78,\flo@bgt+0.32)}\fi% fixed: paler, as a butterfly's
  \def\flo@tmp{copper}\ifx\flo@bgground\flo@tmp\def\flo@rampname{flo@aramp}\def\flo@bgpt{0.6}\fi
  % proportions: the abdomen (its half-width from the build), the thorax, head, wings, legs;
  % the tones of the abdomen, thorax, head, the hair and the pale bands
  \flo@calc\flo@bgrx{0.48*\flo@xget{build}}\def\flo@bgry{0.3}\def\flo@bgsq{1}\def\flo@bgegg{1.12}%
  \def\flo@bgtr{0.13}\def\flo@bghx{0.09}\def\flo@bghr{0.075}%
  \def\flo@bgFl{0.52}\def\flo@bgFw{0.12}\def\flo@bgHl{0.38}\def\flo@bgHw{0.08}\def\flo@bgvn{f}%
  \def\flo@bgfw{0.032}\def\flo@bgpr{1}%
  \edef\flo@bgabt{\flo@bgt}\def\flo@bgtt{0.06}\def\flo@bght{0.04}\edef\flo@bgfd{\flo@bgt}%
  \def\flo@bgspk{4}\def\flo@bgrim{0.4}%
  \def\flo@tmp{honeybee}\ifx\flo@bgk\flo@tmp\flo@calc\flo@bgtt{max(0.06,\flo@bgt-0.24)}\fi
  \def\flo@tmp{bumblebee}\ifx\flo@bgk\flo@tmp
    \def\flo@bgegg{1}\def\flo@bgtr{0.16}\def\flo@bghx{0.1}\def\flo@bgFl{0.48}\def\flo@bgFw{0.11}%
    \def\flo@bgHl{0.34}\def\flo@bgfw{0.036}\def\flo@bgpr{1.2}\def\flo@bgabt{0.06}\def\flo@bgtt{0.05}%
    \def\flo@bgfd{0.08}\def\flo@bgspk{14}\def\flo@bgrim{0.15}\fi
  \def\flo@tmp{solitarybee}\ifx\flo@bgk\flo@tmp
    \def\flo@bgry{0.32}\def\flo@bgtr{0.11}\def\flo@bghx{0.08}\def\flo@bgpr{0.9}%
    \flo@calc\flo@bgabt{max(0.05,\flo@bgt-0.24)}\fi
  \def\flo@tmp{hoverfly}\ifx\flo@bgk\flo@tmp
    \flo@calc\flo@bgrx{0.42*\flo@xget{build}}\def\flo@bgsq{0.8}\def\flo@bgegg{1.2}\def\flo@bgtr{0.12}\def\flo@bghx{0.13}%
    \def\flo@bghr{0.085}\def\flo@bgFl{0.62}\def\flo@bgHl{0}\def\flo@bgvn{v}\def\flo@bgfw{0.022}%
    \def\flo@bgabt{0.08}\def\flo@bgtt{0.08}\def\flo@bght{0.1}\def\flo@bgfd{0.25}\fi
  % where things are along the body: the thorax, head, the abdomen's top, middle and tip
  \def\flo@bgty{0.15}\flo@calc\flo@bghy{\flo@bgty+\flo@bgtr+0.04}%
  \flo@calc\flo@bgat{\flo@bgty-\flo@bgtr+0.09}\flo@calc\flo@bgay{\flo@bgat-\flo@bgry}%
  \flo@calc\flo@bgla{\flo@bgry*(1+0.98*\flo@bgegg)}\flo@calc\flo@bgtip{\flo@bgat-\flo@bgla}%
  \flo@calc\flo@bglx{0.6+2*\flo@bgrx}%
  % a bumblebee's pale bands: the collar, the second segment, the back of the thorax, the
  % first segment; the tail
  \expandafter\def\csname flo@bgbp1\endcsname{t}\expandafter\def\csname flo@bgbp2\endcsname{a}%
  \expandafter\def\csname flo@bgbp3\endcsname{t}\expandafter\def\csname flo@bgbp4\endcsname{a}%
  \flo@calc\flo@t{\flo@bgty+\flo@bgtr+0.03}\expandafter\let\csname flo@bgbh1\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgty+0.4*\flo@bgtr}\expandafter\let\csname flo@bgbl1\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgat-0.3*\flo@bgla}\expandafter\let\csname flo@bgbh2\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgat-0.5*\flo@bgla}\expandafter\let\csname flo@bgbl2\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgty-0.5*\flo@bgtr}\expandafter\let\csname flo@bgbh3\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgty-\flo@bgtr-0.03}\expandafter\let\csname flo@bgbl3\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgat+0.03}\expandafter\let\csname flo@bgbh4\endcsname\flo@t
  \flo@calc\flo@t{\flo@bgat-0.17*\flo@bgla}\expandafter\let\csname flo@bgbl4\endcsname\flo@t
  \flo@calc\flo@bgtl{\flo@bgat-0.7*\flo@bgla}%
  % line widths
  \flo@calc\flo@bgw{max(0.25,0.45*\flo@bgu)}\flo@calc\flo@bglw{max(0.2,0.35*\flo@bgu)}%
  \flo@calc\flo@bgvw{max(0.15,0.25*\flo@bgu)}%
  % the pose: legs, the wings' angles, a wash of three
  \def\flo@bglp{v}\def\flo@bgblur{0}\def\flo@bgaf{-70}\def\flo@bgah{-78}\def\flo@bgdl{0}%
  \def\flo@tmp{fly}\ifx\flo@bgpose\flo@tmp\def\flo@bglp{f}\def\flo@bgblur{1}\def\flo@bgaf{14}\def\flo@bgah{-4}\def\flo@bgdl{16}\fi
  \def\flo@tmp{rest}\ifx\flo@bgpose\flo@tmp\def\flo@bgaf{-45}\fi
  \def\flo@tmp{hover}\ifx\flo@bgpose\flo@tmp\def\flo@bglp{f}\def\flo@bgblur{1}\def\flo@bgaf{10}\def\flo@bgdl{22}\fi
  % the trail, the legs, the abdomen (a bumblebee's furred), the thorax and its hair, the
  % head and feelers, the wings
  \def\flo@tmp{fly}\ifx\flo@bgpose\flo@tmp\flo@bgtrail\fi
  \flo@loop{bgsl}\flo@Wa{1}{2}{\begin{pgfscope}\ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi\flo@bglegs\end{pgfscope}}%
  \flo@bgabdomen\flo@bgpaintab
  \def\flo@tmp{hoverfly}\ifx\flo@bgk\flo@tmp\else\def\flo@tmp{bumblebee}\ifx\flo@bgk\flo@tmp\else
    \flo@calc\flo@ya{\flo@bgtip+0.04}\flo@calc\flo@yb{\flo@bgtip-0.05}%
    \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{-0.022}\flo@ya}%
      \pgfpathlineto{\flo@P0\flo@yb}\pgfpathlineto{\flo@P{0.022}\flo@ya}\pgfpathclose}%
  \fi\fi
  \def\flo@tmp{bumblebee}\ifx\flo@bgk\flo@tmp
    \pgfmathtruncatemacro\flo@bgnf{24+60*\flo@xget{hair}}\flo@calc\flo@bgrb{\flo@bgry*\flo@bgegg}%
    \flo@bgfur\flo@bgay\flo@bgrx\flo@bgnf\flo@bgry\flo@bgrb{a}%
  \fi
  \flo@bgthorax
  \pgfmathtruncatemacro\flo@bgnf{6+40*\flo@xget{hair}}\flo@calc\flo@bgrb{\flo@bgtr*0.93}%
  \flo@bgfur\flo@bgty\flo@bgtr\flo@bgnf\flo@bgrb\flo@bgrb{t}%
  \flo@bghead\flo@bgfeelers
  \flo@loop{bgsw}\flo@Wa{1}{2}{\begin{pgfscope}\ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi\flo@bgwings\end{pgfscope}}}
% ---------------------------------------------------------------- jointed legs
% The legs of a side (drawn to the right) from table #1: per leg its root, knee, foot and
% the end of its tarsus, (x, y) from (0, \flo@lgy), times \flo@lgx; the knee, foot and end
% further out by \flo@lgex and moved a little (up to \flo@lgj); the feet of the first and
% last legs shifted \flo@lgph along the body and the middle one's back (a walking gait);
% thigh, shank and tarsus tapered from the width \flo@lgw
\def\flo@lgoi{{0.025}{0.03}{0.06}{0.06}{0.07}{0.11}{0.065}{0.15}}
\def\flo@lgoii{{0.03}{0}{0.075}{0.02}{0.095}{0.07}{0.095}{0.1}}
\def\flo@lgoiii{{0.03}{-0.03}{0.085}{-0.03}{0.11}{0.01}{0.115}{0.045}}
\def\flo@lgbi{{0.06}{0.08}{-0.06}{0.13}{0.02}{0.27}{0.04}{0.34}}
\def\flo@lgbii{{0.08}{-0.04}{0}{-0.02}{0.1}{-0.1}{0.15}{-0.14}}
\def\flo@lgbiii{{0.08}{-0.12}{-0.02}{-0.24}{0.06}{-0.42}{0.08}{-0.5}}
\def\flo@lgpts#1#2#3#4#5#6#7#8{%
  \edef\flo@lgi{\the\flo@Wb}%
  \ifnum\flo@Wb=2 \flo@calc\flo@lgp{-(\flo@lgph)}\else\edef\flo@lgp{\flo@lgph}\fi
  \flo@calc\flo@t{(#1)*\flo@lgx}\expandafter\let\csname flo@lg\flo@lgi a\endcsname\flo@t
  \flo@calc\flo@t{\flo@lgy+(#2)*\flo@lgx}\expandafter\let\csname flo@lg\flo@lgi b\endcsname\flo@t
  \flo@sym\flo@v{\flo@lgj}\flo@calc\flo@t{(#3)*\flo@lgx+\flo@lgex+\flo@v}\expandafter\let\csname flo@lg\flo@lgi c\endcsname\flo@t
  \flo@sym\flo@v{\flo@lgj}\flo@calc\flo@t{\flo@lgy+(#4)*\flo@lgx+\flo@v}\expandafter\let\csname flo@lg\flo@lgi d\endcsname\flo@t
  \flo@sym\flo@v{\flo@lgj}\flo@calc\flo@lgfx{(#5)*\flo@lgx+\flo@lgex+\flo@v}\expandafter\let\csname flo@lg\flo@lgi e\endcsname\flo@lgfx
  \flo@sym\flo@v{\flo@lgj}\flo@calc\flo@lgfy{\flo@lgy+(#6)*\flo@lgx+\flo@lgp+\flo@v}\expandafter\let\csname flo@lg\flo@lgi f\endcsname\flo@lgfy
  \flo@calc\flo@t{\flo@lgfx+((#7)-(#5))*\flo@lgx}\expandafter\let\csname flo@lg\flo@lgi g\endcsname\flo@t
  \flo@calc\flo@t{\flo@lgfy+((#8)-(#6))*\flo@lgx}\expandafter\let\csname flo@lg\flo@lgi h\endcsname\flo@t}
% a segment of a leg from (#1,#2) to (#3,#4), widths \flo@twa to \flo@twb
\def\flo@lgseg#1#2#3#4{%
  \flo@calc\flo@xb{#1+(#3-(#1))/3}\flo@calc\flo@yb{#2+(#4-(#2))/3}%
  \flo@calc\flo@xc{#1+(#3-(#1))*2/3}\flo@calc\flo@yc{#2+(#4-(#2))*2/3}%
  \flo@vtaper{#1}{#2}\flo@xb\flo@yb\flo@xc\flo@yc{#3}{#4}}
\def\flo@vlegs#1{%
  \flo@loop{lgpt}\flo@Wb{1}{3}{%
    \expandafter\expandafter\expandafter\flo@lgpts\csname flo@lg#1\romannumeral\flo@Wb\endcsname}%
  \flo@vfill{flo@c}{1}{0}{\flo@loop{lgdr}\flo@Wb{1}{3}{%
    \edef\flo@lgi{\the\flo@Wb}%
    \edef\flo@lga{\csname flo@lg\flo@lgi a\endcsname}\edef\flo@lgb{\csname flo@lg\flo@lgi b\endcsname}%
    \edef\flo@lgc{\csname flo@lg\flo@lgi c\endcsname}\edef\flo@lgd{\csname flo@lg\flo@lgi d\endcsname}%
    \edef\flo@lge{\csname flo@lg\flo@lgi e\endcsname}\edef\flo@lgf{\csname flo@lg\flo@lgi f\endcsname}%
    \edef\flo@lgg{\csname flo@lg\flo@lgi g\endcsname}\edef\flo@lgh{\csname flo@lg\flo@lgi h\endcsname}%
    \edef\flo@twa{\flo@lgw}\flo@calc\flo@twb{\flo@lgw*0.8}\flo@lgseg\flo@lga\flo@lgb\flo@lgc\flo@lgd
    \flo@calc\flo@twa{\flo@lgw*0.75}\flo@calc\flo@twb{\flo@lgw*0.45}\flo@lgseg\flo@lgc\flo@lgd\flo@lge\flo@lgf
    \flo@calc\flo@twa{\flo@lgw*0.4}\flo@calc\flo@twb{\flo@lgw*0.2}\flo@lgseg\flo@lge\flo@lgf\flo@lgg\flo@lgh}}}
% ---------------------------------------------------------------- dragonflies and damselflies
% Dragonflies and damselflies, seen from above, in units of the body's length, the head
% toward +y. A dragonfly perches with its four wings held out flat (pose cross), the hind
% ones broader at the root, and its eyes meet on top of its head. A damselfly is a needle
% with its eyes far apart and its wings narrow at the root, folded together along its back
% or held half open (spread). The wings: a clear or tinted wash, the long veins and, when
% large, the net of cross veins between them; the dark spot near the tip of the leading
% edge (stigma). The abdomen: ten segments, the hindmost ringed dark, as many as its bands.
% a wing's outline: ten points (along the wing, across it in units of its width), table #1
\def\flo@odWd#1#2#3#4{\expandafter\def\csname flo@odW#1x#2\endcsname{#3}\expandafter\def\csname flo@odW#1y#2\endcsname{#4}}
\flo@odWd f1{0.01}{0.35}\flo@odWd f2{0.12}{0.75}\flo@odWd f3{0.45}{0.95}\flo@odWd f4{0.8}{0.9}\flo@odWd f5{0.97}{0.55}
\flo@odWd f6{1}{0.1}\flo@odWd f7{0.93}{-0.45}\flo@odWd f8{0.7}{-0.75}\flo@odWd f9{0.35}{-0.85}\flo@odWd f{10}{0.08}{-0.6}
\flo@odWd h1{0.01}{0.35}\flo@odWd h2{0.15}{0.8}\flo@odWd h3{0.5}{0.95}\flo@odWd h4{0.85}{0.85}\flo@odWd h5{1}{0.3}
\flo@odWd h6{0.96}{-0.35}\flo@odWd h7{0.75}{-0.75}\flo@odWd h8{0.45}{-1}\flo@odWd h9{0.2}{-1.45}\flo@odWd h{10}{0.04}{-0.8}
\flo@odWd d1{0}{0.1}\flo@odWd d2{0.2}{0.2}\flo@odWd d3{0.45}{0.8}\flo@odWd d4{0.78}{0.98}\flo@odWd d5{0.98}{0.6}
\flo@odWd d6{1}{0}\flo@odWd d7{0.94}{-0.6}\flo@odWd d8{0.75}{-0.9}\flo@odWd d9{0.45}{-0.6}\flo@odWd d{10}{0.2}{-0.2}
% the long veins of table #1, 0 the leading edge's side and 5 the trailing edge's (both
% outside the wing): across the wing at its root, middle and tip
\def\flo@odVd#1#2#3#4#5{\expandafter\def\csname flo@odV#1#2\endcsname{{#3}{#4}{#5}}}
\flo@odVd f0{1.3}{1.3}{1.3}\flo@odVd f1{0.45}{0.72}{0.5}\flo@odVd f2{0.15}{0.3}{0.05}
\flo@odVd f3{-0.1}{-0.3}{-0.45}\flo@odVd f4{-0.3}{-0.7}{-0.8}\flo@odVd f5{-1.6}{-1.6}{-1.6}
\flo@odVd h0{1.3}{1.3}{1.3}\flo@odVd h1{0.45}{0.72}{0.5}\flo@odVd h2{0.15}{0.3}{0.05}
\flo@odVd h3{-0.1}{-0.35}{-0.45}\flo@odVd h4{-0.4}{-0.9}{-0.8}\flo@odVd h5{-1.6}{-1.6}{-1.6}
\flo@odVd d0{1.3}{1.3}{1.3}\flo@odVd d1{0.06}{0.6}{0.4}\flo@odVd d2{0.02}{0.2}{0}
\flo@odVd d3{-0.02}{-0.25}{-0.4}\flo@odVd d4{-0.06}{-0.5}{-0.7}\flo@odVd d5{-1.6}{-1.6}{-1.6}
% \flo@odvat{vein}{u}: the vein's place across the wing at u along it, into \flo@odvv
\def\flo@odvat#1#2{\expandafter\expandafter\expandafter\flo@odvat@\csname flo@odV\flo@odwk#1\endcsname{#2}}
\def\flo@odvat@#1#2#3#4{\flo@calc\flo@odvv{(#4<0.5 ? #1+(#2-(#1))*2*#4 : #2+(#3-(#2))*(2*#4-1))}}
% a wing's outline from table #1, #2 long and #3 wide, each point moved a little; kept as #4
\def\flo@odwingshape#1#2#3#4{%
  \flo@loop{odws}\flo@Wb{1}{10}{%
    \flo@sym\flo@t{0.008}\flo@calc\flo@xa{\csname flo@odW#1x\the\flo@Wb\endcsname*(#2)+\flo@t}%
    \flo@sym\flo@t{0.008}\flo@calc\flo@ya{\csname flo@odW#1y\the\flo@Wb\endcsname*(#3)+\flo@t}%
    \flo@put{\the\flo@Wb}\flo@xa\flo@ya}%
  \flo@smoothprep{10}\flo@keep{#4}}
% wing #1 (kept, table \flo@odwk, \flo@odwl long, \flo@odww wide) at its root (#2,#3),
% turned #4 degrees: its wash, a tinted wing's darker root, the stigma, the veins, the rim
\def\flo@odwing#1#2#3#4{\begin{pgfscope}%
  \pgftransformshift{\flo@P{#2}{#3}}\pgftransformrotate{#4}%
  \begin{pgfscope}\def\flo@rampname{flo@ramp}%
    \flo@vtone{flo@c}{\flo@odwt}\flo@vfill{flo@c}{\flo@odwo}{0}{\flo@kept{#1}}\end{pgfscope}%
  \begin{pgfscope}\flo@kept{#1}\pgfusepath{clip}%
    \def\flo@tmp{tinted}\edef\flo@t{\flo@xget{tint}}\ifx\flo@t\flo@tmp
      \flo@calc\flo@xa{0.1*\flo@odwl}\flo@calc\flo@ya{-0.2*\flo@odww}\flo@calc\flo@xb{0.2*\flo@odwl}\flo@calc\flo@yb{1.2*\flo@odww}%
      \flo@vtone{flo@c}{0.45}\flo@vfill{flo@c}{0.3}{0}{\flo@bgell\flo@xa\flo@ya\flo@xb\flo@yb}%
    \fi
    \ifnum\flo@xget{stigma}=1
      \flo@calc\flo@xa{0.83*\flo@odwl}\flo@calc\flo@xb{0.91*\flo@odwl}\flo@calc\flo@ya{1.3*\flo@odww}\flo@calc\flo@yb{0.55*\flo@odww}%
      \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{0.9}{0}{\pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@ya}%
        \pgfpathlineto{\flo@P\flo@xb\flo@yb}\pgfpathlineto{\flo@P\flo@xa\flo@yb}\pgfpathclose}%
    \fi
    \ifnum\flo@fine=1
      \begin{pgfscope}\def\flo@rampname{flo@ramp}\flo@vtone{flo@c}{0.15}%
      \flo@vstroke{flo@c}{\flo@odvw}{0.6}{0}{\flo@loop{odvl}\flo@Wc{1}{4}{%
        \expandafter\expandafter\expandafter\flo@odvein\csname flo@odV\flo@odwk\the\flo@Wc\endcsname}}%
      \ifnum\flo@odnet=1
        \flo@vtone{flo@c}{0.2}\flo@vstroke{flo@c}{\flo@odnw}{0.45}{0}{%
          \flo@loop{odng}\flo@Wc{1}{5}{%
            \flo@loop{odnt}\flo@Wd{1}{22}{%
              \flo@sym\flo@t{0.3}\flo@calc\flo@u{(\the\flo@Wd-0.5+\flo@t)/22*0.96+0.02}%
              \flo@odvat{\the\numexpr\flo@Wc-1\relax}\flo@u\flo@calc\flo@ya{\flo@odvv*\flo@odww}%
              \flo@odvat{\the\flo@Wc}\flo@u\flo@calc\flo@yb{\flo@odvv*\flo@odww}%
              \flo@calc\flo@xa{\flo@u*\flo@odwl}\flo@sym\flo@t{0.01}\flo@calc\flo@xb{(\flo@u+\flo@t)*\flo@odwl}%
              \pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}}}}%
      \fi\end{pgfscope}%
    \fi
  \end{pgfscope}%
  \ifnum\flo@fine=1 \begin{pgfscope}\def\flo@rampname{flo@ramp}%
    \flo@vtone{flo@c}{0.15}\flo@vstroke{flo@c}{\flo@odlw}{0.7}{0}{\flo@kept{#1}}\end{pgfscope}\fi
  \end{pgfscope}}
\def\flo@odvein#1#2#3{%
  \flo@calc\flo@ya{(#1)*\flo@odww}\pgfpathmoveto{\flo@P0\flo@ya}%
  \flo@calc\flo@xa{0.5*\flo@odwl}\flo@calc\flo@ya{(#2)*\flo@odww}\pgfpathlineto{\flo@P\flo@xa\flo@ya}%
  \flo@calc\flo@ya{(#3)*\flo@odww}\pgfpathlineto{\flo@P\flo@odwl\flo@ya}}
% the wings of the side: the hind one under the fore
\def\flo@odwings{%
  \flo@odwingshape\flo@odhk\flo@odHl\flo@odHw{odwh}\flo@odwingshape\flo@odfk\flo@odFl\flo@odFw{odwf}%
  \flo@calc\flo@ya{\flo@odty-\flo@odhd}\edef\flo@odwk{\flo@odhk}\let\flo@odwl\flo@odHl\let\flo@odww\flo@odHw
  \flo@odwing{odwh}{\flo@odrx}\flo@ya\flo@odah
  \flo@calc\flo@ya{\flo@odty+\flo@odfd}\edef\flo@odwk{\flo@odfk}\let\flo@odwl\flo@odFl\let\flo@odww\flo@odFw
  \flo@odwing{odwf}{\flo@odrx}\flo@ya\flo@odaf}
% the abdomen's outline: twelve points down each side, swollen at its root, round at its
% tip; kept as odab
\def\flo@odabdomen{%
  \flo@loop{odao}\flo@Wa{0}{11}{%
    \flo@calc\flo@v{\the\flo@Wa/11}%
    \flo@calc\flo@h{\flo@odaw*(1+\flo@odbul*exp(-min(9,\flo@v*\flo@v/0.012)))*min(1,(1.04-\flo@v)*5)}%
    \flo@calc\flo@ya{\flo@odat+(\flo@odtip-\flo@odat)*\flo@v}\flo@calc\flo@xa{-\flo@h}%
    \flo@put{\the\numexpr\flo@Wa+1\relax}\flo@h\flo@ya\flo@put{\the\numexpr24-\flo@Wa\relax}\flo@xa\flo@ya}%
  \flo@smoothprep{24}\flo@keep{odab}}
% the end of segment #1 down the abdomen, into \flo@odsv (0 its root, 1 its tip)
\def\flo@odseg#1{\flo@calc\flo@odsv{(#1)<1 ? 0 : pow((#1)/10,1.12)}}
% the abdomen: its wash, the dark rings, the joints, a highlight, the pooled rim
\def\flo@odpaintab{%
  \flo@vtone{flo@c}{\flo@odt}\flo@vfill{flo@c}{1}{0}{\flo@kept{odab}}%
  \begin{pgfscope}\flo@kept{odab}\pgfusepath{clip}%
    \ifnum\flo@xget{bands}>0
      \flo@vtone{flo@c}{0.04}\flo@vfill{flo@c}{0.85}{0}{%
        \flo@loop{odbd}\flo@Wb{1}{\flo@xget{bands}}{%
          \edef\flo@odsn{\the\numexpr10-\flo@xget{bands}+\flo@Wb\relax}%
          \flo@odseg{\flo@odsn-1}\let\flo@odsa\flo@odsv\flo@odseg\flo@odsn
          \flo@calc\flo@ya{\flo@odat+(\flo@odtip-\flo@odat)*(\flo@odsa+0.6*(\flo@odsv-\flo@odsa))}%
          \flo@calc\flo@yb{\flo@odat+(\flo@odtip-\flo@odat)*\flo@odsv-0.01}%
          \flo@bgband\flo@ya\flo@yb{0.004}}}%
    \fi
    \ifnum\flo@fine=1
      \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@odjw}{0.5}{0}{%
        \flo@loop{odjn}\flo@Wb{1}{9}{%
          \flo@odseg{\the\flo@Wb}\flo@calc\flo@ya{\flo@odat+(\flo@odtip-\flo@odat)*\flo@odsv}%
          \pgfpathmoveto{\flo@P{-0.1}\flo@ya}\pgfpathlineto{\flo@P{0.1}\flo@ya}}}%
      \flo@calc\flo@t{\flo@odtip-\flo@odat}%
      \flo@calc\flo@xa{-0.4*\flo@odaw}\flo@calc\flo@ya{\flo@odat+0.06*\flo@t}\flo@put1\flo@xa\flo@ya
      \flo@calc\flo@xa{-0.45*\flo@odaw}\flo@calc\flo@ya{\flo@odat+0.3*\flo@t}\flo@put2\flo@xa\flo@ya
      \flo@calc\flo@xa{-0.45*\flo@odaw}\flo@calc\flo@ya{\flo@odat+0.6*\flo@t}\flo@put3\flo@xa\flo@ya
      \flo@calc\flo@xa{-0.35*\flo@odaw}\flo@calc\flo@ya{\flo@odat+0.85*\flo@t}\flo@put4\flo@xa\flo@ya
      \flo@calc\flo@stw{0.5*\flo@odaw}\flo@vstreak{4}\flo@stw{0.004}{white}{0.45}%
    \fi
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{1.4*\flo@odu}\flo@vstroke{flo@c}{\flo@t}{0.35}{1}{\flo@kept{odab}}%
  \end{pgfscope}%
  \ifnum\flo@fine=1
    \flo@calc\flo@ya{\flo@odtip+0.012}\flo@calc\flo@yb{\flo@odtip-0.022}%
    \flo@calc\flo@xa{0.5*\flo@odaw}\flo@calc\flo@xb{0.9*\flo@odaw}%
    \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@odjw}{1}{0}{\pgfpathmoveto{\flo@P{-\flo@xa}\flo@ya}%
      \pgfpathlineto{\flo@P{-\flo@xb}\flo@yb}\pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}}%
  \fi}
% the thorax: a blob, a dragonfly's pale stripes on its shoulders, the rim
\def\flo@odthorax{%
  \flo@vblob{0}\flo@odty\flo@odtr\flo@odth{0.06}{10}\flo@keep{odth}%
  \flo@vtone{flo@c}{\flo@odtt}\flo@vfill{flo@c}{1}{0}{\flo@kept{odth}}%
  \begin{pgfscope}\flo@kept{odth}\pgfusepath{clip}%
    \ifnum\flo@fine=1
      \flo@calc\flo@twa{0.3*\flo@odtr}\flo@calc\flo@twb{0.12*\flo@odtr}%
      \flo@vfill{white}{0.35}{0}{\flo@loop{odts}\flo@Wb{1}{2}{%
        \ifnum\flo@Wb=1 \def\flo@sx{-1}\else\def\flo@sx{1}\fi
        \flo@calc\flo@xa{\flo@sx*0.3*\flo@odtr}\flo@calc\flo@ya{\flo@odty+0.75*\flo@odth}%
        \flo@calc\flo@xd{\flo@sx*0.6*\flo@odtr}\flo@calc\flo@yd{\flo@odty-0.45*\flo@odth}%
        \flo@lgseg\flo@xa\flo@ya\flo@xd\flo@yd}}%
    \fi
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{1.2*\flo@odu}\flo@vstroke{flo@c}{\flo@t}{0.4}{1}{\flo@kept{odth}}%
  \end{pgfscope}}
% the head: a dragonfly's eyes meet on top, a damselfly's stand apart; a glint in each
\def\flo@odhead{%
  \flo@vtone{flo@c}{0.06}\flo@vfill{flo@c}{1}{0}{\flo@bgell0\flo@odhy\flo@odhx\flo@odhr}%
  \flo@calc\flo@ya{\flo@odhy+\flo@odey}%
  \flo@vtone{flo@c}{\flo@odet}\flo@vfill{flo@c}{1}{0}{\flo@bgell{-\flo@odex}\flo@ya\flo@oder\flo@oder
    \flo@bgell\flo@odex\flo@ya\flo@oder\flo@oder}%
  \ifnum\flo@fine=1
    \flo@calc\flo@xa{\flo@odex-0.35*\flo@oder}\flo@calc\flo@yb{\flo@ya+0.4*\flo@oder}\flo@calc\flo@t{0.22*\flo@oder}%
    \flo@vfill{white}{0.7}{0}{\pgfpathcircle{\flo@P{-\flo@xa}\flo@yb}{\flo@t pt}\pgfpathcircle{\flo@P\flo@xa\flo@yb}{\flo@t pt}}%
  \fi}
% a dragonfly or a damselfly; #1 its length on the page in pt
\def\flo@odo#1{%
  \flo@calc\flo@odu{(#1)/28.45276}%
  \ifdim\flo@odu pt>0.4pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \ifdim\flo@odu pt>1.5pt \def\flo@odnet{1}\else\def\flo@odnet{0}\fi
  \edef\flo@odk{\flo@xget{kind}}\edef\flo@odpose{\flo@xget{pose}}\edef\flo@odground{\flo@xget{ground}}%
  \edef\flo@odt{\flo@xget{tone}}%
  \def\flo@tmp{dark}\ifx\flo@odground\flo@tmp\flo@calc\flo@odt{\flo@odt-0.12}\fi
  \def\flo@tmp{copper}\ifx\flo@odground\flo@tmp\def\flo@rampname{flo@aramp}\fi
  \flo@calc\flo@odtt{max(0.05,\flo@odt-0.08)}\flo@calc\flo@odet{max(0.06,\flo@odt-0.1)}%
  \def\flo@tmp{tinted}\edef\flo@t{\flo@xget{tint}}%
  \ifx\flo@t\flo@tmp\def\flo@odwt{0.7}\def\flo@odwo{0.42}\else\def\flo@odwt{0.88}\def\flo@odwo{0.28}\fi
  % proportions: a dragonfly's, then a damselfly's
  \def\flo@odaw{0.032}\def\flo@odbul{0.7}\def\flo@odat{0.16}\def\flo@odtip{-0.62}%
  \def\flo@odty{0.235}\def\flo@odtr{0.066}\def\flo@odth{0.08}%
  \def\flo@odhy{0.34}\def\flo@odhx{0.075}\def\flo@odhr{0.048}\def\flo@odex{0.038}\def\flo@odey{0.006}\def\flo@oder{0.046}%
  \def\flo@odfk{f}\def\flo@odhk{h}\def\flo@odFl{0.62}\def\flo@odFw{0.065}\def\flo@odHl{0.6}\def\flo@odHw{0.075}%
  \def\flo@odrx{0.02}\def\flo@odfd{0.03}\def\flo@odhd{0.035}\def\flo@odaf{8}\def\flo@odah{-6}%
  \def\flo@lgx{1}\def\flo@lgw{0.014}%
  \def\flo@tmp{damselfly}\ifx\flo@odk\flo@tmp
    \def\flo@odaw{0.016}\def\flo@odbul{0.5}\def\flo@odat{0.2}\def\flo@odtip{-0.66}%
    \def\flo@odty{0.26}\def\flo@odtr{0.04}\def\flo@odth{0.058}%
    \def\flo@odhy{0.34}\def\flo@odhx{0.075}\def\flo@odhr{0.028}\def\flo@odex{0.058}\def\flo@odey{0}\def\flo@oder{0.026}%
    \def\flo@odfk{d}\def\flo@odhk{d}\def\flo@odFl{0.5}\def\flo@odFw{0.06}\def\flo@odHl{0.48}\def\flo@odHw{0.06}%
    \def\flo@odrx{0.012}\def\flo@odfd{0.02}\def\flo@odhd{0.02}\def\flo@odaf{-84}\def\flo@odah{-88}%
    \def\flo@lgx{0.75}\def\flo@lgw{0.01}%
    \def\flo@tmp{spread}\ifx\flo@odpose\flo@tmp\def\flo@odaf{-38}\def\flo@odah{-50}\else\def\flo@odFw{0.032}\def\flo@odHw{0.032}\fi
  \fi
  % line widths
  \flo@calc\flo@odlw{max(0.18,0.3*\flo@odu)}\flo@calc\flo@odvw{max(0.12,0.22*\flo@odu)}%
  \flo@calc\flo@odnw{max(0.08,0.1*\flo@odu)}\flo@calc\flo@odjw{max(0.1,0.18*\flo@odu)}%
  % the legs, the abdomen, the thorax, the head, the wings
  \edef\flo@lgy{\flo@odty}\def\flo@lgex{0}\def\flo@lgj{0.006}\def\flo@lgph{0}%
  \flo@vtone{flo@c}{0.06}%
  \flo@loop{odsl}\flo@Wa{1}{2}{\begin{pgfscope}\ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi\flo@vlegs{o}\end{pgfscope}}%
  \flo@odabdomen\flo@odpaintab\flo@odthorax\flo@odhead
  \flo@loop{odsw}\flo@Wa{1}{2}{\begin{pgfscope}\ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi\flo@odwings\end{pgfscope}}}
% ---------------------------------------------------------------- beetles and ladybirds
% Beetles and ladybirds, seen from above as they walk, in units of the body's length, the
% head toward +y. The wing cases (elytra) meet down a seam; in front of them the shield
% of the thorax (pronotum) and the head, a small triangle (scutellum) at the top of the
% seam; six jointed legs, a gait apart on the two sides; feelers like threads, clubbed or
% combed. A beetle's cases are plain, striped or spotted, glossy; a ladybird is a dome, red
% with black spots (or black with red), its shield black with white patches at the front.
\def\flo@btelytra{%
  \flo@loop{bteo}\flo@Wa{1}{16}{%
    \flo@calc\flo@wa{22.5*\the\flo@Wa-11.25}\flo@calc\flo@t{cos(\flo@wa)}\flo@calc\flo@v{sin(\flo@wa)}%
    \flo@calc\flo@xa{\flo@btew*(\flo@t<0 ? -1 : 1)*pow(abs(\flo@t),\flo@btsq)}%
    \flo@calc\flo@ya{\flo@btey+\flo@v*(\flo@v<0 ? \flo@btrb : \flo@btrt)}%
    \flo@put{\the\flo@Wa}\flo@xa\flo@ya}%
  \flo@smoothprep{16}\flo@keep{btel}}
% the shield behind the head: ten points, its back #1 wide and over the cases by
% \flo@btso, its front #2 wide and #3 ahead of the cases; kept as btpn
\def\flo@btshield#1#2#3{%
  \flo@calc\flo@btsa{\flo@btet-\flo@btso}\flo@calc\flo@btsb{\flo@btet+(#3)}\flo@calc\flo@btsl{\flo@btsb-\flo@btsa}%
  \flo@calc\flo@xa{0.55*(#1)}\flo@calc\flo@xb{-\flo@xa}\flo@calc\flo@ya{\flo@btsa-0.01}\flo@put1\flo@xa\flo@ya\flo@put{10}\flo@xb\flo@ya
  \flo@calc\flo@xa{#1}\flo@calc\flo@xb{-\flo@xa}\flo@put2\flo@xa\flo@btsa\flo@put9\flo@xb\flo@btsa
  \flo@calc\flo@xa{\flo@btsw*(#1)}\flo@calc\flo@xb{-\flo@xa}\flo@calc\flo@ya{\flo@btsa+0.45*\flo@btsl}\flo@put3\flo@xa\flo@ya\flo@put8\flo@xb\flo@ya
  \flo@calc\flo@xa{#2}\flo@calc\flo@xb{-\flo@xa}\flo@calc\flo@ya{\flo@btsb-0.15*\flo@btsl}\flo@put4\flo@xa\flo@ya\flo@put7\flo@xb\flo@ya
  \flo@calc\flo@xa{0.5*(#2)}\flo@calc\flo@xb{-\flo@xa}\flo@put5\flo@xa\flo@btsb\flo@put6\flo@xb\flo@btsb
  \flo@smoothprep{10}\flo@keep{btpn}}
% the half-width of the cases at height #1, into \flo@h
\def\flo@bthw#1{\flo@calc\flo@t{(#1-\flo@btey)/(#1>\flo@btey ? \flo@btrt : \flo@btrb)}%
  \flo@calc\flo@h{\flo@btew*sqrt(max(0,1-\flo@t*\flo@t))}}
% stripes: two down each case
\def\flo@btstripes{%
  \flo@calc\flo@t{\flo@btet-\flo@bttip}\def\flo@twa{0.045}\def\flo@twb{0.012}%
  \flo@vfill{flo@c}{0.8}{0}{\flo@loop{btst}\flo@Wb{1}{4}{%
    \ifnum\flo@Wb<3 \def\flo@sx{1}\else\def\flo@sx{-1}\fi
    \ifodd\flo@Wb\def\flo@u{0.36}\else\def\flo@u{0.72}\fi
    \flo@calc\flo@xa{\flo@sx*\flo@u*\flo@btew}\flo@calc\flo@ya{\flo@btet-0.03}%
    \flo@calc\flo@xb{\flo@xa*1.04}\flo@calc\flo@yb{\flo@btet-0.35*\flo@t}%
    \flo@calc\flo@xc{\flo@xa*0.9}\flo@calc\flo@yc{\flo@btet-0.7*\flo@t}%
    \flo@calc\flo@xd{\flo@xa*0.35}\flo@calc\flo@yd{\flo@bttip+0.06}%
    \flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}}
% a spot at (#1,#2), radius about #3, filled in flo@c
\def\flo@btspot#1#2#3{%
  \flo@range\flo@t{0.85}{1.1}\flo@calc\flo@btsr{(#3)*\flo@t}\flo@calc\flo@t{\flo@btsr*0.92}%
  \flo@vblob{#1}{#2}\flo@btsr\flo@t{0.1}{8}\flo@vfill{flo@c}{0.95}{0}{\flo@smoothpath}}
% the spots: an odd one on the seam behind the shield, the rest in rows on each case,
% the two sides alike
\def\flo@btspots{%
  \pgfmathtruncatemacro\flo@btm{floor(\flo@xget{spots}/2)}%
  \flo@calc\flo@btr{\flo@xget{spotsize}*\flo@btew*1.6/sqrt(max(1,\flo@btm))}%
  \ifnum\flo@btm<4 \def\flo@btc{1}\else\ifnum\flo@btm<8 \def\flo@btc{2}\else\def\flo@btc{3}\fi\fi
  \pgfmathtruncatemacro\flo@btrows{floor((\flo@btm+\flo@btc-1)/\flo@btc)}%
  \flo@calc\flo@t{\flo@xget{spots}-2*\flo@btm}\ifdim\flo@t pt>0pt
    \flo@calc\flo@ya{\flo@btet-\flo@btso-0.6*\flo@btr}\flo@calc\flo@v{1.15*\flo@btr}\flo@btspot{0}\flo@ya\flo@v\fi
  \flo@loop{btsp}\flo@Wb{1}{\flo@btm}{%
    \pgfmathtruncatemacro\flo@btrow{floor((\the\flo@Wb-1)/\flo@btc)}%
    \pgfmathtruncatemacro\flo@btcol{\the\flo@Wb-1-\flo@btc*\flo@btrow}%
    \flo@sym\flo@t{0.04}\flo@calc\flo@v{(\flo@btrow+0.5)/\flo@btrows+\flo@t}%
    \ifcase\flo@btc\or
      \flo@calc\flo@u{\flo@btm==1 ? 0.5 : (\flo@btrow==1 ? 0.4 : 0.62)}%
    \or
      \flo@calc\flo@u{(\flo@btcol==0 ? 0.33 : 0.7)}%
      \ifnum\flo@Wb=\flo@btm\relax\ifnum\flo@btcol=0 \def\flo@u{0.5}\fi\fi
    \else
      \flo@calc\flo@u{0.2+0.3*\flo@btcol}%
    \fi
    \flo@sym\flo@t{0.05}\flo@calc\flo@u{\flo@u+\flo@t}%
    \flo@calc\flo@bty{\flo@btet-\flo@btso-0.04-\flo@v*(\flo@btet-\flo@btso-\flo@bttip-0.08)}\flo@bthw\flo@bty
    \flo@calc\flo@btx{\flo@u*\flo@h}%
    \flo@btspot\flo@btx\flo@bty\flo@btr\flo@btspot{-\flo@btx}\flo@bty\flo@btr}}
% the wing cases: the wash, stripes or spots, mottle, the pooled rim, the gloss; the seam
\def\flo@btpaintel{%
  \flo@vtone{flo@c}{\flo@btt}\flo@vfill{flo@c}{1}{0}{\flo@kept{btel}}%
  \begin{pgfscope}\flo@kept{btel}\pgfusepath{clip}%
    \edef\flo@btpat{\flo@xget{pattern}}%
    \def\flo@tmp{stripes}\ifx\flo@btpat\flo@tmp\flo@btmark\flo@btstripes\fi
    \def\flo@tmp{spots}\ifx\flo@btpat\flo@tmp\flo@btmark\flo@btspots\fi
    \ifnum\flo@fine=1
      \flo@calc\flo@btxl{-\flo@btew}\flo@calc\flo@ta{\flo@btt-0.06}\flo@calc\flo@tb{\flo@btt+0.2}%
      \flo@vmottle\flo@btxl\flo@bttip\flo@btew\flo@btet{3}{0.08}\flo@ta\flo@tb{0}%
    \fi
    \flo@vtone{flo@c}{0.04}\flo@calc\flo@t{2.6*\flo@btu}\flo@vstroke{flo@c}{\flo@t}{0.35}{1}{\flo@kept{btel}}%
    \ifnum\flo@fine=1
      \flo@calc\flo@btln{(\flo@btet-\flo@bttip)*\flo@btgl}\flo@calc\flo@stw{0.14*\flo@btew}%
      \flo@loop{btgl}\flo@Wb{1}{2}{%
        \ifnum\flo@Wb=1 \def\flo@sx{-1}\def\flo@sto{0.55}\else\def\flo@sx{1}\def\flo@sto{0.3}\fi
        \flo@calc\flo@xa{\flo@sx*0.5*\flo@btew}\flo@calc\flo@ya{\flo@btet-\flo@btso-0.06*\flo@btln}\flo@put1\flo@xa\flo@ya
        \flo@calc\flo@xa{\flo@sx*0.56*\flo@btew}\flo@calc\flo@ya{\flo@btet-\flo@btso-0.23*\flo@btln}\flo@put2\flo@xa\flo@ya
        \flo@calc\flo@xa{\flo@sx*0.54*\flo@btew}\flo@calc\flo@ya{\flo@btet-\flo@btso-0.43*\flo@btln}\flo@put3\flo@xa\flo@ya
        \flo@calc\flo@xa{\flo@sx*0.45*\flo@btew}\flo@calc\flo@ya{\flo@btet-\flo@btso-0.6*\flo@btln}\flo@put4\flo@xa\flo@ya
        \flo@vstreak{4}\flo@stw{0.01}{white}\flo@sto}%
    \fi
  \end{pgfscope}%
  \flo@vtone{flo@c}{0.04}\flo@vstroke{flo@c}{\flo@btw}{0.8}{0}{\pgfpathmoveto{\flo@P0\flo@btet}%
    \pgfpathlineto{\flo@P0\flo@bttip}}}
% the color of the stripes or spots: dark on a pale or red case; on a dark one pale, or a
% black ladybird's red
\def\flo@btmark{%
  \def\flo@tmp{dark}\ifx\flo@btground\flo@tmp
    \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp\flo@vaccent{flo@c}{0}\else\flo@vtone{flo@c}{0.8}\fi
  \else\flo@vtone{flo@c}{0.04}\fi}
% feelers of the side: a thread, a club, a comb (another kind's, fixed, as a thread)
\def\flo@btfeeler{%
  \edef\flo@t{\flo@xget{antenna}}%
  \flo@calc\flo@xa{0.35*\flo@bthx}\flo@calc\flo@ya{\flo@bthy+0.6*\flo@bthr}%
  \def\flo@tmp{clubbed}\ifx\flo@t\flo@tmp\flo@range\flo@xb{0.06}{0.08}\flo@range\flo@yb{0.06}{0.08}%
    \flo@range\flo@xc{0.1}{0.13}\flo@range\flo@yc{0.12}{0.15}\else
  \def\flo@tmp{comb}\ifx\flo@t\flo@tmp\flo@range\flo@xb{0.08}{0.1}\flo@range\flo@yb{0.08}{0.1}%
    \flo@range\flo@xc{0.16}{0.2}\flo@range\flo@yc{0.18}{0.22}\else
  \flo@range\flo@xb{0.1}{0.14}\flo@range\flo@yb{0.1}{0.14}% a thread, and any other kind's feeler
    \flo@range\flo@xc{0.2}{0.28}\flo@range\flo@yc{0.24}{0.32}\fi\fi
  \flo@calc\flo@xb{\flo@xa+\flo@xb*\flo@btfs}\flo@calc\flo@yb{\flo@ya+\flo@yb*\flo@btfs}%
  \flo@calc\flo@xc{\flo@xa+\flo@xc*\flo@btfs}\flo@calc\flo@yc{\flo@ya+\flo@yc*\flo@btfs}%
  \flo@vstroke{flo@c}{\flo@btw}{1}{0}{\pgfpathmoveto{\flo@P\flo@xa\flo@ya}\pgfpathlineto{\flo@P\flo@xb\flo@yb}%
    \pgfpathlineto{\flo@P\flo@xc\flo@yc}}%
  \def\flo@tmp{clubbed}\ifx\flo@t\flo@tmp
    \flo@calc\flo@da{\flo@xc-\flo@xb}\flo@calc\flo@db{\flo@yc-\flo@yb}\flo@nrm\flo@da\flo@db\flo@nx\flo@ny
    \flo@calc\flo@xd{\flo@ny*0.034*\flo@btfs}\flo@calc\flo@yd{-(\flo@nx)*0.034*\flo@btfs}%
    \flo@calc\flo@xe{\flo@nx*0.02*\flo@btfs}\flo@calc\flo@ye{\flo@ny*0.02*\flo@btfs}%
    \flo@vfill{flo@c}{1}{0}{\pgfpathellipse{\flo@P\flo@xc\flo@yc}{\flo@P\flo@xd\flo@yd}{\flo@P\flo@xe\flo@ye}}%
  \fi
  \def\flo@tmp{comb}\ifx\flo@t\flo@tmp\ifnum\flo@fine=1
    \flo@calc\flo@da{\flo@xc-\flo@xb}\flo@calc\flo@db{\flo@yc-\flo@yb}\flo@nrm\flo@da\flo@db\flo@nx\flo@ny
    \flo@calc\flo@t{0.6*\flo@btw}%
    \flo@vstroke{flo@c}{\flo@t}{1}{0}{\flo@loop{btcm}\flo@Wc{1}{6}{%
      \flo@calc\flo@v{\the\flo@Wc/6}%
      \flo@calc\flo@xd{\flo@xb+\flo@v*\flo@da}\flo@calc\flo@yd{\flo@yb+\flo@v*\flo@db}%
      \flo@calc\flo@xe{\flo@xd-\flo@nx*0.035*\flo@btfs}\flo@calc\flo@ye{\flo@yd-\flo@ny*0.035*\flo@btfs}%
      \pgfpathmoveto{\flo@P\flo@xd\flo@yd}\pgfpathlineto{\flo@P\flo@xe\flo@ye}}}%
  \fi\fi}
% the head, its eyes, a beetle's jaws; a ladybird's white dots
\def\flo@bthead{%
  \flo@vtone{flo@c}{\flo@btht}\flo@vfill{flo@c}{1}{0}{\flo@bgell0\flo@bthy\flo@bthx\flo@bthr}%
  \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp
    \ifnum\flo@fine=1
      \flo@calc\flo@xa{0.45*\flo@bthx}\flo@calc\flo@ya{\flo@bthy+0.3*\flo@bthr}\flo@calc\flo@t{0.22*\flo@bthx}%
      \flo@bgwhite\flo@vfill{flo@c}{0.9}{0}{\pgfpathcircle{\flo@P{-\flo@xa}\flo@ya}{\flo@t pt}\pgfpathcircle{\flo@P\flo@xa\flo@ya}{\flo@t pt}}%
    \fi
  \else
    \flo@calc\flo@xa{0.82*\flo@bthx}\flo@calc\flo@ya{\flo@bthy+0.1*\flo@bthr}\flo@calc\flo@xb{0.24*\flo@bthx}\flo@calc\flo@yb{0.42*\flo@bthr}%
    \flo@vtone{flo@c}{0.02}\flo@vfill{flo@c}{1}{0}{\flo@bgell{-\flo@xa}\flo@ya\flo@xb\flo@yb\flo@bgell\flo@xa\flo@ya\flo@xb\flo@yb}%
    \ifnum\flo@fine=1
      \flo@calc\flo@twa{0.3*\flo@bthx}\def\flo@twb{0.004}%
      \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\flo@loop{btjw}\flo@Wb{1}{2}{%
        \ifnum\flo@Wb=1 \def\flo@sx{-1}\else\def\flo@sx{1}\fi
        \flo@calc\flo@xa{\flo@sx*0.4*\flo@bthx}\flo@calc\flo@ya{\flo@bthy+0.8*\flo@bthr}%
        \flo@calc\flo@xb{\flo@sx*0.5*\flo@bthx}\flo@calc\flo@yb{\flo@bthy+1.25*\flo@bthr}%
        \flo@calc\flo@xc{\flo@sx*0.3*\flo@bthx}\flo@calc\flo@yc{\flo@bthy+1.55*\flo@bthr}%
        \flo@calc\flo@xd{\flo@sx*0.08*\flo@bthx}\flo@calc\flo@yd{\flo@bthy+1.6*\flo@bthr}%
        \flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}%
    \fi
  \fi}
% the shield: its wash, a ladybird's white patches, a highlight, the rim
\def\flo@btpaintpn{%
  \flo@vtone{flo@c}{\flo@btpt}\flo@vfill{flo@c}{1}{0}{\flo@kept{btpn}}%
  \begin{pgfscope}\flo@kept{btpn}\pgfusepath{clip}%
    \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp
      \flo@calc\flo@xa{0.72*\flo@btpb}\flo@calc\flo@ya{\flo@btsa+0.62*\flo@btsl}%
      \flo@calc\flo@xb{0.3*\flo@btpb}\flo@calc\flo@yb{0.4*\flo@btsl}%
      \flo@bgwhite\flo@vfill{flo@c}{0.95}{0}{\flo@bgell{-\flo@xa}\flo@ya\flo@xb\flo@yb\flo@bgell\flo@xa\flo@ya\flo@xb\flo@yb}%
    \fi
    \ifnum\flo@fine=1
      \flo@calc\flo@xa{-0.55*\flo@btpb}\flo@calc\flo@ya{\flo@btsa+0.3*\flo@btsl}\flo@put1\flo@xa\flo@ya
      \flo@calc\flo@xa{-0.4*\flo@btpb}\flo@calc\flo@ya{\flo@btsa+0.62*\flo@btsl}\flo@put2\flo@xa\flo@ya
      \flo@calc\flo@xa{-0.2*\flo@btpb}\flo@calc\flo@ya{\flo@btsa+0.8*\flo@btsl}\flo@put3\flo@xa\flo@ya
      \flo@calc\flo@stw{0.12*\flo@btsl}\flo@vstreak{3}\flo@stw{0.006}{white}{0.4}%
    \fi
    \flo@vtone{flo@c}{0.03}\flo@calc\flo@t{2*\flo@btu}\flo@vstroke{flo@c}{\flo@t}{0.35}{1}{\flo@kept{btpn}}%
  \end{pgfscope}}
% a beetle or a ladybird; #1 its length on the page in pt
\def\flo@beetle#1{%
  \flo@calc\flo@btu{(#1)/28.45276}%
  \ifdim\flo@btu pt>0.25pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@btk{\flo@xget{kind}}\edef\flo@btground{\flo@xget{ground}}%
  \edef\flo@btt{\flo@xget{tone}}%
  \def\flo@tmp{dark}\ifx\flo@btground\flo@tmp\flo@calc\flo@btt{max(0.04,\flo@btt-0.22)}%
    \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp\def\flo@btt{0.06}\fi\fi
  \def\flo@tmp{copper}\ifx\flo@btground\flo@tmp\def\flo@rampname{flo@aramp}\fi
  % proportions: a beetle's, then a ladybird's
  \flo@calc\flo@btew{0.5*\flo@xget{build}}\def\flo@btet{0.14}\def\flo@bttip{-0.56}\def\flo@btrt{0.12}\def\flo@btsq{0.7}%
  \flo@calc\flo@btpb{0.88*\flo@btew}\flo@calc\flo@btpf{0.62*\flo@btew}\def\flo@btpl{0.17}\def\flo@btso{0.012}\def\flo@btsw{1.02}%
  \flo@calc\flo@bthx{0.36*\flo@btew}\def\flo@bthr{0.065}\def\flo@bthy{0.36}\def\flo@btfs{1}\def\flo@btgl{1}%
  \flo@calc\flo@btpt{max(0.04,\flo@btt-0.06)}\flo@calc\flo@btht{max(0.04,\flo@btt-0.1)}%
  \def\flo@lgw{0.03}\def\flo@lgj{0.015}\def\flo@lgx{1}\flo@calc\flo@lgex{\flo@btew}\def\flo@btly{0}%
  \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp
    \def\flo@btet{0.22}\def\flo@bttip{-0.5}\def\flo@btrt{0.36}\def\flo@btsq{1}%
    \flo@calc\flo@btpb{0.6*\flo@btew}\flo@calc\flo@btpf{0.4*\flo@btew}\def\flo@btpl{0.05}\def\flo@btso{0.075}\def\flo@btsw{0.92}%
    \flo@calc\flo@bthx{0.3*\flo@btew}\def\flo@bthr{0.055}\def\flo@bthy{0.27}\def\flo@btfs{0.45}\def\flo@btgl{0.55}%
    \def\flo@btpt{0.04}\def\flo@btht{0.04}\def\flo@lgw{0.032}\def\flo@lgj{0.01}\def\flo@lgx{0.7}%
    \flo@calc\flo@lgex{0.8*\flo@btew}\def\flo@btly{0.12}%
  \fi
  \flo@calc\flo@btey{\flo@btet-\flo@btrt}\flo@calc\flo@btrb{\flo@btey-\flo@bttip}%
  \flo@calc\flo@btw{max(0.25,0.4*\flo@btu)}%
  % the legs, the feelers, the head, the wing cases, the shield, the scutellum
  \flo@calc\flo@lgy{\flo@btet-\flo@btly}%
  \flo@vtone{flo@c}{0.05}%
  \flo@loop{btsl}\flo@Wa{1}{2}{\begin{pgfscope}%
    \ifnum\flo@Wa=2 \pgftransformxscale{-1}\def\flo@lgph{-0.04}\else\def\flo@lgph{0.04}\fi
    \flo@vlegs{b}\end{pgfscope}}%
  \flo@vtone{flo@c}{0.05}%
  \flo@loop{btsf}\flo@Wa{1}{2}{\begin{pgfscope}\ifnum\flo@Wa=2 \pgftransformxscale{-1}\fi\flo@btfeeler\end{pgfscope}}%
  \flo@bthead\flo@btelytra\flo@btpaintel
  \flo@btshield\flo@btpb\flo@btpf\flo@btpl\flo@btpaintpn
  \def\flo@tmp{ladybird}\ifx\flo@btk\flo@tmp\else
    \flo@calc\flo@ya{\flo@btet+0.004}\flo@calc\flo@yb{\flo@btet-0.05}%
    \flo@vtone{flo@c}{\flo@btpt}\flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{-0.035}\flo@ya}%
      \pgfpathlineto{\flo@P{0.035}\flo@ya}\pgfpathlineto{\flo@P0\flo@yb}\pgfpathclose}%
  \fi}
% ---------------------------------------------------------------- caterpillars
% A caterpillar on its host leaf, in units of its length: the leaf along +y from the
% origin, its right edge bitten where the caterpillar feeds; the caterpillar seen from the
% side along that edge, its belly toward the leaf (curled, lying on it), its head toward
% the leaf's tip. The body
% is thirteen segments along a spine that the pose bends: nearly straight, arched in a
% loop (a looper, legs only at both ends) or curled in a C. True legs on the three
% segments behind the head, prolegs on the 5th to 8th from the tail and the last; a pale
% line along the side with the breathing holes, or a dark one down the back; tufts of hair
% on the back, a horn near the tail.
% the leaf's half-width at v (0 its root, 1 its tip), into \flo@h; the midrib's x into \flo@hfx
\def\flo@hfw#1{\flo@calc\flo@h{\flo@hfW*pow(sin(180*pow(#1,0.8)),0.85)}\flo@calc\flo@hfx{\flo@hfbend*(#1)*(#1)}}
% the outline: the root, 23 points up the right edge (round the bites), the tip, 23 down
% the left; kept as hfl
\def\flo@hfoutline{%
  \flo@put1{0}{0}\flo@calc\flo@xa{\flo@hfbend}\flo@put{25}\flo@xa\flo@hfL
  \flo@loop{hfo}\flo@Wa{1}{23}{%
    \flo@calc\flo@v{\the\flo@Wa/24}\flo@hfw\flo@v\flo@calc\flo@ya{\flo@v*\flo@hfL}%
    \flo@calc\flo@xa{\flo@hfx+\flo@h}\flo@calc\flo@xb{\flo@hfx-\flo@h}%
    \flo@loop{hfb}\flo@Wb{1}{\flo@hfnb}{%
      \edef\flo@hfi{\the\flo@Wb}%
      \flo@calc\flo@t{abs(\flo@ya-\csname flo@hfby\flo@hfi\endcsname)}%
      \flo@calc\flo@xa{\flo@t<\csname flo@hfbr\flo@hfi\endcsname ? min(\flo@xa,\csname flo@hfbx\flo@hfi\endcsname
        -sqrt(max(0,\csname flo@hfbr\flo@hfi\endcsname*\csname flo@hfbr\flo@hfi\endcsname-\flo@t*\flo@t))) : \flo@xa}}%
    \flo@put{\the\numexpr\flo@Wa+1\relax}\flo@xa\flo@ya\flo@put{\the\numexpr49-\flo@Wa\relax}\flo@xb\flo@ya}%
  \flo@smoothprep{48}\flo@keep{hfl}}
% the host leaf: a stalk, the wash, its left half darker, mottle, white veins, the rim
\def\flo@hfpaint{\begin{pgfscope}\def\flo@rampname{flo@ramp}%
  \flo@vtone{flo@c}{0.2}\def\flo@twa{0.028}\def\flo@twb{0.02}%
  \flo@vfill{flo@c}{1}{0}{\flo@vtaper{0}{-0.14}{0}{-0.09}{0}{-0.05}{0}{0.02}}%
  \flo@vtone{flo@c}{\flo@hft}\flo@vfill{flo@c}{1}{0}{\flo@kept{hfl}}%
  \begin{pgfscope}\flo@kept{hfl}\pgfusepath{clip}%
    \flo@calc\flo@t{\flo@hft-0.12}\flo@vtone{flo@c}\flo@t
    \flo@vfill{flo@c}{0.35}{1}{\pgfpathmoveto{\flo@P{-1}{0}}\pgfpathlineto{\flo@P00}%
      \flo@loop{hfh}\flo@Wa{1}{8}{\flo@calc\flo@v{\the\flo@Wa/8}\flo@hfw\flo@v\flo@calc\flo@ya{\flo@v*\flo@hfL}%
        \pgfpathlineto{\flo@P\flo@hfx\flo@ya}}%
      \pgfpathlineto{\flo@P{-1}\flo@hfL}\pgfpathclose}%
    \ifnum\flo@fine=1
      \flo@calc\flo@hfxl{-\flo@hfW}\flo@calc\flo@ta{\flo@hft-0.16}\flo@calc\flo@tb{\flo@hft+0.18}%
      \flo@vmottle\flo@hfxl{0}\flo@hfW\flo@hfL{6}{0.12}\flo@ta\flo@tb{8}%
      \def\flo@twa{0.022}\def\flo@twb{0.004}%
      \flo@vfill{white}{0.5}{0}{%
        \flo@hfw{0.33}\flo@calc\flo@xb{\flo@hfx}\flo@calc\flo@yb{0.33*\flo@hfL}%
        \flo@hfw{0.67}\flo@calc\flo@xc{\flo@hfx}\flo@calc\flo@yc{0.67*\flo@hfL}%
        \flo@hfw{0.97}\flo@calc\flo@xd{\flo@hfx}\flo@calc\flo@yd{0.97*\flo@hfL}%
        \flo@vtaper{0}{0}\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}%
      \def\flo@twa{0.014}\def\flo@twb{0.002}%
      \flo@vfill{white}{0.4}{0}{\flo@loop{hfv}\flo@Wa{1}{10}{%
        \ifodd\flo@Wa\def\flo@sx{1}\else\def\flo@sx{-1}\fi
        \flo@calc\flo@v{0.1+0.15*floor((\the\flo@Wa-1)/2)}\flo@hfw\flo@v
        \flo@calc\flo@xa{\flo@hfx}\flo@calc\flo@ya{\flo@v*\flo@hfL}%
        \flo@calc\flo@xd{\flo@hfx+\flo@sx*0.85*\flo@h}\flo@calc\flo@yd{\flo@ya+0.09*\flo@hfL}%
        \flo@calc\flo@xb{\flo@xa+(\flo@xd-\flo@xa)*0.4}\flo@calc\flo@yb{\flo@ya+(\flo@yd-\flo@ya)*0.15}%
        \flo@calc\flo@xc{\flo@xa+(\flo@xd-\flo@xa)*0.75}\flo@calc\flo@yc{\flo@ya+(\flo@yd-\flo@ya)*0.55}%
        \flo@vtaper\flo@xa\flo@ya\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}%
    \fi
    \flo@vtone{flo@c}{0.06}\flo@calc\flo@t{0.9*\flo@ctu}\flo@vstroke{flo@c}{\flo@t}{0.4}{1}{\flo@kept{hfl}}%
  \end{pgfscope}\end{pgfscope}}
% the spine's angle at s (0 the tail, 1 the head), into \flo@cta
\def\flo@ctangle#1{%
  \def\flo@tmp{loop}\ifx\flo@ctpose\flo@tmp\flo@calc\flo@cta{105*cos(180*(#1))}\else
  \def\flo@tmp{curl}\ifx\flo@ctpose\flo@tmp\flo@calc\flo@cta{150-300*(#1)}\else
  \flo@calc\flo@cta{\flo@ctwa*sin(540*(#1)+\flo@ctph)}\fi\fi}
% the spine: 27 points from the tail (\flo@ctX/Y<k>), the angle (\flo@ctA<k>), the normal
% toward the back (\flo@ctNX/NY<k>) and the half-width (\flo@ctW<k>) at each
\def\flo@ctspine{%
  \expandafter\def\csname flo@ctX0\endcsname{0}\expandafter\def\csname flo@ctY0\endcsname{0}%
  \flo@loop{cts}\flo@Wa{0}{26}{%
    \edef\flo@cti{\the\flo@Wa}\flo@calc\flo@v{\flo@cti/26}%
    \ifnum\flo@Wa>0
      \flo@calc\flo@t{(\flo@cti-0.5)/26}\flo@ctangle\flo@t
      \flo@calc\flo@xa{\csname flo@ctX\the\numexpr\flo@Wa-1\endcsname+cos(\flo@cta)/26}%
      \flo@calc\flo@ya{\csname flo@ctY\the\numexpr\flo@Wa-1\endcsname+sin(\flo@cta)/26}%
      \expandafter\let\csname flo@ctX\flo@cti\endcsname\flo@xa\expandafter\let\csname flo@ctY\flo@cti\endcsname\flo@ya
    \fi
    \flo@ctangle\flo@v\expandafter\let\csname flo@ctA\flo@cti\endcsname\flo@cta
    \flo@calc\flo@t{-sin(\flo@cta)}\expandafter\let\csname flo@ctNX\flo@cti\endcsname\flo@t
    \flo@calc\flo@t{cos(\flo@cta)}\expandafter\let\csname flo@ctNY\flo@cti\endcsname\flo@t
    \flo@calc\flo@t{\flo@ctW*(0.7+0.3*sin(180*min(1,1.6*\flo@v)))*(\flo@v>0.92 ? 1-(\flo@v-0.92)*2.5 : 1)}%
    \expandafter\let\csname flo@ctW\flo@cti\endcsname\flo@t}}
% the point at spine k, f half-widths toward the back (f < 0: the belly), g along it: \flo@xa/ya
\def\flo@ctat#1#2#3{%
  \flo@calc\flo@xa{\csname flo@ctX#1\endcsname+(#2)*\csname flo@ctW#1\endcsname*\csname flo@ctNX#1\endcsname
    +(#3)*\csname flo@ctW#1\endcsname*\csname flo@ctNY#1\endcsname}%
  \flo@calc\flo@ya{\csname flo@ctY#1\endcsname+(#2)*\csname flo@ctW#1\endcsname*\csname flo@ctNY#1\endcsname
    -(#3)*\csname flo@ctW#1\endcsname*\csname flo@ctNX#1\endcsname}}
% the outline: the belly from the tail, the back from the head, a point behind the tail
\def\flo@ctoutline{%
  \flo@loop{cto}\flo@Wa{0}{26}{%
    \flo@ctat{\the\flo@Wa}{-1}{0}\flo@put{\the\numexpr\flo@Wa+1\relax}\flo@xa\flo@ya
    \flo@ctat{\the\flo@Wa}{1}{0}\flo@put{\the\numexpr54-\flo@Wa\relax}\flo@xa\flo@ya}%
  \flo@ctat{0}{0}{-0.7}\flo@put{55}\flo@xa\flo@ya
  \flo@smoothprep{55}\flo@keep{ctb}}
% a leg at spine #1: from #2 half-widths under the back to #3 under it, #4 along the body
\def\flo@ctleg#1#2#3#4{%
  \flo@ctat{#1}{-(#2)}{0}\let\flo@ctlx\flo@xa\let\flo@ctly\flo@ya
  \flo@ctat{#1}{-(#3)}{#4}\let\flo@xd\flo@xa\let\flo@yd\flo@ya
  \flo@lgseg\flo@ctlx\flo@ctly\flo@xd\flo@yd}
% points k = #1, #1+#3, ... #2 at #4 half-widths toward the back, for a streak
\def\flo@ctline#1#2#3#4{%
  \def\flo@ctn{0}%
  \flo@loop{ctl}\flo@Wb{0}{(#2-#1)/#3}{%
    \edef\flo@ctn{\the\numexpr\flo@ctn+1\relax}%
    \flo@ctat{\the\numexpr#1+#3*\flo@Wb\relax}{#4}{0}\flo@put\flo@ctn\flo@xa\flo@ya}}
% the body: legs, the wash, the belly's shade, stripes, joints, mottle, a highlight, the rim
\def\flo@ctbody{%
  % prolegs (a looper's only at both ends), then the true legs
  \flo@calc\flo@twa{0.9*\flo@ctW}\flo@calc\flo@twb{0.65*\flo@ctW}%
  \flo@calc\flo@t{max(0.05,\flo@ctt-0.08)}\flo@vtone{flo@c}\flo@t
  \flo@vfill{flo@c}{1}{0}{\flo@loop{ctp}\flo@Wa{1}{5}{%
    \edef\flo@ctk{\ifcase\flo@Wa\or1\or9\or11\or13\or15\fi}%
    \def\flo@tmp{loop}\ifx\flo@ctpose\flo@tmp\ifnum\flo@Wa>2 \def\flo@ctk{}\fi\fi
    \ifx\flo@ctk\pgfutil@empty\else\flo@ctleg\flo@ctk{0.5}{1.45}{-0.1}\fi}}%
  \flo@calc\flo@twa{0.35*\flo@ctW}\flo@calc\flo@twb{0.06*\flo@ctW}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\flo@loop{cttl}\flo@Wa{0}{2}{%
    \flo@ctleg{\the\numexpr21+2*\flo@Wa\relax}{0.6}{1.55}{0.35}}}%
  \flo@ctoutline
  \flo@vtone{flo@c}{\flo@ctt}\flo@vfill{flo@c}{1}{0}{\flo@kept{ctb}}%
  \begin{pgfscope}\flo@kept{ctb}\pgfusepath{clip}%
    \flo@calc\flo@t{\flo@ctt-0.12}\flo@vtone{flo@c}\flo@t
    \flo@vfill{flo@c}{0.35}{1}{%
      \flo@loop{ctsh}\flo@Wa{0}{26}{\flo@ctat{\the\flo@Wa}{0}{0}%
        \ifnum\flo@Wa=0 \pgfpathmoveto{\flo@P\flo@xa\flo@ya}\else\pgfpathlineto{\flo@P\flo@xa\flo@ya}\fi}%
      \flo@loop{ctsi}\flo@Wa{0}{26}{\flo@ctat{\the\numexpr26-\flo@Wa\relax}{-1.4}{0}\pgfpathlineto{\flo@P\flo@xa\flo@ya}}%
      \pgfpathclose}%
    \edef\flo@t{\flo@xget{stripes}}%
    \def\flo@tmp{side}\ifx\flo@t\flo@tmp
      \flo@ctline{1}{25}{2}{-0.2}\flo@calc\flo@stw{0.45*\flo@ctW}\flo@calc\flo@sto{0.3*\flo@ctW}%
      \flo@vstreak{13}\flo@stw\flo@sto{white}{0.6}%
      \ifnum\flo@fine=1
        \flo@calc\flo@ctsr{0.13*\flo@ctW}\flo@calc\flo@ctsq{0.09*\flo@ctW}%
        \flo@vtone{flo@c}{0.04}\flo@vfill{flo@c}{0.85}{0}{\flo@loop{ctsp}\flo@Wa{1}{9}{%
          \flo@ctat{\the\numexpr1+2*\flo@Wa\relax}{0.08}{0}\flo@bgell\flo@xa\flo@ya\flo@ctsq\flo@ctsr}}%
      \fi
    \fi
    \def\flo@tmp{back}\ifx\flo@t\flo@tmp
      \flo@ctline{1}{25}{2}{0.72}\flo@calc\flo@stw{0.42*\flo@ctW}\flo@calc\flo@sto{0.3*\flo@ctW}%
      \flo@vtone{flo@c}{0.05}\flo@vstreak{13}\flo@stw\flo@sto{flo@c}{0.7}%
    \fi
    \ifnum\flo@fine=1
      \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@ctjw}{0.4}{1}{\flo@loop{ctj}\flo@Wa{1}{12}{%
        \flo@ctat{\the\numexpr2*\flo@Wa\relax}{-1.3}{0}\pgfpathmoveto{\flo@P\flo@xa\flo@ya}%
        \flo@ctat{\the\numexpr2*\flo@Wa\relax}{1.3}{0}\pgfpathlineto{\flo@P\flo@xa\flo@ya}}}%
      \flo@calc\flo@ctxl{-0.2}\flo@calc\flo@ctyl{-0.4}\flo@calc\flo@ctxh{1.1}\flo@calc\flo@ctyh{0.8}%
      \flo@calc\flo@ta{\flo@ctt-0.14}\flo@calc\flo@tb{\flo@ctt+0.18}%
      \flo@vmottle\flo@ctxl\flo@ctyl\flo@ctxh\flo@ctyh{5}{0.05}\flo@ta\flo@tb{10}%
      \flo@ctline{2}{24}{2}{0.45}\flo@calc\flo@stw{0.3*\flo@ctW}%
      \flo@vstreak{12}\flo@stw{0.004}{white}{0.4}%
    \fi
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{0.9*\flo@ctu}\flo@vstroke{flo@c}{\flo@t}{0.6}{1}{\flo@kept{ctb}}%
  \end{pgfscope}}
% the head: a capsule past the last point, an eye, the jaws, a glint
\def\flo@cthead{%
  \flo@ctat{26}{0}{0.5}\let\flo@cthx\flo@xa\let\flo@cthy\flo@ya
  \flo@calc\flo@xb{\csname flo@ctNY26\endcsname*0.92*\flo@ctW}\flo@calc\flo@yb{-\csname flo@ctNX26\endcsname*0.92*\flo@ctW}%
  \flo@calc\flo@xc{\csname flo@ctNX26\endcsname*0.85*\flo@ctW}\flo@calc\flo@yc{\csname flo@ctNY26\endcsname*0.85*\flo@ctW}%
  \flo@vtone{flo@c}{\flo@ctht}\flo@vfill{flo@c}{1}{0}{\pgfpathellipse{\flo@P\flo@cthx\flo@cthy}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xc\flo@yc}}%
  \ifnum\flo@fine=1
    \flo@calc\flo@xa{\flo@cthx+0.35*\flo@xb+0.15*\flo@xc}\flo@calc\flo@ya{\flo@cthy+0.35*\flo@yb+0.15*\flo@yc}%
    \flo@calc\flo@t{0.13*\flo@ctW}\flo@vtone{flo@c}{0.02}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{\flo@t pt}}%
    \flo@calc\flo@xa{\flo@cthx-0.25*\flo@xb+0.45*\flo@xc}\flo@calc\flo@ya{\flo@cthy-0.25*\flo@yb+0.45*\flo@yc}%
    \flo@calc\flo@t{0.1*\flo@ctW}\flo@vfill{white}{0.6}{0}{\pgfpathcircle{\flo@P\flo@xa\flo@ya}{\flo@t pt}}%
    \flo@calc\flo@xa{\flo@cthx+0.8*\flo@xb-0.45*\flo@xc}\flo@calc\flo@ya{\flo@cthy+0.8*\flo@yb-0.45*\flo@yc}%
    \flo@calc\flo@xd{\flo@cthx+1.2*\flo@xb-0.75*\flo@xc}\flo@calc\flo@yd{\flo@cthy+1.2*\flo@yb-0.75*\flo@yc}%
    \flo@calc\flo@twa{0.25*\flo@ctW}\flo@calc\flo@twb{0.05*\flo@ctW}%
    \flo@vtone{flo@c}{0.04}\flo@vfill{flo@c}{1}{0}{\flo@lgseg\flo@xa\flo@ya\flo@xd\flo@yd}%
  \fi}
% a horn near the tail; tufts of hair on the back and pencils at both ends
\def\flo@cthorn{%
  \flo@ctat{5}{0.8}{0}\let\flo@xe\flo@xa\let\flo@ye\flo@ya
  \flo@ctat{5}{2.4}{-1.6}\let\flo@xd\flo@xa\let\flo@yd\flo@ya
  \flo@ctat{5}{1.7}{0}\let\flo@xb\flo@xa\let\flo@yb\flo@ya
  \flo@ctat{5}{2.4}{-0.7}\let\flo@xc\flo@xa\let\flo@yc\flo@ya
  \flo@calc\flo@twa{0.5*\flo@ctW}\flo@calc\flo@twb{0.05*\flo@ctW}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{1}{0}{\flo@vtaper\flo@xe\flo@ye\flo@xb\flo@yb\flo@xc\flo@yc\flo@xd\flo@yd}}
\def\flo@cthair#1#2#3#4{% a hair at spine #1, out #2 half-widths from #3 along it, #4 degrees off the back
  \flo@ctat{#1}{0.85}{#3}\let\flo@xe\flo@xa\let\flo@ye\flo@ya
  \flo@calc\flo@t{\csname flo@ctA#1\endcsname+90+(#4)}%
  \flo@calc\flo@xd{\flo@xe+(#2)*\flo@ctW*cos(\flo@t)}\flo@calc\flo@yd{\flo@ye+(#2)*\flo@ctW*sin(\flo@t)}%
  \flo@lgseg\flo@xe\flo@ye\flo@xd\flo@yd}
\def\flo@cttufts{%
  \flo@calc\flo@twa{0.1*\flo@ctW}\flo@calc\flo@twb{0.02*\flo@ctW}%
  \flo@bgwhite\flo@vfill{flo@c}{0.9}{0}{\flo@loop{ctt}\flo@Wa{1}{4}{%
    \flo@loop{cth}\flo@Wb{1}{9}{%
      \flo@range\flo@ctl{1.2}{1.8}\flo@range\flo@ctg{-0.25}{0.25}%
      \flo@cthair{\the\numexpr9+2*\flo@Wa\relax}\flo@ctl\flo@ctg{(\the\flo@Wb-5)*8}}}}%
  \flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.9}{0}{\flo@loop{ctpn}\flo@Wa{1}{5}{%
    \flo@range\flo@ctl{2.4}{3}\flo@cthair{24}\flo@ctl{0}{\the\flo@Wa*6-48}%
    \flo@range\flo@ctl{2}{2.6}\flo@cthair{2}\flo@ctl{0}{\the\flo@Wa*6+12}}}}
% a caterpillar on its leaf; #1 its length on the page in pt
\def\flo@caterpillar#1{%
  \flo@calc\flo@ctu{(#1)/28.45276}%
  \ifdim\flo@ctu pt>0.25pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@ctpose{\flo@xget{pose}}\edef\flo@ctground{\flo@xget{ground}}\edef\flo@ctt{\flo@xget{tone}}%
  \def\flo@tmp{pale}\ifx\flo@ctground\flo@tmp\flo@calc\flo@ctt{min(0.6,\flo@ctt+0.22)}\fi
  \flo@calc\flo@ctW{\flo@xget{build}/2}\flo@calc\flo@ctht{max(0.05,\flo@ctt-0.16)}%
  \flo@calc\flo@ctjw{max(0.1,0.16*\flo@ctu)}%
  \flo@range\flo@ctwa{3}{7}\flo@range\flo@ctph{0}{360}\flo@ctspine
  % the leaf: its size, the edge the caterpillar holds, the bites ahead of its head
  \def\flo@hfL{1.5}\def\flo@hfW{0.36}\flo@sym\flo@hfbend{0.12}\def\flo@hft{0.66}%
  \flo@hfw{0.1}\flo@calc\flo@ctox{\flo@hfx+\flo@h}\flo@calc\flo@ctoy{0.1*\flo@hfL}%
  \flo@hfw{0.62}\flo@calc\flo@t{atan2(0.62*\flo@hfL-\flo@ctoy,\flo@hfx+\flo@h-\flo@ctox)}%
  % straight or looping, the body is mirrored across its axis (y to -y, after the turn),
  % so its legs hold the edge and its back is turned away from the leaf, tail to head
  % along the edge; curled, it lies on the leaf from its tail, its legs turned in
  \def\flo@tmp{curl}\ifx\flo@ctpose\flo@tmp\edef\flo@ctrot{\flo@t}\def\flo@ctmy{1}%
    \flo@calc\flo@cthy{\flo@ctoy+\csname flo@ctX26\endcsname*sin(\flo@ctrot)+\csname flo@ctY26\endcsname*cos(\flo@ctrot)}%
  \else\def\flo@ctmy{-1}%
    \flo@calc\flo@ctrot{\flo@t+atan2(\csname flo@ctY26\endcsname,\csname flo@ctX26\endcsname)}%
    \flo@calc\flo@cthy{\flo@ctoy+\csname flo@ctX26\endcsname*sin(\flo@ctrot)-(\csname flo@ctY26\endcsname)*cos(\flo@ctrot)}%
  \fi
  \flo@chance{0.5}\ifflo@yes\def\flo@hfnb{3}\else\def\flo@hfnb{2}\fi
  \flo@calc\flo@t{min(0.86*\flo@hfL,max(0.3*\flo@hfL,\flo@cthy+0.04))}%
  \flo@loop{hfbs}\flo@Wa{1}{\flo@hfnb}{%
    \edef\flo@hfi{\the\flo@Wa}%
    \flo@range\flo@v{0.07}{0.11}\expandafter\let\csname flo@hfbr\flo@hfi\endcsname\flo@v
    \expandafter\let\csname flo@hfby\flo@hfi\endcsname\flo@t
    \flo@calc\flo@v{\flo@t/\flo@hfL}\flo@hfw\flo@v
    \flo@calc\flo@v{\flo@hfx+\flo@h+0.3*\csname flo@hfbr\flo@hfi\endcsname}\expandafter\let\csname flo@hfbx\flo@hfi\endcsname\flo@v
    \flo@range\flo@v{0.15}{0.22}\flo@calc\flo@t{\flo@t+\flo@v}%
    \ifdim\flo@t pt>1.38pt \def\flo@t{1.38}\fi}%
  \flo@hfoutline\flo@hfpaint
  % the caterpillar, in the copper if its ground is
  \def\flo@tmp{copper}\ifx\flo@ctground\flo@tmp\def\flo@rampname{flo@aramp}\fi
  \begin{pgfscope}\pgftransformshift{\flo@P\flo@ctox\flo@ctoy}\pgftransformrotate{\flo@ctrot}\ifnum\flo@ctmy=-1 \pgftransformyscale{-1}\fi
    \flo@ctbody\flo@cthead
    \ifnum\flo@xget{horn}=1 \flo@cthorn\fi
    \ifnum\flo@xget{tufts}=1 \flo@cttufts\fi
  \end{pgfscope}}
% ---------------------------------------------------------------- snails
% A snail, in units of its shell's width, crawling toward +y, its foot along the y axis and
% its shell on the +x side; a shell that coils to the left is the whole snail mirrored. The
% shell is Raup's coiled tube (the shells report, part A): a ring 1 across the coil and S
% (the genome's aperture) along it, y0 out from the coiling axis and x0 along it, sweeps
% through the whorls and grows W times (its expansion) a turn. Seen from the spire's side
% with the axis tilted toward the viewer, a ring shows as an ellipse, and its two extremes
% across the coil are the whorl's edges there. The whorls are painted from the mouth in, each
% older one over the one after it, so its outer edge is the suture on the next; each is
% mottled, shaded under its suture and lit on its shoulder, with bands, ribs or cords and
% growth lines. The mouth faces the foot and shows the snail's body, or the pale seal of a
% snail withdrawn into its shell, which shows no foot and no feelers.
\def\flo@gsbodypt#1#2#3{%
  \flo@sym\flo@t{0.08}\flo@calc\flo@xa{(#2)*(1+\flo@t)}%
  \flo@calc\flo@ya{(#3)*((#3)<0 ? 0.5+0.5*\flo@gsx : 0.75+0.3*\flo@gsx)}\flo@put{#1}\flo@xa\flo@ya}
\def\flo@gsbody{%
  \flo@gsbodypt1{0}{-0.78}\flo@gsbodypt2{-0.01}{-0.3}\flo@gsbodypt3{0}{0.3}\flo@gsbodypt4{0.04}{0.58}%
  \flo@gsbodypt5{0.12}{0.7}\flo@gsbodypt6{0.22}{0.66}\flo@gsbodypt7{0.24}{0.5}\flo@gsbodypt8{0.2}{0.32}%
  \flo@gsbodypt9{0.17}{0}\flo@gsbodypt{10}{0.12}{-0.45}\flo@gsbodypt{11}{0.05}{-0.7}%
  \flo@smoothprep{11}\flo@keep{gsb}%
  \flo@range\flo@gstb{0.5}{0.6}\global\let\flo@gstbg\flo@gstb
  \flo@vtone{flo@c}{\flo@gstb}\flo@vfill{flo@c}{1}{0}{\flo@kept{gsb}}%
  \begin{pgfscope}\flo@kept{gsb}\pgfusepath{clip}%
    \ifnum\flo@fine=1
      \flo@calc\flo@ta{\flo@gstb-0.25}\flo@calc\flo@tb{\flo@gstb+0.15}%
      \flo@vmottle{-0.1}{-0.8}{0.3}{0.8}{5}{0.1}\flo@ta\flo@tb{10}%
    \fi
    \flo@vtone{flo@c}{0.15}\flo@vfill{flo@c}{0.35}{1}{\pgfpathmoveto{\flo@P{-0.05}{-0.8}}\pgfpathlineto{\flo@P{-0.05}{0.7}}%
      \pgfpathlineto{\flo@P{0.04}{0.7}}\pgfpathlineto{\flo@P{0.04}{-0.8}}\pgfpathclose}%
    \flo@vtone{flo@c}{0.08}\flo@calc\flo@t{0.1*\flo@gsu*28.3465}\flo@vstroke{flo@c}{\flo@t}{0.4}{1}{\flo@kept{gsb}}%
  \end{pgfscope}}
% feelers: two long ones with eyes, a short one; #1 #2 the root, #3 #4 the tip at full length
\def\flo@gsfeeler#1#2#3#4#5{%
  \flo@calc\flo@ya{(#2)*(0.75+0.3*\flo@gsx)}\flo@calc\flo@t{0.55+0.5*\flo@gsx}%
  \flo@calc\flo@xd{#1+((#3)-(#1))*\flo@t}\flo@calc\flo@yd{\flo@ya+((#4)-(#2))*\flo@t}%
  \flo@calc\flo@xb{#1+0.02}\flo@calc\flo@yb{\flo@ya+0.12}\flo@calc\flo@xc{\flo@xd-0.04}\flo@calc\flo@yc{\flo@yd-0.1}%
  \flo@vtone{flo@c}{0.12}\flo@vstroke{flo@c}{#5}{1}{0}{\pgfpathmoveto{\flo@P{#1}\flo@ya}%
    \pgfpathcurveto{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xc\flo@yc}{\flo@P\flo@xd\flo@yd}}}
\def\flo@gsfeelers{%
  \flo@calc\flo@gsw{max(0.35,0.3*\flo@gsu)}\flo@calc\flo@gsv{max(0.28,0.24*\flo@gsu)}%
  \flo@gsfeeler{0.17}{0.66}{0.36}{1.02}\flo@gsw
  \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xd\flo@yd}{0.028pt}}%
  \flo@gsfeeler{0.1}{0.7}{0.18}{1.04}\flo@gsw
  \flo@vtone{flo@c}{0.05}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P\flo@xd\flo@yd}{0.028pt}}%
  \flo@gsfeeler{0.05}{0.68}{0}{0.84}\flo@gsv}
\newcount\flo@gsj \newcount\flo@gsb \newcount\flo@gsr \newcount\flo@gsq
% \flo@gsring{th}: the ring at growth angle th (0 the mouth): its center \flo@grcx/cy, the
% offset to the whorl's outer edge \flo@grex/ey (the inner edge is the other way) with the
% edge's wobble, the coil's direction \flo@grtx/ty, and the edge's place on the ring's
% ellipse (\flo@grcp, \flo@grsp, its cosine and sine)
\def\flo@gsring#1{%
  \flo@calc\flo@grlam{pow(\flo@gsW,(#1)/360)}\flo@calc\flo@gra{(#1)+(\flo@gsph)}%
  \flo@calc\flo@grc{cos(\flo@gra)}\flo@calc\flo@grs{sin(\flo@gra)}%
  \flo@calc\flo@gruo{\flo@gsyo*(\flo@grc)}\flo@calc\flo@grvo{\flo@gsyo*(\flo@grs)*\flo@gsca-\flo@gsxo*\flo@gssa}%
  \flo@calc\flo@grtx{\flo@gsk*(\flo@gruo)-\flo@gsyo*(\flo@grs)}%
  \flo@calc\flo@grty{\flo@gsk*(\flo@grvo)+\flo@gsyo*(\flo@grc)*\flo@gsca}%
  \flo@calc\flo@grl{veclen(\flo@grtx,\flo@grty)}%
  \flo@calc\flo@grp{((\flo@grty)*(\flo@grc)-(\flo@grtx)*(\flo@grs)*\flo@gsca)/\flo@grl}%
  \flo@calc\flo@grq{-(\flo@grtx)*\flo@gsS*\flo@gssa/\flo@grl}%
  \flo@calc\flo@grh{veclen(\flo@grp,\flo@grq)}%
  \flo@calc\flo@grw{\flo@grlam*(1+0.025*sin(3*(\flo@gra)+\flo@gswa)+0.018*sin(5*(\flo@gra)+\flo@gswb))/\flo@grh}%
  \flo@calc\flo@grcx{\flo@grlam*(\flo@gruo)}\flo@calc\flo@grcy{\flo@grlam*(\flo@grvo)}%
  \flo@calc\flo@grex{\flo@grw*(\flo@grc)*(\flo@grp)}%
  \flo@calc\flo@grey{\flo@grw*((\flo@grs)*\flo@gsca*(\flo@grp)+\flo@gsS*\flo@gssa*(\flo@grq))}%
  \flo@calc\flo@grcp{(\flo@grp)/\flo@grh}\flo@calc\flo@grsp{(\flo@grq)/\flo@grh}}
% point #3 of edge #1 (O the outer, I the inner, S the suture on it; M the mouth) of whorl #2
\def\flo@gsput#1#2#3#4#5{\expandafter\edef\csname flo@g#1x#2:#3\endcsname{#4}\expandafter\edef\csname flo@g#1y#2:#3\endcsname{#5}}
\def\flo@gsgx#1#2#3{\csname flo@g#1x#2:#3\endcsname}
\def\flo@gsgy#1#2#3{\csname flo@g#1y#2:#3\endcsname}
% \flo@gswhorl{j}: whorl j (1 the body whorl, ending at the mouth), 19 rings: its edges, the
% outer edge of the whorl before it (the suture on this one), and the light on it (the
% outward normal toward the upper left of the page)
\def\flo@gswhorl#1{%
  \flo@calc\flo@gta{max(-360*\flo@gsn,-360*(#1))}\flo@calc\flo@gtb{-360*((#1)-1)}%
  \expandafter\let\csname flo@gta#1\endcsname\flo@gta\expandafter\let\csname flo@gtb#1\endcsname\flo@gtb
  \flo@loop{gsw}\flo@gsb{0}{18}{%
    \flo@calc\flo@gth{\flo@gta+(\flo@gtb-(\flo@gta))*\the\flo@gsb/18}%
    \flo@gsring\flo@gth
    \edef\flo@k{\the\numexpr\flo@gsb+1\relax}%
    \flo@calc\flo@xa{\flo@grcx+(\flo@grex)}\flo@calc\flo@ya{\flo@grcy+(\flo@grey)}\flo@gsput O{#1}\flo@k\flo@xa\flo@ya
    \flo@calc\flo@xa{\flo@grcx-(\flo@grex)}\flo@calc\flo@ya{\flo@grcy-(\flo@grey)}\flo@gsput I{#1}\flo@k\flo@xa\flo@ya
    \flo@calc\flo@t{((\flo@grty)*\flo@gslx-(\flo@grtx)*\flo@gsly)/veclen(\flo@grtx,\flo@grty)}%
    \expandafter\let\csname flo@gL#1:\flo@k\endcsname\flo@t
    \flo@calc\flo@gth{\flo@gth-360}\flo@gsring\flo@gth
    \flo@calc\flo@xa{\flo@grcx+(\flo@grex)}\flo@calc\flo@ya{\flo@grcy+(\flo@grey)}\flo@gsput S{#1}\flo@k\flo@xa\flo@ya}}
% the box around the shell, turned to the page (\flo@gbx..) and in its own frame (\flo@gbu..)
\def\flo@gsbound#1#2{%
  \edef\flo@gx{#1}\edef\flo@gy{#2}%
  \flo@calc\flo@xa{(\flo@gx)*cos(-130)-(\flo@gy)*sin(-130)}\flo@calc\flo@ya{(\flo@gx)*sin(-130)+(\flo@gy)*cos(-130)}%
  \flo@calc\flo@gbxa{min(\flo@gbxa,\flo@xa)}\flo@calc\flo@gbxb{max(\flo@gbxb,\flo@xa)}%
  \flo@calc\flo@gbya{min(\flo@gbya,\flo@ya)}\flo@calc\flo@gbyb{max(\flo@gbyb,\flo@ya)}%
  \flo@calc\flo@gbua{min(\flo@gbua,\flo@gx)}\flo@calc\flo@gbub{max(\flo@gbub,\flo@gx)}%
  \flo@calc\flo@gbva{min(\flo@gbva,\flo@gy)}\flo@calc\flo@gbvb{max(\flo@gbvb,\flo@gy)}}
% the point at angle #1 on the mouth's ellipse, #2 times its size: \flo@xa/ya
\def\flo@gsringpt#1#2{%
  \flo@calc\flo@xa{\flo@gsmcx+(#2)*cos(#1)*\flo@gsax}%
  \flo@calc\flo@ya{\flo@gsmcy+(#2)*(cos(#1)*\flo@gsay+sin(#1)*\flo@gsby)}}
% the points #1 of the way from the suture to the outer edge of the whorl being drawn, rings
% #2 to #3, as points 1..\flo@gsm
\def\flo@gsacross#1#2#3{%
  \flo@m=0
  \flo@loop{gsac}\flo@gsr{#2}{#3}{\advance\flo@m by1
    \edef\flo@gsk@{\the\flo@gsr}%
    \flo@calc\flo@xa{\flo@gsgx S\flo@gj\flo@gsk@+(#1)*(\flo@gsgx O\flo@gj\flo@gsk@-(\flo@gsgx S\flo@gj\flo@gsk@))}%
    \flo@calc\flo@ya{\flo@gsgy S\flo@gj\flo@gsk@+(#1)*(\flo@gsgy O\flo@gj\flo@gsk@-(\flo@gsgy S\flo@gj\flo@gsk@))}%
    \flo@put{\the\flo@m}\flo@xa\flo@ya}%
  \edef\flo@gsm{\the\flo@m}}
% a whorl's detail, inside its clip: blotches, the shadow under the suture, the light on the
% shoulder, color bands, ribs or cords, growth lines near the mouth
\def\flo@gsdecor{%
  \def\flo@gbxa{9999}\def\flo@gbxb{-9999}\def\flo@gbya{9999}\def\flo@gbyb{-9999}%
  \flo@loop{gsdb}\flo@gsb{1}{\flo@gsN}{%
    \flo@calc\flo@gbxa{min(\flo@gbxa,\flo@x{\the\flo@gsb})}\flo@calc\flo@gbxb{max(\flo@gbxb,\flo@x{\the\flo@gsb})}%
    \flo@calc\flo@gbya{min(\flo@gbya,\flo@y{\the\flo@gsb})}\flo@calc\flo@gbyb{max(\flo@gbyb,\flo@y{\the\flo@gsb})}}%
  \ifnum\flo@gsj<3
    \flo@calc\flo@gmsz{0.2*(\flo@gbxb-(\flo@gbxa))}\flo@calc\flo@gmta{\flo@gst-0.16}\flo@calc\flo@gmtb{\flo@gst+0.2}%
    \ifnum\flo@fine=1 \flo@vmottle\flo@gbxa\flo@gbya\flo@gbxb\flo@gbyb{4}\flo@gmsz\flo@gmta\flo@gmtb{6}%
    \else\flo@vmottle\flo@gbxa\flo@gbya\flo@gbxb\flo@gbyb{2}\flo@gmsz\flo@gmta\flo@gmtb{0}\fi
  \fi
  \def\flo@gsbw{0}%
  \flo@loop{gssw}\flo@gsb{1}{19}{%
    \edef\flo@gsk@{\the\flo@gsb}%
    \flo@calc\flo@gsbw{\flo@gsbw+veclen(\flo@gsgx O\flo@gj\flo@gsk@-(\flo@gsgx S\flo@gj\flo@gsk@),\flo@gsgy O\flo@gj\flo@gsk@-(\flo@gsgy S\flo@gj\flo@gsk@))}}%
  \flo@calc\flo@gsbw{\flo@gsbw/19}%
  \flo@loop{gsss}\flo@gsb{1}{19}{\flo@put{\the\flo@gsb}{\flo@gsgx S\flo@gj{\the\flo@gsb}}{\flo@gsgy S\flo@gj{\the\flo@gsb}}}%
  \flo@calc\flo@gsba{\flo@gsbw*(0.15+0.3*\flo@xget{suture})}\flo@calc\flo@gsbo{0.12+0.2*\flo@xget{suture}}%
  \flo@vtone{flo@c}{0.08}\flo@vstreak{19}\flo@gsba\flo@gsba{flo@c}\flo@gsbo
  \def\flo@gsla{0}\def\flo@gslb{0}%
  \flo@loop{gslt}\flo@gsb{1}{19}{%
    \ifdim\csname flo@gL\flo@gj:\the\flo@gsb\endcsname pt>0.15pt
      \ifnum\flo@gsla=0 \edef\flo@gsla{\the\flo@gsb}\fi\edef\flo@gslb{\the\flo@gsb}\fi}%
  \ifnum\flo@gsj<4 \ifnum\flo@gsla>0 \ifnum\numexpr\flo@gslb-\flo@gsla\relax>2
    \flo@gsacross{0.62}\flo@gsla\flo@gslb
    \flo@calc\flo@gsba{\flo@gsbw*0.06}\flo@calc\flo@gsbb{\flo@gsbw*0.24}%
    \ifnum\flo@gsj=1 \def\flo@gsbo{0.6}\else\def\flo@gsbo{0.42}\fi
    \flo@vstreak\flo@gsm\flo@gsba\flo@gsbb{white}\flo@gsbo
  \fi\fi\fi
  \ifnum\flo@gsj<3 \ifnum\flo@xget{shellbands}>0
    \flo@loop{gsbn}\flo@gsq{1}{\flo@xget{shellbands}}{%
      \flo@calc\flo@gsf{0.15+0.7*\the\flo@gsq/(\flo@xget{shellbands}+1)}%
      \flo@gsacross\flo@gsf{1}{19}%
      \flo@calc\flo@gsbb{\flo@gsbw*0.7/(\flo@xget{shellbands}+1)}%
      \flo@vtone{flo@c}{0.06}\flo@vstreak{19}{0.003}\flo@gsbb{flo@c}{0.38}}%
  \fi\fi
  \edef\flo@gssc@{\flo@xget{sculpture}}\def\flo@tmp{ribs}%
  \ifx\flo@gssc@\flo@tmp
    \ifnum\flo@xget{ribs}>0 % ribs only when there are some (a fixed ribs=0 is smooth)
    \flo@calc\flo@t{\flo@gsz*3.14159/\flo@xget{ribs}}%
    \ifdim\flo@t pt>0.05pt
      \ifnum\flo@gsj<\flo@gsJ\space\edef\flo@gsnr{\flo@xget{ribs}}%
      \else\pgfmathtruncatemacro\flo@gsnr{floor(\flo@xget{ribs}*(\csname flo@gtb\flo@gj\endcsname-(\csname flo@gta\flo@gj\endcsname))/360+0.5)}\fi
      \flo@loop{gsrb}\flo@gsq{1}{\flo@gsnr}{%
        \edef\flo@gsk@{\the\numexpr1+(18*(2*\flo@gsq-1))/(2*\flo@gsnr)\relax}%
        \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{0.25*\flo@gslw}%
        \flo@vstroke{flo@c}{\flo@t}{0.3}{1}{\pgfpathmoveto{\flo@P{\flo@gsgx S\flo@gj\flo@gsk@}{\flo@gsgy S\flo@gj\flo@gsk@}}%
          \pgfpathlineto{\flo@P{\flo@gsgx O\flo@gj\flo@gsk@}{\flo@gsgy O\flo@gj\flo@gsk@}}}}%
    \fi\fi
  \else\def\flo@tmp{cords}\ifx\flo@gssc@\flo@tmp
    \ifdim\flo@gsz pt>0.25pt
      \flo@loop{gscd}\flo@gsq{1}{3}{%
        \flo@calc\flo@gsf{\the\flo@gsq/4}\flo@gsacross\flo@gsf{1}{19}%
        \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{0.3*\flo@gslw}%
        \flo@vstroke{flo@c}{\flo@t}{0.35}{1}{\flo@smoothopen{19}}}%
    \fi
  \fi\fi
  \ifnum\flo@gsj=1 \ifnum\flo@fine=1
    \flo@loop{gsgl}\flo@gsq{1}{3}{%
      \flo@chance{0.375}%
      \edef\flo@gsk@{\the\numexpr19-\flo@gsq\ifflo@yes-1\fi\relax}%
      \flo@vtone{flo@c}{0.1}\flo@calc\flo@t{0.3*\flo@gslw}%
      \flo@vstroke{flo@c}{\flo@t}{0.18}{1}{\pgfpathmoveto{\flo@P{\flo@gsgx S\flo@gj\flo@gsk@}{\flo@gsgy S\flo@gj\flo@gsk@}}%
        \pgfpathlineto{\flo@P{\flo@gsgx O\flo@gj\flo@gsk@}{\flo@gsgy O\flo@gj\flo@gsk@}}}}%
  \fi\fi}
% the mouth: the snail's body in it, or the pale seal of one withdrawn; the lip
\def\flo@gsmouth{%
  \flo@loop{gsmo}\flo@gsb{1}{12}{%
    \flo@calc\flo@xa{\flo@gsmcx+0.7*(\flo@gsgx M0{\the\flo@gsb}-(\flo@gsmcx))}%
    \flo@calc\flo@ya{\flo@gsmcy+0.7*(\flo@gsgy M0{\the\flo@gsb}-(\flo@gsmcy))}%
    \flo@put{\the\flo@gsb}\flo@xa\flo@ya}%
  \flo@smoothprep{12}%
  \begingroup\def\flo@rampname{flo@ramp}%
    \ifnum\flo@xget{withdrawn}=1 \flo@vtone{flo@c}{0.9}\flo@vfill{flo@c}{0.95}{0}{\flo@smoothpath}%
    \else\flo@calc\flo@t{\flo@gstbg-0.18}\flo@vtone{flo@c}{\flo@t}\flo@vfill{flo@c}{1}{0}{\flo@smoothpath}\fi
  \endgroup
  \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{0.7*\flo@gslw}\flo@vstroke{flo@c}{\flo@t}{0.55}{1}{\flo@smoothpath}%
  \ifnum\flo@xget{lip}=1
    \flo@loop{gslp}\flo@gsb{0}{6}{%
      \flo@calc\flo@t{\flo@gsfs+\flo@gsdir*\the\flo@gsb}\flo@gsringpt\flo@t{0.9}%
      \flo@put{\the\numexpr\flo@gsb+1\relax}\flo@xa\flo@ya}%
    \flo@vstreak{7}{0.03}{0.06}{white}{0.8}%
  \fi}
% the shell. Draws: the tilt, the edge's two wobbles; then for each whorl its tone, and for the
% two outer whorls their blotches; three growth lines
\def\flo@gsshell{%
  \edef\flo@gsW{\flo@xget{expansion}}\edef\flo@gsn{\flo@xget{whorls}}\edef\flo@gsS{\flo@xget{aperture}}%
  \ifnum\flo@xget{opencoil}=1 \flo@calc\flo@gsD{1.15/\flo@gsW}\else\def\flo@gsD{0.03}\fi
  \flo@calc\flo@gsyo{(1+\flo@gsD)/(1-\flo@gsD)}%
  \flo@calc\flo@gsxo{3*\flo@xget{spire}/\flo@gsW*\flo@gsyo}%
  \flo@calc\flo@gsk{ln(\flo@gsW)/6.28319}%
  \flo@range\flo@t{34}{50}\flo@calc\flo@gsca{cos(\flo@t)}\flo@calc\flo@gssa{sin(\flo@t)}%
  \def\flo@gsph{-35}%
  \flo@range\flo@gswa{0}{360}\flo@range\flo@gswb{0}{360}%
  \flo@calc\flo@gslx{cos(265)}\flo@calc\flo@gsly{sin(265)}%
  \pgfmathtruncatemacro\flo@gsJ{ceil(\flo@gsn)}%
  \flo@loop{gswh}\flo@gsj{1}{\flo@gsJ}{\expandafter\flo@gswhorl\expandafter{\the\flo@gsj}}%
  \flo@gsring{0}\let\flo@gsmcx\flo@grcx\let\flo@gsmcy\flo@grcy
  \flo@calc\flo@gsax{cos(\flo@gsph)}\flo@calc\flo@gsay{sin(\flo@gsph)*\flo@gsca}\flo@calc\flo@gsby{\flo@gsS*\flo@gssa}%
  \flo@calc\flo@gsfs{atan2(\flo@grsp,\flo@grcp)}%
  \flo@calc\flo@t{(-(\flo@gsax)*(\flo@grsp))*(\flo@grtx)+(-(\flo@gsay)*(\flo@grsp)+\flo@gsby*(\flo@grcp))*(\flo@grty)}%
  \ifdim\flo@t pt>0pt \def\flo@gsdir{30}\else\def\flo@gsdir{-30}\fi
  \flo@loop{gsmp}\flo@gsb{0}{11}{%
    \flo@calc\flo@t{30*\the\flo@gsb}\flo@gsringpt\flo@t{1}\flo@gsput M0{\the\numexpr\flo@gsb+1\relax}\flo@xa\flo@ya}%
  % the frame: the spire toward -40 degrees on the page, the coil 0.98 across
  \def\flo@gbxa{9999}\def\flo@gbxb{-9999}\def\flo@gbya{9999}\def\flo@gbyb{-9999}%
  \def\flo@gbua{9999}\def\flo@gbub{-9999}\def\flo@gbva{9999}\def\flo@gbvb{-9999}%
  \flo@loop{gsbj}\flo@gsj{1}{\flo@gsJ}{\flo@loop{gsbb}\flo@gsb{1}{19}{%
    \flo@gsbound{\flo@gsgx O{\the\flo@gsj}{\the\flo@gsb}}{\flo@gsgy O{\the\flo@gsj}{\the\flo@gsb}}}}%
  \flo@loop{gsbm}\flo@gsb{1}{12}{\flo@gsbound{\flo@gsgx M0{\the\flo@gsb}}{\flo@gsgy M0{\the\flo@gsb}}}%
  \flo@calc\flo@gssc{0.98/max(\flo@gbub-(\flo@gbua),0.7*(\flo@gbvb-(\flo@gbva)))}%
  \flo@calc\flo@xa{0.4-(\flo@gbxa+(\flo@gbxb))/2*\flo@gssc}\flo@calc\flo@ya{-0.03-(\flo@gbya+(\flo@gbyb))/2*\flo@gssc}%
  \begin{pgfscope}%
    \pgftransformshift{\flo@P\flo@xa\flo@ya}\pgftransformrotate{-130}\pgftransformscale{\flo@gssc}%
    \flo@calc\flo@gsuu{\flo@gsu*\flo@gssc}\flo@calc\flo@gslw{0.06*\flo@gsu*28.3465}%
    \flo@loop{gssh}\flo@gsj{1}{\flo@gsJ}{%
      \edef\flo@gj{\the\flo@gsj}%
      \flo@loop{gsp1}\flo@gsb{1}{19}{\flo@put{\the\flo@gsb}{\flo@gsgx O\flo@gj{\the\flo@gsb}}{\flo@gsgy O\flo@gj{\the\flo@gsb}}}%
      \flo@m=19
      \ifnum\flo@gsj=1
        \flo@loop{gsp2}\flo@gsb{1}{5}{\advance\flo@m by1
          \flo@calc\flo@t{\flo@gsfs+\flo@gsdir*\the\flo@gsb}\flo@gsringpt\flo@t{1}\flo@put{\the\flo@m}\flo@xa\flo@ya}%
      \fi
      \flo@loop{gsp3}\flo@gsb{1}{19}{\advance\flo@m by1
        \edef\flo@gsk@{\the\numexpr20-\flo@gsb\relax}\flo@put{\the\flo@m}{\flo@gsgx I\flo@gj\flo@gsk@}{\flo@gsgy I\flo@gj\flo@gsk@}}%
      \edef\flo@gsN{\the\flo@m}%
      \flo@calc\flo@gsz{(\flo@gsyo+1)*pow(\flo@gsW,-(\the\flo@gsj-1))*\flo@gsuu}%
      \flo@sym\flo@t{0.03}\flo@calc\flo@gst{\flo@gstn+\flo@t}%
      \ifdim\flo@gsz pt>0.02pt
        \flo@smoothprep\flo@gsN\flo@keep{gsw}%
        \flo@vtone{flo@c}{\flo@gst}\flo@vfill{flo@c}{1}{0}{\flo@kept{gsw}}%
        \begin{pgfscope}\flo@kept{gsw}\pgfusepath{clip}%
          \ifdim\flo@gsz pt>0.12pt \flo@gsdecor\fi
          \flo@loop{gsoe}\flo@gsb{1}{19}{\flo@put{\the\flo@gsb}{\flo@gsgx O\flo@gj{\the\flo@gsb}}{\flo@gsgy O\flo@gj{\the\flo@gsb}}}%
          \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@gslw}{0.55}{1}{\flo@smoothopen{19}}%
        \end{pgfscope}%
      \fi
      \ifnum\flo@gsj=1 \flo@gsmouth\fi}%
  \end{pgfscope}}
% a snail; #1 its shell's width on the page in pt
\def\flo@snail#1{%
  \flo@calc\flo@gsu{(#1)/28.45276}%
  \ifdim\flo@gsu pt>0.25pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@gsx{\flo@xget{extension}}\edef\flo@gsground{\flo@xget{ground}}%
  \flo@calc\flo@gstn{\flo@xget{tone}-0.06}%
  \def\flo@tmp{pale}\ifx\flo@gsground\flo@tmp\flo@calc\flo@gstn{min(0.72,\flo@gstn+0.25)}\fi
  \gdef\flo@gstbg{0.55}%
  \begin{pgfscope}%
    \edef\flo@t{\flo@xget{hand}}\def\flo@tmp{sinistral}\ifx\flo@t\flo@tmp\pgftransformxscale{-1}\fi
    \ifnum\flo@xget{withdrawn}=0
      \begin{pgfscope}\def\flo@rampname{flo@ramp}\flo@gsbody\flo@gsfeelers\end{pgfscope}%
    \fi
    \def\flo@tmp{copper}\ifx\flo@gsground\flo@tmp\def\flo@rampname{flo@aramp}\fi
    \flo@gsshell
  \end{pgfscope}}
% ---------------------------------------------------------------- birds
% A bird: flora's small songbird, seen from the side facing +x, its feet at the origin, in
% units of its length from tail to beak. A seed-eater perches with a short conical bill
% and speckled breast; a nectar bird (a hummingbird or a sunbird) has a long thin bill,
% straight or curved, a copper throat, and perches or hovers, tilted up with its wings a
% blur above its back and its tail fanned. A crest, and the tail's length, by the genome.
% a tail feather from the root along +y, #1 long: a blade, narrow at the root, round at the tip
\def\flo@avfeather#1{%
  \flo@put1{0}{0}\flo@calc\flo@ya{#1}\flo@put7{0}\flo@ya
  \flo@loop{avf}\flo@Wb{1}{5}{%
    \flo@calc\flo@v{\ifcase\flo@Wb\or0.12\or0.35\or0.6\or0.82\or0.95\fi}%
    \flo@calc\flo@xa{0.055*pow(sin(180*pow(\flo@v,0.4)),0.6)}\flo@calc\flo@xb{-\flo@xa}\flo@calc\flo@ya{\flo@v*(#1)}%
    \flo@put{\the\numexpr\flo@Wb+1\relax}\flo@xa\flo@ya\flo@put{\the\numexpr13-\flo@Wb\relax}\flo@xb\flo@ya}%
  \flo@smoothprep{12}}
\def\flo@avbodypt#1#2#3{\flo@sym\flo@t{0.012}\flo@calc\flo@xa{#2+\flo@t}\flo@sym\flo@t{0.012}\flo@calc\flo@ya{#3+\flo@t}%
  \flo@put{#1}\flo@xa\flo@ya}
% the tail, the body (breast, mottle, specks or a copper throat, the cap, the rim)
\def\flo@avbody{%
  \flo@calc\flo@avlw{max(0.3,0.3*\flo@avu)}%
  \flo@loop{avt}\flo@Wa{1}{4}{%
    \flo@calc\flo@t{\flo@xget{tail}-0.03}\flo@calc\flo@v{\flo@xget{tail}+0.03}\flo@range\flo@avL\flo@t\flo@v
    \flo@range\flo@t{-150}{-140}\flo@calc\flo@ava{\flo@t+\flo@avfan*\the\flo@Wa-90}%
    \begin{pgfscope}\pgftransformshift{\flo@P{-0.26}{0.28}}\pgftransformrotate{\flo@ava}%
      \flo@avfeather\flo@avL\flo@keep{avf}%
      \flo@calc\flo@t{0.12+0.05*\the\flo@Wa}\flo@vtone{flo@c}\flo@t\flo@vfill{flo@c}{1}{0}{\flo@kept{avf}}%
      \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@avlw}{0.5}{0}{\flo@kept{avf}}%
    \end{pgfscope}}%
  \flo@avbodypt1{0.37}{0.56}\flo@avbodypt2{0.3}{0.665}\flo@avbodypt3{0.15}{0.64}\flo@avbodypt4{-0.03}{0.54}%
  \flo@avbodypt5{-0.22}{0.4}\flo@avbodypt6{-0.31}{0.3}\flo@avbodypt7{-0.27}{0.22}\flo@avbodypt8{-0.08}{0.12}%
  \flo@avbodypt9{0.12}{0.12}\flo@avbodypt{10}{0.27}{0.27}\flo@avbodypt{11}{0.35}{0.42}%
  \flo@smoothprep{11}\flo@keep{avb}%
  \flo@vtone{flo@c}{\flo@avt}\flo@vfill{flo@c}{1}{0}{\flo@kept{avb}}%
  \begin{pgfscope}\flo@kept{avb}\pgfusepath{clip}%
    \flo@loop{avbr}\flo@Wa{1}{4}{%
      \flo@calc\flo@xa{0.08+0.04*\the\flo@Wa}\flo@calc\flo@ya{0.06+0.03*\the\flo@Wa}%
      \flo@vblob{0.17}{0.27}\flo@xa\flo@ya{0.2}{9}\flo@vfill{white}{0.2}{0}{\flo@smoothpath}}%
    \flo@calc\flo@ta{\flo@avt-0.2}\flo@calc\flo@tb{\flo@avt+0.2}%
    \ifnum\flo@fine=1 \flo@vmottle{-0.35}{0.1}{0.4}{0.7}{10}{0.07}\flo@ta\flo@tb{10}%
    \else\flo@vmottle{-0.35}{0.1}{0.4}{0.7}{4}{0.07}\flo@ta\flo@tb{0}\fi
    \def\flo@tmp{hummingbird}\ifx\flo@avk\flo@tmp
      \flo@vblob{0.3}{0.47}{0.075}{0.05}{0.15}{8}\flo@vaccent{flo@c}{0}\flo@vfill{flo@c}{0.85}{0}{\flo@smoothpath}%
      \ifnum\flo@fine=1 \flo@vblob{0.31}{0.49}{0.03}{0.016}{0.2}{7}\flo@vfill{white}{0.5}{0}{\flo@smoothpath}\fi
    \else\ifnum\flo@fine=1
      \flo@vtone{flo@c}{0.1}\flo@vfill{flo@c}{0.7}{0}{\flo@loop{avsp}\flo@Wa{1}{14}{%
        \flo@range\flo@xa{0.08}{0.3}\flo@range\flo@ya{0.16}{0.42}\flo@range\flo@t{-20}{20}%
        \flo@calc\flo@xb{0.012*cos(\flo@t)}\flo@calc\flo@yb{0.012*sin(\flo@t)}%
        \flo@calc\flo@xc{-0.022*sin(\flo@t)}\flo@calc\flo@yc{0.022*cos(\flo@t)}%
        \pgfpathellipse{\flo@P\flo@xa\flo@ya}{\flo@P\flo@xb\flo@yb}{\flo@P\flo@xc\flo@yc}}}%
    \fi\fi
    \flo@vblob{0.24}{0.66}{0.15}{0.08}{0.1}{9}\flo@vtone{flo@c}{0.08}\flo@vfill{flo@c}{0.6}{1}{\flo@smoothpath}%
    \flo@vtone{flo@c}{0.05}\flo@calc\flo@t{0.07*\flo@avu*28.3465}\flo@vstroke{flo@c}{\flo@t}{0.5}{1}{\flo@kept{avb}}%
  \end{pgfscope}}
% the folded wing: a dark blade with feather tips, white lifted along the feathers
\def\flo@avwing{%
  \flo@put1{0.17}{0.47}\flo@put2{0.04}{0.52}\flo@put3{-0.12}{0.45}\flo@put4{-0.28}{0.33}\flo@put5{-0.44}{0.22}%
  \flo@put6{-0.35}{0.23}\flo@put7{-0.38}{0.19}\flo@put8{-0.26}{0.21}\flo@put9{-0.28}{0.17}\flo@put{10}{-0.12}{0.23}%
  \flo@put{11}{0.05}{0.31}\flo@put{12}{0.15}{0.4}\flo@smoothprepT{12}{0.8}\flo@keep{avw}%
  \flo@calc\flo@avtw{\flo@avt-0.1}%
  \flo@vtone{flo@c}{\flo@avtw}\flo@vfill{flo@c}{1}{0}{\flo@kept{avw}}%
  \begin{pgfscope}\flo@kept{avw}\pgfusepath{clip}%
    \flo@calc\flo@ta{\flo@avtw-0.15}\flo@calc\flo@tb{\flo@avtw+0.2}%
    \ifnum\flo@fine=1 \def\flo@avnm{6}\else\def\flo@avnm{3}\fi
    \flo@vmottle{-0.45}{0.15}{0.2}{0.6}\flo@avnm{0.07}\flo@ta\flo@tb{0}%
    \def\flo@twa{0.025}\def\flo@twb{0.003}%
    \flo@loop{avws}\flo@Wa{1}{5}{%
      \flo@calc\flo@ya{0.28+0.04*\the\flo@Wa}%
      \flo@calc\flo@yb{\flo@ya+0.05}\flo@calc\flo@yc{\flo@ya+0.03}\flo@calc\flo@yd{\flo@ya-0.03}%
      \flo@calc\flo@xe{-0.3-0.02*\the\flo@Wa}\flo@calc\flo@ye{\flo@ya-0.1-0.01*\the\flo@Wa}%
      \flo@range\flo@t{0.45}{0.7}%
      \flo@vfill{white}{\flo@t}{0}{\flo@vtaper{0.12}\flo@yb{0}\flo@yc{-0.15}\flo@yd\flo@xe\flo@ye}}%
    \flo@vtone{flo@c}{0.04}\flo@calc\flo@t{0.06*\flo@avu*28.3465}\flo@vstroke{flo@c}{\flo@t}{0.5}{1}{\flo@kept{avw}}%
  \end{pgfscope}}
% a hovering bird's wings: three passes of a long wing above its back, the middle one firmer
\def\flo@avhover{%
  \flo@put1{0}{0.02}\flo@put2{0.12}{0.07}\flo@put3{0.32}{0.085}\flo@put4{0.5}{0.05}%
  \flo@put5{0.56}{0}\flo@put6{0.48}{-0.03}\flo@put7{0.28}{-0.045}\flo@put8{0.08}{-0.03}%
  \flo@smoothprep{8}\flo@keep{avh}\flo@calc\flo@avtw{\flo@avt-0.1}%
  \flo@loop{avhw}\flo@Wa{1}{3}{\begin{pgfscope}%
    \flo@calc\flo@t{70+25*\the\flo@Wa}\pgftransformshift{\flo@P{0.06}{0.5}}\pgftransformrotate{\flo@t}%
    \flo@vtone{flo@c}{\flo@avtw}%
    \ifnum\flo@Wa=2 \flo@vfill{flo@c}{0.4}{0}{\flo@kept{avh}}%
      \flo@vtone{flo@c}{0.05}\flo@vstroke{flo@c}{\flo@avlw}{0.4}{0}{\flo@kept{avh}}%
    \else\flo@vfill{flo@c}{0.18}{0}{\flo@kept{avh}}\fi
  \end{pgfscope}}}
% a crest of four feathers on the back of the head
\def\flo@avcrest{%
  \def\flo@twa{0.03}\def\flo@twb{0.004}%
  \flo@vtone{flo@c}{0.1}\flo@vfill{flo@c}{1}{0}{\flo@loop{avc}\flo@Wa{1}{4}{%
    \flo@range\flo@avL{0.08}{0.12}%
    \flo@calc\flo@xa{0.26-0.04*\the\flo@Wa}\flo@calc\flo@ya{0.65-0.01*\the\flo@Wa}%
    \flo@calc\flo@t{140+8*\the\flo@Wa}%
    \flo@calc\flo@xd{\flo@xa+\flo@avL*cos(\flo@t)}\flo@calc\flo@yd{\flo@ya+\flo@avL*sin(\flo@t)}%
    \flo@lgseg\flo@xa\flo@ya\flo@xd\flo@yd}}}
% the bill: a seed-eater's cone, a nectar bird's straight or curved one
\def\flo@avbill{%
  \edef\flo@t{\flo@xget{bill}}\flo@vtone{flo@c}{0.05}%
  \def\flo@tmp{conical}\ifx\flo@t\flo@tmp
    \flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{0.355}{0.585}}\pgfpathlineto{\flo@P{0.47}{0.545}}%
      \pgfpathlineto{\flo@P{0.36}{0.51}}\pgfpathclose}%
    \flo@vstroke{white}{0.2}{0.6}{0}{\pgfpathmoveto{\flo@P{0.36}{0.548}}\pgfpathlineto{\flo@P{0.45}{0.546}}}%
  \fi
  \def\flo@tmp{straight}\ifx\flo@t\flo@tmp
    \flo@vfill{flo@c}{1}{0}{\pgfpathmoveto{\flo@P{0.35}{0.575}}\pgfpathlineto{\flo@P{0.69}{0.55}}%
      \pgfpathlineto{\flo@P{0.352}{0.538}}\pgfpathclose}%
  \fi
  \def\flo@tmp{curved}\ifx\flo@t\flo@tmp
    \def\flo@twa{0.036}\def\flo@twb{0.006}%
    \flo@vfill{flo@c}{1}{0}{\flo@vtaper{0.35}{0.556}{0.46}{0.562}{0.58}{0.535}{0.66}{0.475}}%
  \fi}
% a bird; #1 its length on the page in pt
\def\flo@bird#1{%
  \flo@calc\flo@avu{(#1)/28.45276}%
  \ifdim\flo@avu pt>0.3pt \def\flo@fine{1}\else\def\flo@fine{0}\fi
  \edef\flo@avk{\flo@xget{kind}}\edef\flo@avpose{\flo@xget{pose}}\edef\flo@avground{\flo@xget{ground}}%
  \edef\flo@avt{\flo@xget{tone}}%
  \def\flo@tmp{dark}\ifx\flo@avground\flo@tmp\flo@calc\flo@avt{\flo@avt-0.12}\fi
  \def\flo@tmp{copper}\ifx\flo@avground\flo@tmp\def\flo@rampname{flo@aramp}\fi
  \def\flo@avfan{7}%
  \begin{pgfscope}%
    \def\flo@tmp{hover}\ifx\flo@avpose\flo@tmp\def\flo@avfan{14}%
      \pgftransformshift{\flo@P{0.05}{0.35}}\pgftransformrotate{22}\pgftransformshift{\flo@P{-0.05}{-0.35}}\fi
    \flo@avbody
    \ifnum\flo@xget{crest}=1 \flo@avcrest\fi
    \def\flo@tmp{hover}\ifx\flo@avpose\flo@tmp\flo@avhover\else\flo@avwing\fi
    \flo@avbill
    \flo@vfill{white}{0.95}{0}{\pgfpathcircle{\flo@P{0.285}{0.585}}{0.03pt}}%
    \flo@vtone{flo@c}{0.03}\flo@vfill{flo@c}{1}{0}{\pgfpathcircle{\flo@P{0.29}{0.585}}{0.018pt}}%
    \flo@vfill{white}{1}{0}{\pgfpathcircle{\flo@P{0.284}{0.592}}{0.006pt}}%
    \def\flo@tmp{hover}\ifx\flo@avpose\flo@tmp\else
      \flo@calc\flo@t{max(0.4,0.3*\flo@avu)}\flo@vtone{flo@c}{0.06}%
      \flo@vstroke{flo@c}{\flo@t}{1}{0}{\pgfpathmoveto{\flo@P{0.02}{0.14}}\pgfpathlineto{\flo@P00}%
        \pgfpathmoveto{\flo@P{-0.05}{0}}\pgfpathlineto{\flo@P{0.05}{0.005}}%
        \pgfpathmoveto{\flo@P{0.1}{0.14}}\pgfpathlineto{\flo@P{0.08}{0}}%
        \pgfpathmoveto{\flo@P{0.03}{0}}\pgfpathlineto{\flo@P{0.13}{0.005}}}%
    \fi
  \end{pgfscope}}
% a visitor of the kind last drawn; #1 its size on the page in pt (a wingspan, a length)
\def\flo@visitor#1{%
  \edef\flo@vg{\flo@xget{group}}%
  \def\flo@tmp{lepidoptera}\ifx\flo@vg\flo@tmp\flo@calc\flo@t{(#1)/2}\pgftransformscale{\flo@t}\flo@lepid{#1}\fi
  \def\flo@tmp{bee}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@bee{#1}\fi
  \def\flo@tmp{fly}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@bee{#1}\fi
  \def\flo@tmp{odonate}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@odo{#1}\fi
  \def\flo@tmp{beetle}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@beetle{#1}\fi
  \def\flo@tmp{larva}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@caterpillar{#1}\fi
  \def\flo@tmp{snail}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@snail{#1}\fi
  \def\flo@tmp{bird}\ifx\flo@vg\flo@tmp\pgftransformscale{#1}\flo@bird{#1}\fi}
% sample the visitor, then reseed for the drawing
\def\flo@vispicsetup#1{%
  \pgfkeys{/florilegium,#1}\flo@colors\flo@intof\flo@o@seed\flo@o@seed
  \edef\flo@tmp{\noexpand\florilegiumvisitor[{\flo@o@traits}]{\flo@o@seed}{\flo@o@role}}\flo@tmp
  \edef\flo@o@seed{\flo@xget{seed}}\edef\flo@o@role{\flo@xget{role}}% as the sampler settled them
  \ifx\flo@o@draw\pgfutil@empty
    \edef\flo@o@draw{\the\numexpr\ifnum\flo@o@seed=2147483646 1\else\flo@o@seed+1\fi\relax}\fi
  \flo@drawseed\flo@o@draw
  \pgfmathsetlength\pgf@x{\flo@o@size}\edef\flo@sizept{\pgf@sys@tonumber\pgf@x}}
% \pic {florilegium visitor={seed=7, role=butterfly, size=3cm}}: a visitor of the role
% (or a kind: role=moth, role=ladybird), size its wingspan or length
\tikzset{pics/florilegium visitor/.style={code={\flo@engine{#1}{visitor}{%
  \flo@vispicsetup{#1}\pgfsetroundcap\pgfsetroundjoin\flo@visitor\flo@sizept}}}}
