Ben's Sandbox
  • Projects
  • Tags

Finding the Bezier Control Point from Points on the Curve


View Blog   View Source  
This demo shows how to find the control point to pass to the HTML5 Canvas quadraticCurveTo() function when you know the three points you want the line to pass through. Move the green points around to see how it affects the red control point and curve rendering. An alternative solution is to use bseth99/pathjs to perform a path interpolation between the points. That rendering is shown on the right and closely approximates the Canvas API function.

canvas.quadraticCurveTo
path.bezier

© Ben Olson 2012 with help from Jekyll Bootstrap and Twitter Bootstrap