[Math] Finding the mid-point of a B-spline curve.

bezier-curvespline

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.

Best Answer

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.