<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg 
 xmlns="http://www.w3.org/2000/svg" 
 version="1.1" 
 xmlns:xlink="http://www.w3.org/1999/xlink"
 width="640px" 
 height="600px"
 >
<title>Floral formula as SVG diagram</title>
<defs>
 <!-- Tepal is denoted by color gradient -->
 <radialGradient id="tepal" cx="0" cy="0" r="10"  fx="0" fy="0" gradientUnits="userSpaceOnUse">
  <stop offset="5%" stop-color="green" />
  <stop offset="95%" stop-color="white" />
 </radialGradient>
 <!--                        -->
 <!-- Calyx (sepals) using K -->
 <!--                        -->
 <symbol id="K3" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 5.18,-19.32 A 20,20 0 0 0 -5.18,-19.32
     M -19.32,5.18 A 23,23 0 0 0 -14.14,14.14
     M 14.14,14.14 A 23,23 0 0 0 19.32,5.18
    " />
  </g>
 </symbol>
 <symbol id="K4" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 8.04,-19.4 A 23,23 0 0 0 -8.04,-19.4
     M -19.4,-8.04 A 23,23 0 0 0 -19.4,8.04
     M -8.04,19.4 A 23,23 0 0 0 8.04,19.4
     M 19.4,8.04 A 23,23 0 0 0 19.4,-8.04
     " />
  </g>
 </symbol>
 <symbol id="K(4)" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="0" r="21" />
  </g>
 </symbol>
 <symbol id="K5" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 7.11,-21.87 A 23,23 0 0 0 -7.11,-21.87
    M -18.61,-13.52 A 23,23 0 0 0 -23,0
    M -18.61,13.52 A 23,23 0 0 0 -7.11,21.87
    M 7.11,21.87 A 23,23 0 0 0 18.61,13.52
    M 23,0 A 23,23 0 0 0 18.61,-13.52
    " />
  </g>
 </symbol>
 <symbol id="K(5)" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="0" r="23" />
  </g>
 </symbol>
 <symbol id="K6" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 5.95,-22.22 A 23,23 0 0 0 -5.95,-22.22
    M -16.26,-16.26 A 23,23 0 0 0 -22.22,-5.95
    M -22.22,5.95 A 23,23 0 0 0 -16.26,16.26
    M -5.95,22.22 A 23,23 0 0 0 5.95,22.22
    M 16.26,16.26 A 23,23 0 0 0 22.22,5.95
    M 22.22,-5.95 A 23,23 0 0 0 16.26,-16.26
    " />
  </g>
 </symbol>
 <!--                    -->
 <!-- C Corolla (petals) -->
 <!--                    -->
 <symbol id="C3" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
      <path d="M 0,10 Q  25.98,15
    8.66,-5 0,-30
    -8.66,-5 -25.98,15
    0,10
    z" />
  </g>
 </symbol>
 <symbol id="C4" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 6,6 C 22,22 22,-22 6,-6
    22,-22 -22,-22 -6,-6
   -22,-22 -22,22  -6,6
   -22,22   22,22   6,6 z" />
  </g>
 </symbol>
 <symbol id="C(4)" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="0" r="18" />
   <path d="M 6,6 C 22,22 22,-22 6,-6
    22,-22 -22,-22 -6,-6
   -22,-22 -22,22  -6,6
   -22,22   22,22   6,6 z" />
  </g>
 </symbol>
 <symbol id="C5" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 5.9,-8.1 C 17.6,-24.3 -17.6,-24.3
    -5.9,-8.1 -17.6,-24.3 -28.5,9.3
    -9.5,3.1 -28.5,9.3 0.0,30.0
     0.0,10.0 0.0,30.0 28.5,9.3
     9.5,3.1 28.5,9.3 17.6,-24.3
     5.9,-8.1
     z" />
  </g>
 </symbol>
  <symbol id="C(5)" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="0" r="20" />
   <path d="M 5.9,-8.1 C 17.6,-24.3 -17.6,-24.3
    -5.9,-8.1 -17.6,-24.3 -28.5,9.3
    -9.5,3.1 -28.5,9.3 0,30.0
     0,10.0 0,30.0 28.5,9.3
     9.5,3.1 28.5,9.3 17.6,-24.3
     5.9,-8.1
     z" />
  </g>
 </symbol>
 <symbol id="C6" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 12,0 Q  25.98,-15
   6,-10.39 0,-30
   -6,-10.39 -25.98,-15
   -12,0 -25.98,15
   -6,10.39 0,30
   6,10.39 25.98,15
   12,0
   z" />
  </g>
 </symbol>
 <!--                                              -->
 <!-- A androecium: stamens: anthers and filaments -->
 <!--                                              -->
 <symbol id="A1" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="-12" r="2" />
  </g>
 </symbol>
 <symbol id="(A1G1)" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 0,0 V -12" />
  </g>
 </symbol>
  <symbol id="A3" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="-12" r="2" />
   <circle cx="10.39" cy="6" r="2" />
   <circle cx="-10.39" cy="6" r="2" />
  </g>
 </symbol>
 <symbol id="A4" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="8" cy="0" r="2" />
   <circle cx="0" cy="8" r="2" />
   <circle cx="-8" cy="0" r="2" />
   <circle cx="0" cy="-8" r="2" />
  </g>
 </symbol>
 <symbol id="A5" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="-10" r="2" />
   <circle cx="-9.51" cy="-3.09" r="2" />
   <circle cx="-5.88" cy="8.09" r="2" />
   <circle cx="5.88" cy="8.09" r="2" />
   <circle cx="9.51" cy="-3.09" r="2" />
  </g>
 </symbol>
 <symbol id="A6" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="-10" r="2" />
   <circle cx="-8.66" cy="-5" r="2" />
   <circle cx="-8.66" cy="5" r="2" />
   <circle cx="0" cy="10" r="2" />
   <circle cx="8.66" cy="5" r="2" />
   <circle cx="8.66" cy="-5" r="2" />
  </g>
 </symbol>
 <symbol id="A12" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
    <circle cx="0" cy="-10" r="2" />
   <circle cx="-5" cy="-8.66" r="2" />
   <circle cx="-8.66" cy="-5" r="2" />
   <circle cx="-10" cy="0" r="2" />
   <circle cx="-8.66" cy="5" r="2" />
   <circle cx="-5" cy="8.66" r="2" />
   <circle cx="0" cy="10" r="2" />
   <circle cx="5" cy="8.66" r="2" />
   <circle cx="8.66" cy="5" r="2" />
   <circle cx="10" cy="0" r="2" />
   <circle cx="8.66" cy="-5" r="2" />
   <circle cx="5" cy="-8.66" r="2" />
  </g>
 </symbol>
 <symbol id="A8" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="8" cy="0" r="2" />
   <circle cx="0" cy="8" r="2" />
   <circle cx="-8" cy="0" r="2" />
   <circle cx="0" cy="-8" r="2" />
   <!-- second four -->
   <circle cx="6" cy="-6" r="2" />
   <circle cx="-6" cy="-6" r="2" />
   <circle cx="-6" cy="6" r="2" />
   <circle cx="6" cy="6" r="2" />
  </g>
 </symbol>
 <symbol id="A10" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="-10" r="2" />
   <circle cx="-9.51" cy="-3.09" r="2" />
   <circle cx="-5.88" cy="8.09" r="2" />
   <circle cx="5.88" cy="8.09" r="2" />
   <circle cx="9.51" cy="-3.09" r="2" />
   <circle cx="5.88" cy="-8.09" r="2" />
   <circle cx="-5.88" cy="-8.09" r="2" />
   <circle cx="-9.51" cy="3.09" r="2" />
   <circle cx="0" cy="10" r="2" />
   <circle cx="9.51" cy="3.09" r="2" />
  </g>
 </symbol>
 <!-- A20 is currently being used for many -->
 <symbol id="A20" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
    <circle cx="10" cy="0" r="2" />
    <circle cx="9.51" cy="-3.09" r="2" />
    <circle cx="8.09" cy="-5.88" r="2" />
    <circle cx="5.88" cy="-8.09" r="2" />
    <circle cx="3.09" cy="-9.51" r="2" />
    <circle cx="0" cy="-10" r="2" />
    <circle cx="-3.09" cy="-9.51" r="2" />
    <circle cx="-5.88" cy="-8.09" r="2" />
    <circle cx="-8.09" cy="-5.88" r="2" />
    <circle cx="-9.51" cy="-3.09" r="2" />
    <circle cx="-10" cy="0" r="2" />
    <circle cx="-9.51" cy="3.09" r="2" />
    <circle cx="-8.09" cy="5.88" r="2" />
    <circle cx="-5.88" cy="8.09" r="2" />
    <circle cx="-3.09" cy="9.51" r="2" />
    <circle cx="0" cy="10" r="2" />
    <circle cx="3.09" cy="9.51" r="2" />
    <circle cx="5.88" cy="8.09" r="2" />
    <circle cx="8.09" cy="5.88" r="2" />
    <circle cx="9.51" cy="3.09" r="2" />
  </g>
 </symbol>
 <!--                                                    -->
 <!-- G gynoecium: carpels, pistil with stigma and style -->
 <!--                                                    -->
 <symbol id="G1" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <circle cx="0" cy="0" r="4" />
  </g>
 </symbol> 
 <symbol id="G2" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <path d="M 0,-1.5 A 2.5,2.5 0 1 0 0,2 2.5,2.5 0 1 0 0,-1.5" />
  </g>
 </symbol>
 <symbol id="G3" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <polygon points="0,-4 -3.46,2 3.46,2" />
  </g>
 </symbol> 
 <symbol id="G4" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <rect x="-3" y="-3" width="6" height="6" />
  </g>
 </symbol> 
 <symbol id="G5" viewBox="0 0 50 50">
  <g transform="translate(25,25)">
   <polygon points="0,-4 -3.8,-1.24 -2.35,3.24 2.35,3.24 3.8,-1.24" />
  </g>
 </symbol> 
</defs>
<!--                                 -->
<!-- formula are assembled down here -->
<!--                                 -->
<!-- The width and height can magnify and demagnify the symbol -->
<!-- as the use function scales the defn referenced            -->
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K4C4A4G1</title>
  <g stroke="darkgreen" stroke-width="3" fill="none">
   <use x="0" y="0" width="100" height="100" xlink:href="#K4" />
  </g>
  <g fill="white">
   <use x="0" y="0" width="100" height="100" xlink:href="#C4" />
  </g>
  <g fill="yellow">
   <use x="0" y="0" width="100" height="100" xlink:href="#A4" />
  </g>
  <g fill="orange">
   <use x="0" y="0" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K0C4A4G2</title>
  <g fill="white">
   <use x="100" y="0" width="100" height="100" xlink:href="#C4" />
  </g>
  <g fill="yellow">
   <use x="100" y="0" width="100" height="100" xlink:href="#A4" />
  </g>
  <g fill="orange">
   <use x="100" y="0" width="100" height="100" xlink:href="#G2" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K0C(4)A4G1</title>
  <g fill="white">
   <use x="200" y="0" width="100" height="100" xlink:href="#C(4)" />
  </g>
  <g fill="yellow">
   <use x="200" y="0" width="100" height="100" xlink:href="#A8" />
  </g>
  <g fill="orange">
   <use x="200" y="0" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K(4)C(4)A4G4</title>
  <g stroke="darkgreen" stroke-width="3" fill="none">
   <use x="300" y="0" width="100" height="100" xlink:href="#K(4)" />
  </g>
  <g fill="white">
   <use x="300" y="0" width="100" height="100" xlink:href="#C(4)" />
  </g>
  <g fill="yellow">
   <use x="300" y="0" width="100" height="100" xlink:href="#A8" />
  </g>
  <g fill="orange">
   <use x="300" y="0" width="100" height="100" xlink:href="#G4" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K5C5A5G1</title>
  <g stroke="darkgreen" stroke-width="3" fill="none">
   <use x="0" y="150" width="100" height="100" xlink:href="#K5" />
  </g>
  <g fill="white">
   <use x="0" y="150" width="100" height="100" xlink:href="#C5" />
  </g>
  <g fill="yellow">
   <use x="0" y="150" width="100" height="100" xlink:href="#A5" />
  </g>
  <g fill="orange">
   <use x="0" y="150" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">C5A10G1</title>
  <g fill="white">
   <use x="100" y="150" width="100" height="100" xlink:href="#C5" />
  </g>
  <g fill="yellow">
   <use x="100" y="150" width="100" height="100" xlink:href="#A10" />
  </g>
  <g fill="orange">
   <use x="100" y="150" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K(5)C(5)A10G1</title>
  <g stroke="green" stroke-width="3" fill="none">
   <use x="200" y="150" width="100" height="100" xlink:href="#K(5)" />
  </g>
  <g fill="white">
   <use x="200" y="150" width="100" height="100" xlink:href="#C(5)" />
  </g>
  <g fill="yellow">
   <use x="200" y="150" width="100" height="100" xlink:href="#A10" />
  </g>
  <g fill="orange">
   <use x="200" y="150" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
 <!-- modeled on hibiscus chinensis, tiliaceus -->
  <title role="tooltip">K5C5A&#x221E;G5</title>
  <g stroke="green" stroke-width="3" fill="none">
   <use x="350" y="150" width="100" height="100" xlink:href="#K5" />
  </g>
  <g fill="white">
   <use x="350" y="150" width="100" height="100" xlink:href="#C5" />
  </g>
  <g fill="yellow">
   <use x="350" y="150" width="100" height="100" xlink:href="#A20" />
  </g>
  <g fill="orange">
   <use x="350" y="150" width="100" height="100" xlink:href="#G5" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K6C6A6G1</title>
  <g stroke="green" stroke-width="3" fill="none">
   <use x="0" y="300" width="100" height="100" xlink:href="#K6" />
  </g>
  <g fill="white">
   <use x="0" y="300" width="100" height="100" xlink:href="#C6" />
  </g>
  <g fill="yellow">
   <use x="0" y="300" width="100" height="100" xlink:href="#A6" />
  </g>
  <g fill="orange">
   <use x="0" y="300" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">T6A6G3</title>
  <g fill="url(#tepal)">
   <use x="100" y="300" width="100" height="100" xlink:href="#C6" />
  </g>
  <g fill="yellow">
   <use x="100" y="300" width="100" height="100" xlink:href="#A6" />
  </g>
  <g fill="orange">
   <use x="100" y="300" width="100" height="100" xlink:href="#G3" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K3C3A3G1</title>
  <g stroke="green" stroke-width="3" fill="none">
   <use x="0" y="450" width="100" height="100" xlink:href="#K3" />
  </g>
  <g fill="white">
   <use x="0" y="450" width="100" height="100" xlink:href="#C3" />
  </g>
  <g fill="yellow">
   <use x="0" y="450" width="100" height="100" xlink:href="#A3" />
  </g>
  <g fill="orange">
   <use x="0" y="450" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <g stroke="black" stroke-width="1" fill="none">
  <title role="tooltip">K3C3(A1G1)</title>
  <!-- Orchidiaceae: colored sepals -->
  <g stroke="darkorchid" stroke-width="3" fill="none">
   <use x="100" y="450" width="100" height="100" xlink:href="#K3" />
  </g>
  <g fill="white">
   <use x="100" y="450" width="100" height="100" xlink:href="#C3" />
  </g>
  <g stroke-width="2" fill="none">
   <use x="100" y="450" width="100" height="100" xlink:href="#(A1G1)" />
  </g>
  <g fill="yellow">
   <use x="100" y="450" width="100" height="100" xlink:href="#A1" />
  </g>
  <g fill="orange">
   <use x="100" y="450" width="100" height="100" xlink:href="#G1" />
  </g>
 </g>
 <!-- Text has to be outside of stroke-width -->
 <text x="15" y="115">K4C4A4G1</text>
 <text x="115" y="115">K0C4A4G2</text>
 <text x="215" y="115">K0C(4)A8G1</text>
 <text x="315" y="115">K(4)C(4)A8G4</text>
 <text x="15" y="265">K5C5A5G1</text>
 <text x="115" y="265">K0C5A10G1</text>
 <text x="215" y="265">K(5)C(5)A10G1</text>
 <text x="365" y="265">K5C5A&#x221E;G5</text>
 <text x="15" y="415">K6C6A6G1</text>
 <text x="115" y="415">T6A6G3</text>
 <text x="15" y="565">K3C3A3G1</text>
 <text x="115" y="565">K3C3(A1G1)</text>
</svg>