Bom dia, deixo aqui minha solução para o exercício:
<!DOCTYPE html>
<html lang="pt_BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
div {
width: 650px;
height: 450px;
display: flex;
align-items: center;
justify-content: center;
border: 3px double black;
}
canvas {
background-color: green;
scale: (0.1);
animation: .8s ease-in-out 0s 1 normal both running aparecimento
}
@keyframes aparecimento {
from {
transform: scale(0.1);
}
to {
transform: scale(1.0);
}
}
</style>
<title>Esquadro</title>
</head>
<body>
<div>
<canvas width="600" height="400"></canvas>
</div>
<script>
var tela = document.querySelector("canvas");
var pincel = tela.getContext("2d");
pincel.fillStyle = "yellow";
pincel.beginPath();
pincel.moveTo(300, 35);
pincel.lineTo(35, 200);
pincel.lineTo(300, 365);
pincel.lineTo(565, 200);
pincel.fill();
pincel.fillStyle = "blue";
pincel.beginPath();
pincel.arc(300, 200, 100, 0, 2 * 3.14);
pincel.fill();
</script>
</body>
</html>