# Finding the mid-point of a B-spline curve.

As part of my computer graphics, we've learnt about Bezier and B-spline curves. I'm going over some questions in preparation for my exam and I've come across a past exam question.

The question is "A B spline has control points (0, 0), (1, 0), (1, 1) and (0, 1). Calculate the coordinates of the midpoint of this curve".

Now, I'm assuming its safe to assume that we don't know what the curve looks like since the control points can either interpolate or approximate the curve. Do I use De Casteljau's algorithm to find the mid-point of the curve? If not, could anyone please point me in the right direction in figuring it out?

Kindly appreciated.

• The question is incomplete. They don't tell you the degree of the curve, or its knot sequence. It could have degree 1, 2, or 3. Its knot sequence could be almost anything. If you assume that the curve is cubic (degree = 3) and its knot sequence is $(0,0,0,0,1,1,1,1)$, then it is indeed a cubic Bezier curve, and David Cary's solution is correct. If you assume degree = 1 and knot sequence $= (0,0, 1/3, 2/3, 1,1)$, then the mid-point is $(1, 0.5)$. – bubba Feb 14 '13 at 0:48
• @bubba, given the context, "B spline" without further qualification can safely be assumed to mean uniform non-rational B-spline. – Peter Taylor May 11 '13 at 7:52
• Really? Not in my business. We never use uniform splines. Maybe we could assume that the degree is cubic, too. But then the curve has only one segment, so calling it a "b-spline" is a bit odd. Anyway, way too much assuming for my tastes. – bubba May 11 '13 at 8:54

My understanding is that a B-spline can have any number of control points. In the special case where the B-spline has exactly 4 control points, it is the same as a cubic Bezier curve with those same 4 control points.

So yes, De Casteljau's algorithm on the given control points works great:

given  midpoint  midpoint  midpoint
(0, 0)
\
(1/2, 0)
/        \
(1, 0)          (3/4, 1/4)
\        /          \
(1, 1/2)            (3/4, 1/2)
/        \          /
(1, 1)          (3/4, 3/4)
\        /
(1/2, 1)
/
(0, 1)


So the given spline

• starts at (0,0) at t=0,
• goes through (3/4, 1/2) at t=1/2, and
• ends up at (0,1) at t=1.
• It's worth adding that "the mid-point" of a Bézier curve is ambiguous (the point $t=0.5$ or the point which splits the curve length equally), but that due to the symmetry of this particular case the two must coincide. – Peter Taylor May 11 '13 at 7:54