>>...

>>If your problem involves general meshes and you care only about a local

>>fit (without requiring a global one), then you can directly use the

>>code interp2 by effectively rotating the local mesh so that it is the

>>graph of a function, then apply the interpolation to it.

>Is that always possible?

The poster had a drawing of six triangles with a common vertex. I

inferred that he wanted an interpolation only for those triangles.

The object he drew did not appear to be closed. So yes, it is always

possible in that situation.

Quote:> How large a neighborhood is "local"?

The largest neighborhood such that the corresponding mesh is the graph of

a continuous piecewise linear function in some rotated coordinate system.

Quote:>Suppose I start with a simple mesh - a tetrahedron...will that work?

In the case of more general meshes, I finally finished my analysis and

posted a description and code for the extension of the Cendes-Wong

C1 quadratic interpolation algorithm. It is at my web site,

http://www.cs.unc.edu/~eberly, Numerical Utilities link, files

meshintr.{h,c,ps}. The sample driver applies the algorithm to the

tetrahedron with vertices (0,0,0), (1,0,0), (0,1,0), and (0,0,1).

The algorithm cannot handle arbitrary topology. There is a "regularity"

condition which must be satisfied by the vertices. I suspect that if

such vertices are encountered in applications, the mesh itself can be

modified locally about such vertices before applying the smoother.

There are a few more minor modifications that need to be made to the

code. Currently it works fine on closed meshes. For open meshes,

you need to add degenerate triangles to boundary edges. I'll trap

those edges in a later revision and automatically handle them. Second

thing is that if a vertex is not "regular", I don't trap the return

value of the routine that attempts to build a good normal. I need

to add this (and possibly provide the automated procedure for modifying

the mesh before continuing).

Comments about the algorithm are appreciated.

Dave Eberly