bmacintyre@watcgl.waterloo.edu (Blair MacIntyre) (05/29/89)
I'm trying to write the following routines, and I'm not sure that a) the way I want to do it will work b) the way I want to do it is the best Lets say I have specified the following: - 2 basis matrices (ubasis, vbasis) - the number of curves in both directions (ucruves, vcurves) - the number of segments per curve (uprecision, vprecision) Now, I want to write the routines patch( x, y, z ) and rpatch( x, y, z, w ) where x,y,z,w are 4x4 arrays representing the control points for the patch. ( one aside: is patch( x, y, z ) the same as rpatch( x, y, z, 1)? ) I have a routine to draw a cubic using forward differencing, based on 4 control points, so that is not a problem. I was thinking of trying to draw the patch this way: 2 level fwd diff: level 1 ( to be done once down the columns of the control matrices and once across the rows, to get the lines in both directions. The second time through, change u's to v's and vice-versa ): use the 4 sets of 4 x's ( same for y,z,w ) to create a fwd diff to traverse interpolate these control points using the ubasis in ucurves steps. Each iteration generates 4 more control points. level 2 ( the curves ) The sets of 4 control points are then used to create a new fwd diff relation to draw a curve in the v direction, using vbasis and vprecision steps. The reason I don't like this is the huge number of fwd differences that must be set up. Is there a better way to do this, if indeed it does work? Blair -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-///-= = Blair MacIntyre, bmacintyre@watcgl.{waterloo.edu, UWaterloo.ca} \\\/// = = now appearing at the Computer Graphics Lab, U of Waterloo! \XX/ = = "Don't be mean ... remember, no matter where you go, there you are." BBanzai=