Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!zephyr.ens.tek.com!orca!eve.WV.TEK.COM!steveb From: steveb@eve.WV.TEK.COM Newsgroups: comp.graphics Subject: Re: 3d Surface Patches Message-ID: <5021@orca.WV.TEK.COM> Date: 18 Oct 89 17:31:30 GMT Sender: nobody@orca.WV.TEK.COM Reply-To: steveb@eve.WV.TEK.COM () Organization: Tektronix, Inc., Wilsonville, OR Lines: 81 Here's a little bit of help on the subject of surfaces patches. I will try to stay simple which means I'll no doubt be incomplete. 1. Rational 'vs' Non-Rational Just think back to college math classes. A rational polynomial equation is an equation which consists of the division of 1 polynomial by another. This is as opposed to an integral (non-rational) equation. Naturally, it follows that a rational surface is the same thing. Principally, there are 2 ways we can represent a b-spline in power basis (I'll get to that); they are as a polynomial (actually as the coefficients of a polynomial) or as the coef- ficents of 2 polynomials, one divided by the other. The latter case allows the equation extensive flexability in terms of the types of surface it can represent (ie not only can we represent free form surfaces but we can also represent algebraic surfaces). In addition we get some nice added properties. While a non-rational b-spline (for example) is order-2 diffenentiable, variation diminishing (such that a straight line intersects the control poly at least as many times as it intersects the curve), and invariant under a linear transformation; a RATIONAL b-spline also gives us added local control and the wonderfully useful property of PROJECTIVE INVARIANCE (in other words it is not only invariant under a parallel projective transformation it is also invarient under a perspective transformation. 2. Power and Basis I think you have some confusion about terms. You use the terms "Power Matrix' and "Basis Matrix". Now, somebody correct me if I'm misunderstanding what you are asking, but I think you are addressing the general concept of conversion from Power basis to any other basis using matrix multiplication. That being the case I guess we should start with a definition of the term BASIS. If you look at the polynomial: P^n(t) = a0 + (a1)(t) + (a2)(t^2) + ... + (an)(t^n) and exclude the coefficients: a0, a1, a2, ..., an you are left with the MONOMIALS: 1, t, t^2, ..., t^n Since the monomials are n+1 linearly INDEPENDENT functions they constitute a basis. Take a look at a linear algebra book or de Boor (1978) if you don't get that. Any way, these functions are called BASIS FUNCTIONS. These functions are multiplied by the control points for the curve you are trying to define to obtain the actual spline. When I use splines as examples all properties and concepts apply, also, to patches; It's just too much of a pain to write it all out in both dimensions (BTW). To define a b-spline from m control vertices, you will have m basis functions (not too hard to see, huh ?). This gets into all sorts of stuff like end point interpolation which I won't get into, since you say you understand it. Now, on to (my perception of) your question. As it happens, we can render a curve in many different ways. One of them is to take a polynomial and evaluate it (which in a non-trivial case requires a hell of alot of multipli- cation). Another is to use forward differencing (See the Shantz and Chang papers from the last 3 siggraphs). As an example, lets say we want to evaluate a bezier patch using forward differencing. We need to convert from Bezier basis to Forward Difference basis. That can be accomplished by matrix multiplication. That, I think is the answer you want. 3. What are knots As I mentioned above, for a b-spline, you will always have 1 basis function for each control point. Each time a new basis function begins you are, literally, altering the polynomial representation. As a result a curve is really repre- sented by a set of polynomials. The places (in parameter space) where these various polynomials are tied together are called KNOTS. I hope this helps, a bit, Steve ------------------------------------------------------------------------------- FROM: STEVEN C. BILOW -- Software Engineer, Tektronix EMAIL: steveb@orca.WV.TEK.COM PHONE: (503) 685-2463 USMAIL: P.O. Box 1000 61-028, Wilsonville, OR 97070-1000