function SierpRand(m,c)

x=rand;
y=rand;
for k=1:1000*m
	n=rand;
	if n<=(1/3)
		x=x*.5;
		y=y*.5;
	elseif n>(1/3)
		if n<=(2/3)
			x=.5*(x+.5);
			y=.5*(1+y);
		else
			x=.5*(1+x);
			y=.5*y;
		end
	end
	plot(x,y,[c, '.'])
end


