Retrieve a randomly rotated data plane from a 3D array as a 2D array

I have a three-dimensional data matrix in matlab, but I want to extract an arbitrarily rotating piece of data from this matrix and save it as a 2D matrix, which I can access. Just like the slice () function displays data cut at any angle, except that I would also like to be able to view and modify the data as if it were an array.

I have the coordinates of the pivot point of the plane, as well as the angles of rotation (on the x, y and z axis), I also calculated the plane equation in the form:

Ax + By + Cz = D

and can extract a three-dimensional matrix containing only data that falls on this plane, but I don’t know how to then convert it to a simple 2D array.

Another way to do this would be to somehow rotate the original matrix in the opposite direction from the plane angle, in order to align the data plane with the XY axis and simply extract this part of the matrix, but I don’t know if such a matrix can rotate.

I hope I haven’t answered this anywhere, I’ve been working on Google all day, but none of the problems seem to fit me.

thank

+5
source share
2 answers

. , , .

, , .. [A, ]. .

+1

! , .

, (0,0,1) , D. :

(1,0,0) //step in the x direction of our 2D array

(0,1,0) //step in the y direction of our 2D array

, , x, y, z, .

,

.: , , , xyz x = 0, y = 0, z = 0 ( , -sizex/2, -sizey/2, -sizez/2, - , /2 , ).

, 3D, x 2D- , y, x y ( 50x50 50x50x50, , , ) 2D- 3D- . . !

, ,

0

All Articles