Tuesday, September 11, 2012

An attempt at Hearts?

So my "attempt" at hearts was a massve fail.
The quadratic curve one somewhat resemebles a heart, but after hours of attempts, I could not get the right side bezier-curve-style of my heart to on-knot itself.

Anywho, here's my heart so everyone can laugh at me

Bezier Curve:


context.strokeStyle = 'rgb(250,40,50)';
context.stroke();

context.beginPath();
context.moveTo(400,300)
context.bezierCurveTo(10,150, 10, 400, 400, 600);
context.stroke();

context.beginPath();
context.moveTo(400,300)
context.bezierCurveTo(800, 750 , 600 , 200 ,400, 600);
context.stroke();

The end result:

Quadratic Cruve:
context.beginPath();
context.moveTo(400,350);
context.quadraticCurveTo(10, 150, 400, 600);
context.strokeStyle = 'rgb(250,40,50)';
context.stroke();

context.beginPath();
context.moveTo(400,350)
context.quadraticCurveTo(790,50,400,600);
context.stroke();

The end result:

No comments:

Post a Comment