How to get slice planes correct?

4 views (last 30 days)
Sholpan
Sholpan on 25 Apr 2013
I am trying to get a 3 planes rotated at different angles. I tried 0, 15 and 75 degrees. However, function rotate slices an additional information of the plot in such a way that if you increase a polar angle, the amount of cut-off image area increases. I cant seem to get around this problem. Does anyone know how to rotate a plane given a set of data. i.e. if i want plane to be rotated by required degrees, the plane actually contain these values and is rotated by required angle.
I will be immensely grateful for your help.
With kind regards, Sholpan

Accepted Answer

Matt J
Matt J on 25 Apr 2013
If you're using IMROTATE, that shouldn't be a problem. You have the option to crop the rotated image to the original image dimensions, but no cropping is the default.
  4 Comments
Sholpan
Sholpan on 25 Apr 2013
it's still doesnt work but thank you for your help. I am constructing the images from the data and not the image files
Matt J
Matt J on 25 Apr 2013
Edited: Matt J on 25 Apr 2013
Z values are kept within the inital limits for some strange reason.
You have only specified U_total over the initial range znew_1. SLICE has no way of extrapolating U_total data outside the range of data you have given it.

Sign in to comment.

More Answers (1)

Matt J
Matt J on 25 Apr 2013
Edited: Matt J on 25 Apr 2013
If you're just trying to rotate a set of points in 3D, then this FEX file should be helpful
It is more direct than using SURF plots,
data=[linspace(xmin,xmax,129);...
linspace(ymin,ymax,129);...
zeros(1,129)];
rotdata = AxelRot(data,30,[-1 0 0 ],[0 0 0]);
xd_1 = rotdata(1,:);
yd_1 = rotdata(2,:);
zd_1 = rotdata(3,:);

Community Treasure Hunt

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

Start Hunting!