Hmm.. I must admit I could spend my time in a better way, but I wasn't in a mood to do something else.
You can modify the grid resolution (variables height and width) and the calculus accuracy (variable n).
15 lines, 5 commands per line (good old rules :p )
`useless comment line to make copying the code area easier
set display mode 800,600,32 : set window on : set window size 800,600 : sync on : sync rate 0
width = 40 : height = 30 : n=20 : dim col(n) : box 0, 0, 5, 2.2*n, rgb(255, 0, 0), rgb(0, 255, 0), rgb(255, 0, 0), rgb(0, 255, 0)
for t=0 to n : col(t)=point(2, 1+2*t) : next t : xmin# = -2.2 : xmax# = 1
type t_obj iter col,r#,g#,b# endtype : dim obj(width, height) as t_obj : ymin# = -1.5 : ymax# = 1.5
for x=0 to width : for y=0 to height : make object cube 1+y*500+x, 1 : position object 1+y*500+x, x, 0, y : obj(x,y).r#=rgbr(col(0))
obj(x,y).g#=rgbg(col(0)) : obj(x,y).b#=rgbb(col(0)) : next y : next x : do
if mouseclick()=1 and clic=0 : o = pick object(mousex(), mousey(), 1, 60000) : else : o = 0 : endif
for x=0 to width : clic = mouseclick() : for y=0 to height : py# = 1.0*y : px# = 1.0*x
y# = py# / height * (ymax#-ymin#) + ymin# : x# = px# / width * (xmax#-xmin#) + xmin# : zr#=0 : zi#=0 : zit#=0
zrt#=0 : it = 0 : repeat : zrt# = x# + zr#^2 - zi#^2 : zit# = y# + 2*zi#*zr#
zi# = zit# : zr# = zrt# : inc it : until it=n or zi#^2 + zr#^2 > 4 : obj(x,y).iter = it
position object 1+y*500+x, object position x(1+y*500+x), curvevalue(obj(x,y).iter*0.35, object position y(1+y*500+x), 60), object position z(1+y*500+x) : obj(x,y).r# = curvevalue(rgbr(col(obj(x,y).iter)), obj(x,y).r#, 60) : obj(x,y).g# = curvevalue(rgbg(col(obj(x,y).iter)), obj(x,y).g#, 60) : obj(x,y).b# = curvevalue(rgbb(col(obj(x,y).iter)), obj(x,y).b#, 60) : color object 1+y*500+x, rgb(obj(x,y).r#, obj(x,y).g#, obj(x,y).b#)
if o=1+y*500+x : ymin# = y# - (ymax#-ymin#)*0.25 : ymax# = y# + (ymax#-ymin#)*0.25 : xmin# = x# - (xmax#-xmin#)*0.25 : xmax# = x# + (xmax#-xmin#)*0.25
endif : next y : next x : set camera to follow width/2, 0, height/2, angle#, (width+height)/2.5, n, 20, 0 : point camera width/2, 0, height/2
inc angle#, 0.8 : sync : loop
`useless comment line to make copying the code area easier
If you don't know what's Mandelbrot fractal, you can "throw an eye" to the wikipedia : http://en.wikipedia.org/wiki/Mandelbrot_set
If you want some clean code to draw a (2D) mandelbrot fractal, you can look at a tutorial I wrote a few years ago : http://www.seuret.com/darkbasic/index.php?rub=fractales
That's not very useful, but that kept my mind busy half an hour
The sleeper must awaken !