Re: Multidimensional Interpolation
- To: mathgroup at smc.vnet.net
- Subject: [mg12806] Re: Multidimensional Interpolation
- From: David Annetts <dannetts at laurel.ocs.mq.edu.au>
- Date: Fri, 12 Jun 1998 04:05:37 -0400
- Organization: CRCAMET/Macquarie University
- References: <6llb5r$da3@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Sean Sean Ross wrote: > While attempting to make some nice 3D plots of {x,y,z} data for a > friend, I ran into the strangest behavior I am hoping someone can shed > light on. First, some background: > > Interpolation[{{x1,y1,f1},{x2,y2,f2},...}] > > usually requires a square number of data points. If you give it 48 data > points, it will come back with an error message saying that the number > of points n in dimension 2 is not 7, since somehow Interpolation has > decided that there ought to be 49 points in the set. > > The data supplied to me by my friend had 441 data points, which is 21^2. > Interpolation came back and told me that the number of points in > dimension 2 was not 2 ???!, so it couldn't do anything. As a test, I > generated sample data with Table that also had 441 {x,y,z} data points > of the same format and Interpolation had no problem with the canned > data, but 8 sets of real data supplied by my friend gave the same > problem, where Interpolation thought that there should be 2^2 rather > than 21^2 data points in the set. > > Can anyone shed some light on how Interpolation determines its subsets > and what I might look for in the data set? Perhaps I might re-order > the data somehow if I understood what Interpolation was looking for. > If anyone is interested, I can send you the original data. I'm not sure about shedding light on the subject, but experience with Interpolation has taught me that the data shouldbe on a rectangular grid. Interpolation[{Random[], Random[], Random[]}] tends not to work. Triangulation, either via "ComputationalGeometry' or Wickham-Jones' "ExtendGraphics' Package does not suffer this restriction, and is probably what you're after. The ExtendGraphics package is probably the way to go because of its speed. I think this has been a failure of Interpolation from Day 1. Why can we not Interpolate randomly positioned data like other programs in Mathematica? -- ================================================================== David Annetts _____________ http://www.ocs.mq.edu.au/~dannetts/ |C R C A M E T| |-------------| |_____ | CRC for Australian Mineral |````` \ | Exploration Technologies |`````/$\ | Earth Sciences |````/$$$\____| Macquarie University, NSW 2109 |```/$$$/.....| AUSTRALIA |``/$$$/......| phone: +(1-61-2) 9850 9280, fax (1-61-2) 9850 8366 ------------- ==================================================================