function clover(m)

%this plots a fractal that I forgot the name of...Vicek I think...of level
%m. It gets pretty tough to plot after level 4 or 5.

v0=[0 1; 0 0; 1 0; 1 1; 1/2 1/2];
y=v0(1:4,:); %you can change between 4 and 5 to get two different fractals
for n=1:1:m
    v=[];
    for i=1:1:5
        for j=1:1:max(size(y))
            v=[v; 2/3*(v0(i,:)-y(j,:))+y(j,:)];
        end
    end
    y=v;
end


%plot(y(:,1),y(:,2),'.')


hold off
hold on
for n=1:1:max(size(y))/4
    plot([y(4*n-3:4*n,1); y(4*n-3,1)],[y(4*n-3:4*n,2); y(4*n-3,2)])

end

