Advertisement
kamasazi99

Untitled

Mar 17th, 2020
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. //parabola
  2. var X= 0-os_X;
  3. var Y= -((a*X*X)+(b*X)+c)+os_Y;
  4. context.beginPath();
  5. context.moveTo(0,Y);
  6. for(var i=1;i<canvas.width;i++){
  7. X=i-os_X;
  8. Y=-((a*X*X)+(b*X)+c)+os_Y;
  9. context.lineTo(i,Y);
  10. }
  11. context.strokeStyle = 'red';
  12. context.stroke();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement