JSFiddle - React, Tailwind, and code Playground

by jcubed111

HTML

<canvas id=main width=600 height=300></canvas>

JavaScript

var ctx = document.getElementById('main').getContext('2d');

ctx.beginPath();

let steps = 50;
for(let i=0; i<=steps; i++) {
	ctx.lineTo(
    	150 + 100 * Math.cos(i/steps*Math.PI*2),
    	150 + 100 * Math.sin(i/steps*Math.PI*2),
    );
}

ctx.stroke();

ctx.beginPath();
ctx.arc(450, 150, 100, 0, Math.PI*2);
ctx.stroke();