Interpolate Vectors into rotated grid

조회 수: 6 (최근 30일)
James
James 2014년 8월 15일
댓글: Ahmet Cecen 2014년 8월 16일
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

답변 (1개)

Ahmet Cecen
Ahmet Cecen 2014년 8월 15일
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
James
James 2014년 8월 15일
I may be misunderstanding, but I do not think that would work. Say my 2nd grid is rotated at an angle 90 degrees from the first. If I have a datapoint which lies on the x-axis originally, if I apply a 90 degree rotation to the first grid it will physically move that point from the x-axis to the y-axis. What I am looking for would be the (interpolated) value in the original grid for all points within the rotated grid.
Ahmet Cecen
Ahmet Cecen 2014년 8월 16일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by