假冒了一个,看起来似乎是半径在变化,不过事实上不是,只是我改变了axes的Position属性而已,现在还不知道怎么画一个指定半径的球,有高手请指教一下:
- Fig = figure('unit','normalized','menubar','none', ...
- 'numbertitle','off','tag','C1','Name','半径好像在变化的球...', ...
- 'Defaultuicontrolunits','normalized','DoubleBuffer','on');
- A1 = axes('Parent',Fig,'Unit','Normalized','Position', ...
- [.2 .2 .6 .6],'Tag','A1','xticklabel',{},'yticklabel',{}, ...
- 'DrawMode','Fast','NextPlot','replace');
- sphere(30);hold on;axis off;
- shading interp;axis equal
- pause(.5);
- i = 1;P = get(A1,'Position');
- while i<10
- set(A1,'Position',P+i*[-.025 -.025 .05 .05]);
- pause(.5);
- i = i+1;
- if i>9;
- i = 1;
- end
- end
复制代码 |