JSFiddle - React, Tailwind, and code Playground
by Roydon DSouza
HTML
<canvas width="1280" height="795" id="canvas"></canvas>
JavaScript
$(document).ready(function(){
var poly=[245,190,184,337,342,603,586,603,586,704,1122,704,1192,589,995,96,398,96,398,190 ];
var canvas=document.getElementById("canvas")
var ctx = canvas.getContext('2d');
ctx.strokeStyle = '#333';
ctx.beginPath();
ctx.moveTo(poly[0], poly[1]);
for( item=2 ; item < poly.length-1 ; item+=2 ){ctx.lineTo( poly[item] , poly[item+1] )}
ctx.closePath();
ctx.stroke();
});