Description: matlab program drawing, common fractal images
function cantor(A,B)
c=1
p=0
figure
hold on
plot([A(2) B(2)],[A(1) B(1)], r* )
while norm(A(1,:)-B(1,:))>=1
C=[] D=[]
for i=1:size(A,1)
a=A(i,:)+(B(i,:)-A(i,:))/3
b=A(i,:)+2*(B(i,:)-A(i,:))/3
C=[C A(i,:) b]
D=[D a B(i,:)]
end
A=C
B=D
p=p+1
To Search:
File list (Check if you may need any files):
分形程序\cantor.m
........\figure_xor.m
........\figure_xor_diag.m
........\fractaltree.m
........\julia.m
........\L_sys.m
........\test.m
分形程序