JSFiddle - React, Tailwind, and code Playground

by Sahil Kashyap

HTML

<svg id="letterSVG" width="600" height="600" viewBox="0 0 600 600"><path d="M40.72265625,83.203125 L40.72265625,200 L22.65625,200 L22.65625,83.203125 L22.822265625000007,78.77539062500001 L23.3203125,74.6328125 L24.150390625,70.775390625 L25.3125,67.203125 L26.806640625,63.916015625 L28.613281250000007,60.923828125000014 L30.712890625,58.236328125 L33.10546875,55.853515625 L35.791015625,53.775390625 L38.76953125,52.001953125 L42.01171875000001,50.542968750000014 L45.48828125,49.408203125 L49.19921875,48.59765625 L53.14453125,48.111328125 L57.32421875,47.94921875 L57.32421875,47.94921875 L58.576171875000014,47.964843750000014 L59.83203125,48.01171875 L61.091796875,48.08984375 L62.35546875,48.19921875 L63.623046875,48.33984375 L64.88671875000001,48.511718750000014 L66.138671875,48.71484375 L67.37890625,48.94921875 L68.607421875,49.21484375 L69.82421875,49.51171875 L69.82421875,49.51171875 L68.84765625,64.2578125 L68.00585937500001,64.07421875000001 L67.12109375,63.9140625 L66.193359375,63.77734375 L65.22265625,63.6640625 L64.208984375,63.57421875 L63.175781250000014,63.503906250000014 L62.146484375,63.44921875 L61.12109375,63.41015625 L60.099609375,63.38671875 L59.08203125,63.37890625 L59.08203125,63.37890625 L56.841796875000014,63.470703125000014 L54.73046875,63.74609375 L52.748046875,64.205078125 L50.89453125,64.84765625 L49.169921875,65.673828125 L47.589843750000014,66.67578125000001 L46.169921875,67.845703125 L44.91015625,69.18359375 L43.810546875,70.689453125 L42.87109375,72.36328125 L42.09765625000001,74.20312500000001 L41.49609375,76.20703125 L41.06640625,78.375 L40.80859375,80.70703125 L40.72265625,83.203125 L40.72265625,83.203125" fill="red" stroke-width="2"></path><path d="M5.95703125,94.3359375 L63.18359375,94.3359375 L63.18359375,108.203125 L5.95703125,108.203125 L5.95703125,94.3359375" fill="green" stroke-width="2"></path></svg>

<script>
    function computeMidpoint(x1, y1, x2, y2) {
        return [(x1 + x2) / 2, (y1 + y2) / 2];
    }

    function...