# Returns polynomial coefficients of Wiggins' basis function at level #i of # type 'itype': # i = 0 for the surface, etc. # itype=0 for 'derivative' function, and 1 for 'value' function. # If iderivative = 1, a derivative of the basis function is returned function [ above below ] = bfun( i, itype, iderivative ) d = dz(i+1); if ( itype == 0 ) # derivative if ( i > 0 ) above = [ 1 -1 0 0 ]*dz(i); else above = zeros(1,4); endif below = [ 1 -2 1 0 ]*d; else # value above = [ -2 3 0 0 ]; below = [ 2 -3 0 1 ]; endif if ( iderivative > 0 ) if ( i > 0 ) above = polyderiv(above)/dz(i); endif below = polyderiv(below)/d; endif endfunction