I want to draw a surface with a texture map on it, but the conditions are not "ideal".
first lets explain what I have.
I have a set of points (~ 7000), which are the coordinates of the image in the grid. These points do NOT define perfect squares. This is not MESHGRID . For the sake of the question, let's assume that we have 9 points. Let's show what we have with the image:
X=[310,270,330,430,410,400,480,500,520] Y=[300,400,500,300,400,500,300,400,500]
Suppose we can get the "structure" of the grid, so
size1=3; size2=3; points=zeros(size1,size2,2) X=[310,270,330; 430,410,400; 480,500,520] Y=[300,400,500; 300,400,500; 300,400,500] points(:,:,1)=X; points(:,:,2)=Y;
Now let's say that we have a 3-dimensional dimension, Z.
EDIT: Forgot to add a piece if information. I triangulate the points in the image and get a three-dimensional correspondence, therefore, when they are displayed on the surface, they do not have the X and Y coordinates of the image, to simplify the data data, we can say that X = X / 2 Y = Y / 3
And we have:
points=zeros(size1,size2,3) Z=[300,330,340; 300,310,330; 290,300,300] surf(points(:,:,1)/2,points(:,:,2)/3,points(:,:,3))
What I want is to build a surface in 3D with an image texture. Each element must have a piece of texture that it has in the first image.
This should work for huge data tables. I don't need it to be fast.
linked post (but I have a meshgrid as an initial set of points): Texture map for a 2D mesh
PD: I can publish original images + real data, if necessary, just posted this because I think that with small data is easier.