<meta charset="UTF-8">
<canvas width="600" height="400"> </canvas>
<script>
var tela = document.querySelector("canvas");
var pincel = tela.getContext("2d");
var largura = 400;
var M = largura / 14;
var comprimento = 20*M;
pincel.fillStyle = "green";
pincel.fillRect(0,0,comprimento,largura);
pincel.fillStyle = "yellow";
pincel.beginPath();
pincel.moveTo(1.7*M, largura/2);
pincel.lineTo(comprimento/2, 1.7*M);
pincel.lineTo(comprimento-(1.7*M), largura/2);
pincel.lineTo(comprimento/2, largura-(1.7*M));
pincel.closePath();
pincel.fill();
pincel.fillStyle = "darkblue";
pincel.beginPath();
pincel.arc(comprimento/2, largura/2, 3.5*M, 0, 2*Math.PI, false);
pincel.closePath();
pincel.fill();
var xa = ((4297*M) - Math.sqrt(Math.pow(4297*M,2)-(4*212*19408*Math.pow(M,2))))/(2*212);
var ya = (((51*M)+(4*xa))/14);
var xb = ((4297*M) + Math.sqrt(Math.pow(4297*M,2)-(4*212*19408*Math.pow(M,2))))/(2*212);
var yb = (((51*M)+(4*xb))/14);
var xc = ((67680*M) - Math.sqrt(Math.pow(67680*M,2)-4*3392*299209*Math.pow(M,2)))/(2*3392);
var yc = ((16*xc)+(237*M))/56;
var xd = ((67680*M) + Math.sqrt(Math.pow(67680*M,2)-4*3392*299209*Math.pow(M,2)))/(2*3392);
var yd = ((16*xd)+(237*M))/56;
pincel.fillStyle = "white";
pincel.beginPath();
pincel.arc(comprimento/2, largura/2, 3.5*M, -Math.acos((xc-(comprimento/2))/(3.5*M)), -Math.acos((xa-(comprimento/2))/(3.5*M)), false);
pincel.arc((comprimento/2)-(2*M), largura, 8.5*M, -Math.acos((xa-((comprimento/2)-(2*M)))/(8.5*M)), -Math.acos((xb-((comprimento/2)-(2*M)))/(8.5*M)), false);
pincel.arc(comprimento/2, largura/2, 3.5*M, Math.acos((xb-(comprimento/2))/(3.5*M)), Math.acos((xd-(comprimento/2))/(3.5*M)), false);
pincel.arc((comprimento/2)-(2*M), largura, 8.0*M, -Math.acos((xd-((comprimento/2)-(2*M)))/(8.0*M)), -Math.acos((xc-((comprimento/2)-(2*M)))/(8.0*M)), true);
pincel.closePath();
pincel.fill();
</script>