Solution (source code)

= Solution

A <tensor-product surface basis> is formed from two independent univariate basis families $\phi_i(u)$ and $\psi_j(v)$ on separate parameter intervals. Given a rectangular <control net> $p_{ij}$, its <parametric surface> is
$$
\boxed{S(u,v)=\sum_i\sum_jp_{ij}\phi_i(u)\psi_j(v).}
$$
The parameters and indices vary independently over a product domain. The representation can be evaluated first in either parameter, giving a convenient computational advantage. Assume a finite basis, or locally finite <spline> bases, so differentiation and summation below are justified locally.

For positivity, if each factor basis is nonnegative, then $\phi_i(u)\psi_j(v)\ge0$. If both factors are strictly positive at a point, their product is strictly positive there. Nonnegative weights are the usual geometric meaning of positivity; zero boundary weights are allowed. With <partition of unity>, this gives the local <convex hull> enclosure of the active <control points>.

For continuity, suppose the first family is $C^r$ and the second $C^s$, including matching derivatives across their respective <spline knots>. On every polynomial piece, and by matching at the knot lines,
$$
\partial_u^p\partial_v^qS(u,v)
=\sum_{i,j}p_{ij}\phi_i^{(p)}(u)\psi_j^{(q)}(v),
\qquad 0\le p\le r,\quad0\le q\le s.
$$
Every factor on the right is continuous in its own variable, so its product is jointly continuous. Thus \b[all these mixed derivatives are continuous], in particular the surface is jointly $C^{\min(r,s)}$. The separate coordinate smoothness can be better: $r$ orders in $u$ and $s$ in $v$. For piecewise polynomials of degrees $d_u,d_v$, an interior knot of multiplicity $k$ in the first factor normally gives $C^{d_u-k}$ matching in $u$, inherited along that knot line; similarly for $v$. The statement is an inherited lower bound. Special <control points> can cancel derivative jumps, so a particular surface may be smoother than a generic member of its basis.

For summation to unity, independent summation factors exactly:
$$
\boxed{\sum_{i,j}\phi_i(u)\psi_j(v)
=\left(\sum_i\phi_i(u)\right)\left(\sum_j\psi_j(v)\right)=1.}
$$
This also explains why translations of all <control points> translate the surface by the same vector, as in <affine equivariance of a geometric basis>. These three arguments establish <tensor-product inheritance of geometric basis properties> directly from the factor identities.

A <triangular Bézier patch> is a non-tensor-product example. For barycentric parameters $u,v,w\ge0$ with $u+v+w=1$, a quadratic patch is
$$
S=u^2p_{200}+v^2p_{020}+w^2p_{002}
+2uvp_{110}+2uwp_{101}+2vwp_{011}.
$$
The six basis functions have total degree two and sum to $(u+v+w)^2=1$. Their index constraint and triangular parameter domain do not arise from two independently indexed univariate factors on a rectangle. An individual triangular polynomial could be embedded in another larger representation, but this triangular basis and <control net> are not a tensor-product surface definition.