Interpolate Vectors into rotated grid
3 views (last 30 days)
Show older comments
Hello,
I am having trouble finding which is the best functions to use for an interpolation I am doing. I have a set of data stored within a spatial grid in 3D, where each grid point contains a vector. The grid spacing is uniform in x,y,z but not necessarily the same between each direction. This grid is specified by the location of the first grid location (x0,y0,z0) as well as the number of gridpoints along each axis (nx,ny,nz) and the grid spacing in each direction (sx,sy,sz).
I have a second grid which is rotated relative to the first. This grid is specified by the location of the first grid location (u0,v0,w0), the number of gridpoints along each axis (ux,vy,wz), the grid spacing in each direction (su,sv,sw), and the rotation (theta) in the x-y plane relative to the first grid, the second grid cannot have a rotation out of the x-y plane relative the the first grid.
I am hoping to find a simple way interpolate the vectors stored in the original grid onto the rotated grid without having to do massive amounts of restructuring of my data. Any help would be appreciated.
Thanks
0 Comments
Answers (1)
Ahmet Cecen
on 15 Aug 2014
I would first stretch your original grid to be uniform in all directions. Then do planar rotation twice to obtain the new grid. Finally re-size back into your distorted grid if you really need it that way. If you like this and try to implement some of it, I might be able to provide further help, but this is not my expertise. I am simply sharing how I would approach the problem.
2 Comments
Ahmet Cecen
on 16 Aug 2014
You can apply 43.2 degree rotations too, it doesn't have to be 90. But yes if you do rotate it 90 degrees it would become the y-axis, then again, that's what your data would actually mean anyways. Check "imrotate" with bilinear interpolation.
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!