📄 snow.m
字号:
clear all
new=[0.5+(sqrt(3)/2*i),-0.5+(sqrt(3)/2*i),0,0.5+(sqrt(3)/2*i)];
subplot(2,3,1);
plot(new)
axis equal
for kkk=1:5;
old=new;
n=length(old)-1;
for jj=0:n-1;
diff=(old(jj+2)-old(jj+1))/3;
new(4*jj+1)=old(jj+1);
new(4*jj+2)=old(jj+1)+diff;
new(4*jj+3)=new(4*jj+2)+diff*((1-sqrt(3)*i)/2);
new(4*jj+4)=old(jj+1)+2*diff;
end
new(4*n+1)=old(n+1);
subplot(2,3,kkk+1)
plot(new)
axis equal;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -