Advertisement
mate2code

full octahedral group - SVG store

Aug 11th, 2019
572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 12.19 KB | None | 0 0
  1. svg_string_store = """<?xml version="1.0" encoding="UTF-8"?>
  2. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="860" height="1282" viewBox="-30 -30 860 1282">
  3.  
  4.    <defs>
  5.  
  6.        <marker id="backward" markerWidth="4" markerHeight="3" refX="3.9" refY="1.5" orient="auto">
  7.            <polygon points="4 0, 0 1.5, 4 3" style="fill: red;"/>
  8.        </marker>
  9.        <marker id="foreward" markerWidth="4" markerHeight="3" refX=".1" refY="1.5" orient="auto">
  10.            <polygon points="0 0, 4 1.5, 0 3" style="fill: red;"/>
  11.        </marker>
  12.  
  13.        <path id="A" d="m 37.633197,882.03033 0,0.64698 -5.3833,0 0,-0.64698 1.855468,-0.32959 5.578614,-15.52734 2.319335,0 5.798339,15.52734 2.075196,0.32959 0,0.64698 -6.921387,0 0,-0.64698 2.197266,-0.32959 -1.623536,-4.72412 -6.445311,0 -1.647949,4.72412 2.197265,0.32959 z m 2.624512,-14.09912 -2.807617,7.94678 5.700682,0 -2.893065,-7.94678 z" />
  14.        <path id="B" d="m 44.67055,870.1712 q 0,-0.72021 -0.219726,-1.25732 -0.20752,-0.53711 -0.683594,-0.89112 -0.476074,-0.36621 -1.23291,-0.53711 -0.756836,-0.1831 -1.855469,-0.1831 l -2.526856,0 0,6.18896 2.67334,0 q 1.135255,0 1.879883,-0.23193 0.74463,-0.24414 1.171875,-0.67139 0.439453,-0.43945 0.610352,-1.0498 0.183105,-0.61035 0.183105,-1.36719 z m 1.23291,7.73926 q 0,-0.85449 -0.280761,-1.47705 -0.268555,-0.62256 -0.854493,-1.02539 -0.57373,-0.41504 -1.489257,-0.61035 -0.915528,-0.20752 -2.197266,-0.20752 l -2.929688,0 0,6.88476 q 0.561524,0.0244 1.171875,0.0366 0.524903,0.0244 1.159668,0.0366 0.634766,0 1.257325,0 1.147461,0 1.940918,-0.25634 0.793457,-0.25635 1.281738,-0.72022 0.500488,-0.47607 0.720215,-1.14746 0.219726,-0.67139 0.219726,-1.51367 z m -12.207031,4.66309 0,-0.64698 2.099609,-0.32959 0,-14.42871 -2.099609,-0.31738 0,-0.64697 7.48291,0 q 1.721192,0 2.868653,0.26855 1.14746,0.25635 1.843261,0.75684 0.695801,0.50049 0.98877,1.2207 0.292969,0.70801 0.292969,1.59912 0,0.76904 -0.256348,1.40381 -0.244141,0.63477 -0.695801,1.12305 -0.439453,0.47607 -1.062012,0.80566 -0.622558,0.31738 -1.35498,0.47608 1.062012,0.10986 1.916504,0.42724 0.866699,0.31738 1.464844,0.83008 0.598144,0.50049 0.915527,1.19629 0.32959,0.6958 0.32959,1.55029 0,1.06201 -0.366211,1.95313 -0.354004,0.8789 -1.123047,1.51367 -0.769043,0.62256 -1.977539,0.97656 -1.208496,0.3418 -2.917481,0.3418 -1.367187,0 -2.722168,-0.0366 -1.35498,-0.0366 -2.502441,-0.0366 l -3.125,0 z" />
  15.        <path id="C" d="m 42.351215,882.82379 q -2.001953,0 -3.576659,-0.56153 -1.5625,-0.56152 -2.648927,-1.62353 -1.074219,-1.062 -1.635742,-2.58789 -0.561523,-1.53809 -0.561523,-3.4668 0,-2.19727 0.561523,-3.80859 0.57373,-1.61132 1.647949,-2.66114 1.086426,-1.06201 2.661133,-1.5747 1.574707,-0.5127 3.601074,-0.5127 0.842285,0 1.586914,0.061 0.744629,0.0488 1.416016,0.13427 0.683594,0.0855 1.293945,0.19533 0.610352,0.10986 1.184082,0.23193 l 0.07324,3.57665 -0.805664,0 -0.366211,-2.12401 q -0.854492,-0.52491 -1.989746,-0.80567 -1.123046,-0.29297 -2.294921,-0.29297 -1.428223,0 -2.55127,0.39063 -1.11084,0.39062 -1.879883,1.28174 -0.769043,0.8789 -1.184082,2.33154 -0.402832,1.44043 -0.402832,3.55225 0,1.85546 0.402832,3.23486 0.402832,1.36719 1.159668,2.28271 0.756836,0.90332 1.843262,1.35497 1.098633,0.45166 2.490234,0.45166 0.756836,0 1.44043,-0.0976 0.695801,-0.0977 1.281738,-0.26856 0.598145,-0.17089 1.062012,-0.39062 0.476074,-0.23193 0.793457,-0.47608 l 0.45166,-2.4414 0.793457,0 -0.07324,3.84521 q -0.512695,0.14649 -1.171875,0.29297 -0.65918,0.13428 -1.403809,0.24414 -0.744629,0.10987 -1.5625,0.1709 -0.817871,0.061 -1.635742,0.061 z" />
  16.  
  17.    </defs>
  18.  
  19.    {rectangles}
  20.  
  21.    <!-- left formulas for the permutations -->
  22.    <g transform="translate(124.5, 1030) scale(24, 24)">
  23.        <rect x="0" y="0" width="3" height="8" fill="#{bottombeige}"/>
  24.        <rect x="0" y="1" width="3" height="2" fill="#{topbeige}"/>
  25.        <rect x="0" y="4" width="3" height="1" fill="#{topbeige}"/>
  26.        <rect x="0" y="7" width="3" height="1" fill="#{topbeige}"/>
  27.        <g stroke="#999" stroke-width="3">
  28.            <path stroke-dasharray=".03, .97" d="M1.5,0v9"/>
  29.            <path stroke-dasharray=".1, 3.9" d="M1.5,-.05v9"/>
  30.        </g>
  31.        <rect x="0" y="0" width="3" height="8" stroke="#999" stroke-width=".1" fill="none"/>
  32.    </g>
  33.    <g transform="translate(51, 1008)">
  34.        {pf}
  35.    </g>
  36.  
  37.  
  38.    <!-- small indices over the left matrix of permutations -->
  39.    <g font-size="8px" transform="translate(222.5, 1018)">
  40.        <text x="0" y="0">0</text><text x="15" y="0">1</text><text x="30" y="0">2</text><text x="45" y="0">3</text><text x="67" y="0">4</text><text x="82" y="0">5</text><text x="97" y="0">6</text><text x="112" y="0">7</text>
  41.    </g>
  42.  
  43.    <!-- left matrix of permutations -->
  44.    <g style="text-anchor: middle;" font-family="sans-serif" font-size="16px" transform="translate(225, 1048)">
  45.        {pm}
  46.    </g>
  47.  
  48.    <!-- right formulas for the inverse permutations -->
  49.    <g transform="translate(402, 1030) scale(24, 24)">
  50.        <rect x="0" y="0" width="3" height="8" fill="#{bottombeige}"/>
  51.        <rect x="0" y="1" width="3" height="2" fill="#{topbeige}"/>
  52.        <rect x="0" y="4" width="3" height="1" fill="#{topbeige}"/>
  53.        <rect x="0" y="7" width="3" height="1" fill="#{topbeige}"/>
  54.        <g stroke="#999" stroke-width="3">
  55.            <path stroke-dasharray=".03, .97" d="M1.5,0v9"/>
  56.            <path stroke-dasharray=".1, 3.9" d="M1.5,-.05v9"/>
  57.        </g>
  58.        <rect x="0" y="0" width="3" height="8" stroke="#999" stroke-width=".1" fill="none"/>
  59.    </g>
  60.    <g transform="translate(328.5, 1008)">
  61.        {ipf}
  62.    </g>
  63.  
  64.    <!-- right matrix of inverse permutations -->
  65.    <g transform="translate(500, 1030) scale(24, 24)">
  66.        <path fill="#ddd" d="m0,0h8v8H0"/>
  67.        <path fill="#888" d="M1,0h2v1h-2M4,0h1v1h-1M7,0h1v1h-1M0,1h1v2h-1M3,1h1v2h-1M5,1h2v2h-2M1,3h2v1h-2M4,3h1v1h-1M7,3h1v1h-1M0,4h1v1h-1M3,4h1v1h-1M5,4h2v1h-2M1,5h2v2h-2M4,5h1v2h-1M7,5h1v2h-1M0,7h1v1h-1M3,7h1v1h-1M5,7h2v1h-2"/>
  68.        <rect x="0" y="0" width="8" height="8" stroke="black" stroke-width=".1" fill="none"/>
  69.        <g stroke="black" stroke-width="8">
  70.            <path stroke-dasharray=".03, .97" d="M0,4h9M4,0v9"/>
  71.            <path stroke-dasharray=".1, 3.9" d="M-.05,4h9M4,-.05v9"/>
  72.        </g>
  73.    </g>
  74.    <g style="text-anchor: middle;" font-family="sans-serif" font-size="16px" transform="translate(512, 1048)">
  75.        {ipm}
  76.    </g>
  77.  
  78. </svg>"""
  79.  
  80.  
  81. formula_svg_store = """<g>
  82.    <g transform="translate(68, -830)">
  83.        {letters}
  84.    </g>
  85.    {negators}
  86. </g>"""
  87.  
  88.  
  89. rectangle_svg_store = """<!-- RECTANGLE  -->
  90. <g transform="translate({rectx}, {recty})">
  91.  
  92.    <!-- background rectangle -->
  93.    <rect width="200" height="400" style="fill: #{beige}; stroke: #999; stroke-width:1.5;" />
  94.  
  95.  
  96.    <!-- binary matrix of the permutation -->
  97.    <g transform="translate(10, 126) scale(8, 8)">
  98.        <path fill="white" d="m0,0h8v3H0"/>
  99.        <path fill="red" d="{pmat}"/>
  100.        <rect x="0" y="0" width="8" height="3" stroke="black" stroke-width=".1" fill="none"/>
  101.        <path stroke-dasharray=".03, .97" d="M4,0v3" stroke="black" stroke-width="8"/>
  102.        <g stroke="black" stroke-width="3">
  103.            <path stroke-dasharray=".03, .97" d="M0,1.5h8"/>
  104.            <path stroke-dasharray=".1, 3.9" d="M-.05,1.5h8"/>
  105.        </g>
  106.    </g>
  107.    
  108.    <!-- binary matrix of the inverse permutation -->
  109.    <g transform="translate(10, 286) scale(8, 8)">
  110.        <path fill="white" d="m0,0h8v3H0"/>
  111.        <path fill="red" d="{ipmat}"/>
  112.        <rect x="0" y="0" width="8" height="3" stroke="black" stroke-width=".1" fill="none"/>
  113.        <path stroke-dasharray=".03, .97" d="M4,0v3" stroke="black" stroke-width="8"/>
  114.        <g stroke="black" stroke-width="3">
  115.            <path stroke-dasharray=".03, .97" d="M0,1.5h8"/>
  116.            <path stroke-dasharray=".1, 3.9" d="M-.05,1.5h8"/>
  117.        </g>
  118.    </g>
  119.  
  120.  
  121.    <!-- arrow cube -->
  122.    <g transform="translate(85, 63) scale(38, 38)">
  123.        <g style="stroke: black; stroke-width:.01px;">
  124.            <line x1="0" y1="3" x2="0" y2="1"/><line x1="0.6" y1="2.2" x2="0.6" y2="0.2"/><line x1="2" y1="3" x2="2" y2="1"/><line x1="2.6" y1="2.2" x2="2.6" y2="0.2"/><line x1="0" y1="3" x2="0.6" y2="2.2"/><line x1="0" y1="1" x2="0.6" y2="0.2"/><line x1="2" y1="3" x2="2.6" y2="2.2"/><line x1="2" y1="1" x2="2.6" y2="0.2"/><line x1="0" y1="3" x2="2" y2="3"/><line x1="0" y1="1" x2="2" y2="1"/><line x1="0.6" y1="2.2" x2="2.6" y2="2.2"/><line x1="0.6" y1="0.2" x2="2.6" y2="0.2"/>
  125.        </g>
  126.        <g style="stroke: red; stroke-width: .09px;">
  127.            {arrows}
  128.        </g>
  129.        <g style="fill: black;">
  130.            <circle cx="0" cy="3" r=".08"/><circle cx="0" cy="1" r=".08"/><circle cx="0.6" cy="2.2" r=".08"/><circle cx="0.6" cy="0.2" r=".08"/><circle cx="2" cy="3" r=".08"/><circle cx="2" cy="1" r=".08"/><circle cx="2.6" cy="2.2" r=".08"/><circle cx="2.6" cy="0.2" r=".08"/>
  131.        </g>
  132.    </g>
  133.  
  134.  
  135.    <!-- number cube -->
  136.    <g style="stroke:#000; stroke-width:.03px;" transform="translate(90, 238) scale(30, 30)">
  137.        <g>
  138.            <line x1="0" y1="3" x2="0" y2="1"/><line x1="1" y1="2" x2="1" y2="0"/><line x1="2" y1="3" x2="2" y2="1"/><line x1="3" y1="2" x2="3" y2="0"/><line x1="0" y1="3" x2="1" y2="2"/><line x1="0" y1="1" x2="1" y2="0"/><line x1="2" y1="3" x2="3" y2="2"/><line x1="2" y1="1" x2="3" y2="0"/><line x1="0" y1="3" x2="2" y2="3"/><line x1="0" y1="1" x2="2" y2="1"/><line x1="1" y1="2" x2="3" y2="2"/><line x1="1" y1="0" x2="3" y2="0"/>
  139.        </g>
  140.        <g style="fill: #{bottomgray}">
  141.            <circle cx="0" cy="3" r=".4"/><circle cx="1" cy="0" r=".4"/><circle cx="2" cy="1" r=".4"/><circle cx="3" cy="2" r=".4"/>
  142.        </g>
  143.        <g style="fill: #{topgray}">
  144.            <circle cx="0" cy="1" r=".4"/><circle cx="1" cy="2" r=".4"/><circle cx="2" cy="3" r=".4"/><circle cx="3" cy="0" r=".4"/>
  145.        </g>
  146.    </g>
  147.  
  148.  
  149.    <!-- text -->
  150.    <g style="text-anchor: middle;" font-family="sans-serif">
  151.  
  152.        <!-- small indices of the permutation -->
  153.        <g font-size="8px" transform="translate(71, 22)">
  154.            <text x="0" y="0">0</text><text x="15" y="0">1</text><text x="30" y="0">2</text><text x="45" y="0">3</text><text x="67" y="0">4</text><text x="82" y="0">5</text><text x="97" y="0">6</text><text x="112" y="0">7</text>
  155.        </g>
  156.  
  157.        <!-- horizontal permutation -->
  158.        <g font-size="16px" transform="translate(71, 42)">
  159.            {pvect}
  160.        </g>
  161.  
  162.        <!-- horizontal inverse permutation -->
  163.        <g transform="translate(4, 359) scale(24)">
  164.            <rect x="0" y="0" width="8" height="1" fill="#{bottomgray}"/>
  165.            <rect x="1" y="0" width="2" height="1" fill="#{topgray}"/>
  166.            <rect x="4" y="0" width="1" height="1" fill="#{topgray}"/>
  167.            <rect x="7" y="0" width="1" height="1" fill="#{topgray}"/>
  168.            <g stroke="black" stroke-width="1">
  169.                <path stroke-dasharray=".03, .97" d="M0,.5h9"/>
  170.                <path stroke-dasharray=".1, 3.9" d="M-.05,.5h9"/>
  171.            </g>
  172.            <rect x="0" y="0" width="8" height="1" stroke="black" stroke-width=".1" fill="none"/>
  173.        </g>
  174.        <g font-size="16px" transform="translate(16, 377)">
  175.            {ipvect}
  176.        </g>
  177.  
  178.        <!-- indices of the arrow cube -->
  179.        <g font-size="10px" transform="translate(91, 190)">
  180.            <text x="0" y="0">0</text>
  181.            <text x="0" y="-76">1</text>
  182.            <text x="76" y="0">4</text>
  183.            <text x="76" y="-76">5</text>
  184.            <g transform="translate(23.5, -31)">
  185.                <text x="0" y="0">2</text>
  186.                <text x="0" y="-76">3</text>
  187.                <text x="76" y="0">6</text>
  188.                <text x="76" y="-76">7</text>
  189.            </g>
  190.        </g>
  191.  
  192.        <!-- permuted cube numbers -->
  193.        <g font-size="16px" transform="translate(90, 244)">
  194.            {cubenums}
  195.        </g>
  196.  
  197.    </g>
  198.    
  199.    <!-- formula for the permutation -->
  200.    <g transform="translate(-39, 47) scale(.6)">
  201.        {pform}
  202.    </g>
  203.    
  204.    <!-- formula for the inverse permutation -->
  205.    <g transform="translate(-90, 191)">
  206.        {ipform}
  207.    </g>
  208.  
  209.    <!-- circle with permutation ID -->
  210.    <g transform="translate(34, 29)">
  211.        {idcircle}
  212.    </g>
  213.  
  214. </g>"""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement