JSFiddle - React, Tailwind, and code Playground
by tmcw
HTML
<canvas id='c'></canvas>
JavaScript
var c = document.getElementById('c');
c.width = 200;
c.height = 200;
var ctx = c.getContext('2d');
ctx.translate(100, 100);
ctx.beginPath();
ctx.lineTo(Math.cos(0) * 90, Math.sin(0) * 90);
ctx.lineTo(
Math.cos(Math.PI * 1 / 2) * 90,
Math.sin(Math.PI * 1 / 2) * 90);
ctx.lineTo(
Math.cos(Math.PI) * 90,
Math.sin(Math.PI) * 90);
ctx.lineTo(
Math.cos(Math.PI * 3 / 2) * 90,
Math.sin(Math.PI * 3 / 2) * 90);
ctx.lineTo(
Math.cos(Math.PI * 4 / 2) * 90,
Math.sin(Math.PI * 4 / 2) * 90);
ctx.lineTo(Math.cos(0) * 90, Math.sin(0) * 90);
ctx.stroke();