I use the following code to generate a 2D parallelogram-shaped mesh:
xmax = 4;
ymax = 3;
xres = 7;
yres = 5;
m = sqrt(3); % Slope of tilted side; slope = Inf for a rectangle
xmax_adjusted = xmax*(1-1/xres);
ymax_adjusted = ymax*(1-1/yres);
x = (linspace(-xmax_adjusted,xmax_adjusted,xres).').*ones(1,yres);
y = linspace(-ymax_adjusted,ymax_adjusted,yres).*ones(xres,1) + (1/m).*x;
% Plot to check lattice:
clf
hold on
mksz = 20;
plot(x,y,"linestyle","none","marker",".","markersize",mksz,"color","b")
axis equal
It produces meshes like this:
I would like to evaluate a function at each of these points and then interpolate its values to a finer mesh. The finer mesh should also be a parallelogram of the form depicted above, just with more points. Unfortunately, because the meshes x and y are not both monotonic, I cannot use interp2 here.
I'm aware of solutions in which the parallelogram grid is used to create a rectangular grid, which can then be interpolated, but if possible I would like to interpolate without using another lattice. Is anyone aware of a method to do this?