Ander Biguri
Ander Biguri

Reputation: 35525

Data interpolation over a non-homogeneous surface

In my project i deal with big data surfaces.

In a certain point, i have a line across the data, and I need the values of the points of the line.

The grid is non,homogeneous, it doesnt go from n:m with fixed steps nor nothing.

Lets ilustrate! In the figure the 2D proyection of my data can be seen. Each of the points has also other 3 data information. I defined a arbitrary red line with the form y=ax+b. a and b are known.

How can I define i.e. 50 points in the line that has not only the x and y coords (wich is straigforward) but also the interpolation of the 3 data information of each of the points around it.

enter image description here

I know is not an easy question but I can't seem to step forward even a bit.

PD: realize I DONT want code written for me, but the idea of how to achieve my objective.

Upvotes: 1

Views: 309

Answers (2)

Ander Biguri
Ander Biguri

Reputation: 35525

What I did was to define several points in the crack line and then cheack for each one of them in wich quadrilateral it is with inpoligon matlab function (no tthe fastest way but less than 2 secs).

Then I created a triangular plane in the used quadrilaterals using x,y and Z or the othre data , achieving a linear interpolation between the data.

finally i take out all the points that are 0 o Nan.

Upvotes: 0

user85109
user85109

Reputation:

You could use a tool like triScatteredInterp, which will triangulate the 2-d domain, then interpolate a list of points along your line. Griddata is also an option.

I have a toolbox for problems like this (of course.) It allows me to build a triangulation of the non-convex domain in the (x,y) plane. Then it can form a completely general slice through that surface, interpolating in z also as it does so. The result will be a 1-manifold, in this case a piecewise linear function along that path in (x,y,z). While those tools are not posted on the file exchange, they are available for the person willing to invest the time to learn to use them.

If the surface you describe is a completely general one in 3-d, that might be fairly complex, then you might need a CRUST based tool to define that surface triangulation. These can be found online too. Once a triangulation is available, my tools can then be used to slice them. (Sorry, I never did finish that piece.)

Upvotes: 1

Related Questions