Introduction - If you have any usage issues, please Google them yourself
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