SOURCE

console 命令行工具 X clear

                    
>
console
window.onload = function() {
  var canvas = document.querySelectorAll('#can')[0];
  canvas.width = 600;
  canvas.height = 600;
  const ctx = canvas.getContext('2d');
  var i = 0;
  ctx.beginPath();
  for (i = 0; i < 5; i++) {
    ctx.lineTo(Math.cos((18 + i * 72) / 180 * Math.PI) * 200 + 300, -Math.sin((18 + i * 72) / 180 * Math.PI) * 200 + 300);
    ctx.lineTo(Math.cos((54 + i * 72) / 180 * Math.PI) * 100 + 300, -Math.sin((54 + i * 72) / 180 * Math.PI) * 100 + 300);
  }
  ctx.closePath();
  ctx.lineWidth = '5';
  ctx.stroke();
}
<canvas id="can">
</canvas>