The beginnings Acorn BBC B

I was introduced to the wonder of fractals and mandelbrot sets by the wonderful book "Chaos", by James Gleick. There was a copy in my local library and, while I didn't understand all the maths, the principles and ideas were wonderful. (At this point I had read everything that my library owned by Martin Gardner, so was always looking for his spiritual successor!) One element of maths that I did understand, however, was the complex numbers used to compute mandelbrot sets. So, with a pen and paper and I transcribed the maths into code, which I first programmed into a real machine back in 1988 (I think) on a school BBC Micro. It was so slow I had to get permission to leave the computer on overnight.

The following day I noticed a bug :(

It took another all-nighter before I had my first proper image!

I created lots of images with this program, and optimised it over time. Alas, the only surviving image is from the end of my BBC experiments, in 1990.

When I was a prospective student, all the lecturers and undergraduates I spoke to would ask me what I was doing with computers at home, or school. When I said "fractals", one of them said, with some seriousness, "Don't worry, we'll soon help you grow out of that!"

I shall not mention with university that was, in case I embarass someone at Queen Mary!


At University

Naturally, when I did make it to uni (Loughborough, since you asked!) I was determine to ensure the first program I wrote for myself was a mandelbrot. This is the result.

Also whilst at University I purchased an Amiga, and started exploring the idea again. But, this time there was colour. And palette cycling. Very trippy! This generator software became my first proper piece of published software!


For fun

My favourite. It's just so meta, since the source looks like a mandelbrot as well as the output it produces. Also, it uses key presses to let you zoom into the set!

int main(int argc, char* argv[]){ unsigned
char c='r';double x1,y,y1,t=0,q=78,r=22,x,
x2,y2,a,b,v;do{(c=='r')?(y2=-(y1=-1.6),x1=
-2.0f,x2=0.8):(c=='?')? c=0,   printf("%f\
,%f:%f,%f",x1,y1,x2,y2):(c     <':'&&c>48)
?x=x1,y=y1,*(c>'3'&&c<':'        ?&y1: &t)
+=(y2-y1)/3,*(c>'6'&&c<            ':'?&y1
:&t)+=(y2-y1)/3, *((c               == '8'
||c+3=='8'||c+3 +3==               '8'?&x1
:&t))+=(x2-x1     )/                3,*((c
=='9'||c+3==                        '9'||c
+6=='9'                          ?&x1: &t)
)+=2*(x2-x1)                        /3,x2=
x1+(x2-x)/3,      y2                 =y1+(
y2-y)/3:(c=0);for(y=                y2;y>=
y1&&c;c=1,y-=(y2-y1)/r,            putchar
('\n')) for(x=x1;x<=x2;            x+=(x2-
x1)/q){a=b=c=0; while  (        ++c&&(a=(t
=a)*a)<4&&(v=b*b)<4)a-=v-x     ,b=y+b*2*t;
putchar("#@XMW*N&KPBQYKG$R"   "STEEVxHOUV"
"CT()[]%JL={}eou?/\\|Ili+~<>_-^\"!;:`,. "[
c?c>>2:63]);}} while((c=getchar ())!='x');
return 0;/* Mandelbrot - S.Goodwin.2001*/}

See more of my obfuscated code here!

But it's not only computers that I've programmed. In one of my many stints with embedded systems I decided to reprogram a Canon camera with the famed image!

Learn more about my CHDK hacks, programming a Canon Camera.

Eventually I succumb to the charms of JavaScript, and wrote this version which I hand-optimised to run in real-time. The palette is black and white because of my inability to choose good colour schemes!

This browser does not support the HTML5 Canvas.
Note: Click on the image to zoom. Click and hold to fly!


Educating

In 2018 I decided to prove a point that web workers aren't always an improvement, by updating my Mandelbrot set generator to use them!

See Web worker example with Mandelbrots.!

There's enough videos online of people explaining how the set generation works. But, if you find me in a bar, then I can always explain it again for the price of a Belgian beer :)