patch object changes size when rotating with makehgtform in 2014b
이전 댓글 표시
Hello,
I have written my initial matlab script in matlab 2013b and now in 2014b version it does not work as I would expect.
I created a 3d object with patch function and I am using makehgtform for rotating it. When I am rotating it in matlab 2014b then it gets with some rotations bigger or smaller. This did not happen in MatLab 2013b.
I created the patch object like this -
vert = [-0.5 -0.5 0; -0.5 0.5 0; 0.5 0.5 0; 0.5 -0.5 0 ; ...
-0.5 -0.5 1;-0.5 0.5 1 ; 0.5 0.5 1 ;0.5 -0.5 1];
fac = [1 2 3 4; ...
2 6 7 3; ...
4 3 7 8; ...
1 5 8 4; ...
1 2 6 5; ...
5 6 7 8];
c(1)=patch('Faces',fac,'Vertices',vert,'FaceColor','w'); % patch function
....
t = hgtransform('Parent',ax);
set(c,'Parent',t)
that's only a part of it.
the figure settings are the following
f=figure('units','normalized','outerposition',[0 0 1 1], 'ToolBar', 'none');
set(gcf,'Resize','off')
ax=axes('xlim', [-1.7 1.7], 'ylim', [-1.7 1.7], 'zlim', [-1.7 1.7]);
view([ 0 0]);
grid off;
axis image;
axis off;
I already tried set(gcf,'Resize','off'), but this does not work. Has anyone an idea why is it scaling/resizing? and how I could fix it?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!