Mandelbrot set

You are encouraged to solve this task according to the task description, using any language you may know.


Task

Generate and draw the Mandelbrot set.



Note that there are many algorithms to draw Mandelbrot set and there are many functions which generate it .




--
-- Mandlebrot set in ascii art demo.
-- 
constant b=" .:,;!/>)|&IH%*#"
atom r, i, c, C, z, Z, t, k
    for y=30 to 0 by -1 do
        C = y*0.1-1.5
        puts(1,'\n')
        for x=0 to 74 do
            c = x*0.04-2
            z = 0
            Z = 0
            r = c
            i = C
            k = 0
            while k<112 do
                t = z*z-Z*Z+r
                Z = 2*z*Z+i
                z = t
                if z*z+Z*Z>10 then exit end if
                k += 1
            end while
            puts(1,b[remainder(k,16)+1])
        end for
    end for