[Matlab]糖葫芦代码实现
clc;clear;
figure(1);
[x y z]=sphere(50); %球由50*50的球面组成
surf(2*x,2*y,2*z,'FaceColor',[1,0,0]); %%画一个圆心在(0,0,0),半径为2的球,并设置其颜色为红色
hold on %保持该图形的位置
[x y z]=sphere(50);
surf(2*x,2*y,2*(z-2),'FaceColor',[1,0,0]);
hold on
[x y z]=sphere(50);
surf(2*x..
原创
2022-03-24 19:54:43 ·
695 阅读 ·
2 评论