How to Find the Control Point for a Point on a Quadratic Bézier Curve
At a glance
- 1. Write the curve
Use the quadratic Bézier formula with endpoints, control point, and parameter t.
- 2. Solve for the control point
If t is known and is not an endpoint, rearrange the curve equation to isolate the control point.
- 3. Check uniqueness
Without t or another constraint, one point and two endpoints do not determine a unique control point.
- 4. Compare distances
For an already specified curve, calculate distances from the given point to each control point and choose the smallest.
A quadratic Bézier curve is determined by two endpoints, one control point, and a parameter between 0 and 1. If you know the endpoints and the parameter value at which the curve passes through a point , you can solve directly for the control point. If you know only the endpoints and , there is usually not enough information to determine one unique control point.
There is a second possible meaning: if the curve and all three control points are already known, you may simply want to know which control point is closest to . That is a distance comparison, not an inverse-curve calculation.
The quadratic Bézier formula
Let and be the endpoints, and let be the control point. The curve is
The points may be coordinates in the plane or in three-dimensional space. The formula works component by component, so the same rearrangement applies in either case.
If the point is on the curve at a known parameter , set and isolate :
This formula applies when . At , the curve is at ; at , it is at . The control point has zero weight at both endpoints, so an endpoint observation cannot determine .
Worked example
Suppose the endpoints are and , and the curve passes through at . Substituting into the formula gives
So the required control point is . Checking it in the original curve equation:
which confirms the result.
What if the parameter is unknown?
Knowing , , and does not generally fix , because the parameter is also unknown. For any chosen strictly between 0 and 1, the rearranged formula gives a control point that makes the curve pass through at that parameter. Those different choices can produce different control points.
For instance, keep , , and , but choose instead of . The formula gives , which is different from but still makes the curve pass through at the selected parameter. You need enough additional information to ensure a unique solution—for example, the parameter itself. A specified line for or another point on the curve may provide useful additional constraints, but need not guarantee uniqueness on its own.
If the full curve is known, meaning all three control points are specified, you can instead find the parameter for which . In coordinates this means solving the component equations for a common value of in . A point may have no such parameter if it is not on the curve. Once you have the parameter, it does not change which of the already specified control points is nearest to .
Finding the nearest existing control point
For a known curve, calculate the Euclidean distance from to each control point. In two dimensions, for and a control point ,
In the worked example, is one unit from . Each endpoint is units away, so is the nearest control point. In computations, you can compare squared distances instead; taking square roots is unnecessary because squaring preserves the ordering of nonnegative distances.
Common mistakes
- Leaving out the parameter. A point on the curve is not enough to recover the control point unless the parameter or another constraint is known.
- Using the formula at an endpoint. The denominator is zero at and , and the control point cannot be inferred from those endpoint values.
- Assuming a control point lies on the curve. A Bézier curve is pulled toward its control point, but it generally does not pass through it.
- Confusing “the control point” with “the nearest control point.” The first asks for an unknown that generates the curve; the second compares distances to control points that are already known.
References
- Curves and Surfaces for Computer-Aided Geometric Design: A Practical Guide, Gerald Farin
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.