Bezier and B-spline Surfaces

Copyright (c) Susan Laflin. August 1999.

Bezier Surfaces.

Like the Bezier curves, the Bezier surfaces use the Bernstein polynomials as blending functions. We now have the control points being points on a design net, which is again a rectangular mesh spread over area of interest. The x and y coordinates of the control points are fixed and the shape of the surface varies as the control points are moved up or down. The figure below shows a Bezier surface with an associated control net of 3 points by 4 points. The values of the points are stored in an array B(4,3) and the blending functions are obtained from the equations of the Bezier curves. Bezier Surface and Control Net

```Thus, the three point Bezier curve is given by :
B(v) = (1-v)2B(I,1) + 2v(1-v)B(I,2) + v2B(I,3)
or
B(v) = b(20)(v) B(I,1) + b(21)(v) B(I,2) + b(22)(v) B(I,3)

and the 4-point Bezier curve needed in the u-direction has the form:

B(u) = (1-u)3B(1,J) + 3u(1-u)2B(2,J) + 3u2(1-u)B(3,J) + u3B(4,J)
or B(u) = b{30}(u)B(1,J) + b{31}(u) B(2,J) + b{32}(u) B(3,J) + b{33}(u) B(4,J)

```
These must be combined together in the matrix equation to calculate any point on the surface. The equation of a point on the Bezier surface is given by:

```r(u,v) = [b{30}(u)  b{31}(u)  b{32}(u)  b{33}(u)] B(1,1)B(1,2)	B(1,3) b{20}(v)
B(2,1)	B(2,2)	B(2,3) b{21}(v)
B(3,1)	B(3,2)	B(3,3) b{22}(v)
B(4,1)	B(4,2)	B(4,3)

```
To obtain the equation of one of the edge-curves, e.g. when u=0, we must substitute in the matrix equation:
```r(0,v) = 	B(1,1)	B(1,2)	B(1,3)  	(1-v)(1-v)
2v(1-v)
v*v
```

which becomes r(0,v) = (1-v)(1-v)B(1,1) + 2v(1-v)B(1,2) + v*vB(1,3) and similarly for the other edge curves. This form of the Bezier curve assumes a rectangular mesh with m+1 points in the one direction and n+1 points in the other. It requires the edge curves defining the patches to be coplanar and does not provide local control within a patch. A surface may be made up of several Bezier patches and, as for the curves, if we require the tangents to be continuous across the joins, then the sets of control points across the curves must be not only coplanar but also collinear.

The Proceedings of the Royal Society, Series A, for February 1971 contained the papers from a meeting on `Computer Aids in Mechanical Engineering Design'. This included a paper by Bezier on his `Unisurf' package used by the Renault car company to design their car bodies. Although it is not obvious from the paper, this was the earliest use of Bezier surfaces, which were invented for this package. Another paper described the `Multiobject' package by Armit, which used the same equations. The paper by Sabin, discribing the `Numerical Master Geometry' in use at the British Aircraft Corporation, shows the extensive use of Bicubic Surface tiles in their work because they are particularly concerned to get the extra smoothness of functions which can only be guaranteed by bicubic or higher-order patches.

This volume of the proceedings gives an interesting insight into the way that these packages were viewed at the time. In some respects, things have changed little since then. They describe a situation where many users had their own two or three C.A.D. programs to use, and there was very little guidance on the best choice for a newcomer to the field. Nowadays, there is a bewildering variety of large and comprehensive packages for C.A.D. but the newcomer still has little guidance amongst an even larger choice of software. Unfortunately the cost of a mistake is very much larger, since these packages are now big business.

B-Spline Surfaces.

The use of B-Spline surfaces is necessary in some CAD applications to give local control of the shape. The equation of this surface is given by

Q(u,v) = sum{i=0 to m} sum{j=0 to n} B(i+1,j+1) N{i,k}(u) M{j,l}(v)

In the x-direction, x(i) are the elements of the k-knot vector and

```
N{i,1}(u) 	= 1   if  x(i) <= u <= x(i+1)
= 0   otherwise
and

N{i.k}(u) =	(u-x(i)) * N{i,k-1}(u)   +	(x(i+k)-u) * N{i+1,k-1}(u)
---------------------		-------------------------
(x(i+k-1)-x(i)) 		     (x(i+k)-x(i+1))

```

In the y-direction, the y(j) are elements of the l-knot vector and we have similar expressions for M{j,1}(v) and M{j,l}(v).

This simple version of the B-Spline expects a rectangular net and requires all polygons in the one-direction to have the same degree of multiplicity (i.e. to use one knot-vector for all lines across the net). We can obtain greater flexibility by relaxing these conditions, but at the expense of greater complexity. These curves are widely used in many CAD packages.