Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Bivariate Pchip
Posted:
Jan 18, 2013 4:46 PM


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kdccnj$kcc$1@newscl01ah.mathworks.com>... > "John D'Errico" <woodchips@rochester.rr.com> wrote in message <kdbk43$afl$1@newscl01ah.mathworks.com>... > > > > > pchip in 2d as a tensor product form has been shown > > NOT to be adequate for the general desired behavior. > > (It sometimes will produce an acceptable result, but in > > general, it is not adequate.) > > > > John, I must admit that I don't know what is the adequate definition of shape preserving interpolation in 2D. > > I just though at least the tensorial product would preserve at least the monotonic in any cut parallel to the two axis. Unless I'm mistaken, this also implies that the interpolation within a patch will necessary be bounded by the four corner data, thus never overshoot. > > May be these characteristics are not enough for OP, but it is better than nothing. No? > > Bruno
Yes, monotonicity is not a trivial thing to discuss when you move to more than one independent dimension.
It has been many years since I looked at it, but I recall the statement that a simple tensor product version of pchip is not adequate here. And I don't recall under which circumstances that interpolant fails.
The case of a linear tensor product interpolant (often known as a bilinear interplant, as used by photoshop) is a good one to study, as that may offer an idea. Consider the function f(x,y), where it is defined at the 4 corners of the unit square, and we will use bilinear interpolation over that domain.
f((0,0) = 1 f(0,1) = 0 f(1,0) = 0 f(1,1) = 1
Within the unit square, the tensor product linear interpolant reduces to
f(x,y) = 1  y  x + 2*x*y
which is clearly not linear. If we hold either x or y fixed, then of course it is again linear. But if we interpolate along some other path, perhaps a diagonal one from corner to corner, then the interpolant will be a quadratic polynomial with min or max at the center of the square. This is the classic problem with a tensor product interpolant when applied in three dimensions for color science problems, and it is why that method is avoided.
What I don't know (without some study) is if the tensor product pchip can still have nonmonotonic behavior parallel to an axis. (Perhaps tomorrow if I have some energy, as I think I know how to show if this can happen.)
John



