r = 1% 半径初值
flag = 1
figurehold onview(3)
axis([-20 20 -20 20 -20 20])
axis equalbox on
title('请按空格键退出', 'FontSize', 18)
while flag
r = mod((r + 1), 20)
[x, y, z] = sphere(20)
h = surf(r*x, r*y, r*z)
pause(0.1)
delete(h)
s = get(gcf, 'CurrentKey')
if strcmp(s, 'space')
flag = 0
end
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)