Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //parabola
- var X= 0-os_X;
- var Y= -((a*X*X)+(b*X)+c)+os_Y;
- context.beginPath();
- context.moveTo(0,Y);
- for(var i=1;i<canvas.width;i++){
- X=i-os_X;
- Y=-((a*X*X)+(b*X)+c)+os_Y;
- context.lineTo(i,Y);
- }
- context.strokeStyle = 'red';
- context.stroke();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement