<canvas id="myCanvas" width="500" height="300"></canvas>
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');


ctx.beginPath();
ctx.moveTo(50, 50); // Начальная точка
ctx.bezierCurveTo(100, 100, 150, 150, 200, 50); // Кубическая кривая Безье
ctx.stroke(); // Рисуем контур пути

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.