[R] Interpolation using a piecewise linear function in higher dimensions

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu Jul 27 22:29:21 CEST 2000

On Thu, 27 Jul 2000, Kjetil Kjernsmo wrote:

> Dear all,
> I am just wondering if anybody has implemented a function that can give a
> piecewise linear interpolation in more than 2 dimensions? 
> I have looked at the akima package, but I would rather like a piecewise
> linear interpolation rather than a spline and while it did the job quite

piecewise linear interpolation is a spline of order one.

> satisfactory for 2 dimensions, I need to interpolate in at least three
> dimensions. If anybody has implemented something like that, and would like
> to share the code, I would be very happy. Or if someone knows a library
> that can do it that wouldn't be too hard to port (I have searched in
> netlib, found one function that was a bit hard to understand and seemed
> like overkill, and looked in the GSL documentation without finding
> anything appropriate).

For 3D this is widely used in mechanical CAD packages and `finite element'
code.  In kD, k > 1, one issue is what the pieces should be, and even a
regular grid poses problems of non-unique solutions.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list