Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find the coordinates of the implied point p2 using the control points p1 and p3. See here:

In the TTF spec they say:

Connected quadratic curves have first degree continuity and tangent continuity if each curve point is on the line connecting the two flanking control points.

And also the quadratic Bezier curves are defined as follows:

p(t) = (1-t)2p0 + 2t(1-t)p1 + t2p2

Using the fact that the the three points are collinear wouldn't be enough. I need one more equation so that I would be able to express p2 using the other two control points.

I know I'm missing here something rather simple but I can't make it out easily without help.


share|cite|improve this question
Is the curve connecting $p_0$, $p_2$, and $p_4$ a single curve, or is $p_2$ a break-point? – J. M. Apr 30 '11 at 10:20
It's more like piece-wise. Two quadratic curves, connected in p<sub>2</sub> and required to have first degree continuity and tangent continuity in this point. – Albus Dumbledore Apr 30 '11 at 10:22
I see, and all the points except $p_2$ are known? – J. M. Apr 30 '11 at 10:25
I'm looking at some old TTF code I wrote, and it seems I used the midpoint between $p_1$ and $p_3$ -- I'll try to reconstruct why I did it that way. This page:… also says to use the midpoint. – joriki Apr 30 '11 at 10:39
Thanks joriki. I seem to have found some code from Apache Batik that does exactly that. – Albus Dumbledore Apr 30 '11 at 11:03
up vote 2 down vote accepted

I believe the answer depends on what is meant by "first degree continuity and tangent continuity". For the two quadratic splines for $(p_0,p_1,p_2)$ and $(p_2,p_3,p_4)$, the derivatives of the curve with respect to the parameter $t$ at $p_2$ are $2(p_2-p_1)$ and $2(p_3-p_2)$, respectively. The tangents at this point will coincide if these two vectors have the same direction, which is the case iff $p_2$ lies on the line $p_1p_3$. This is presumably what is meant by "tangent continuity". This property is independent of the parametrization.

The magnitude of the derivative, by contrast, depends on the parametrization, and is thus in a sense arbitrary -- we could rescale the derivatives to make them coincide, by scaling the parameter $t$; the result would still be a quadratic function of $t$. I presume that "first degree continuity" refers to the parametrization-dependent constraint that the derivatives coincide not only in direction but also in magnitude (though that would render the formulation redundant, since "first degree continuity" would then imply "tangent continuity").

Interpreting the constraints in this way leads to $p_2-p_1=p_3-p_2$, so that $p_2$ must be chosen as the midpoint between $p_1$ and $p_3$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.