Example of a Bezier two-time curve: http://tinyurl.com/html5quadratic
Example of a Bezier 3-time curve: Http://tinyurl.com/html5bezier
<! DOCTYPE html> Window.onload=function () {
var context = document.getElementById (' canvas '). GetContext (' 2d ')
Example of a Bezier two-time curve: http://tinyurl.com/html5quadratic
canvas.height=800;
canvas.width=800;
context.strokestyle= ' Red ';
context.linewidth=3;
Context.beginpath ();
Context.moveto (100,100);
Context.quadraticcurveto (300,250,500,100);
Context.stroke ();
Context.moveto (100,100);
Context.quadraticcurveto (300,450,500,100);
Context.stroke ();
Context.closepath ();
Example of a Bezier 3-time curve: Http://tinyurl.com/html5bezier
Context.linewidth = 6;
Context.strokestyle = "#333";
Context.beginpath ();
Context.moveto (400, 276);
Context.beziercurveto (180, 60, 246, 343, 71, 236);
Context.stroke ();
}
</script>
</body>
Bezier two-and three-time curves