MATHEMATICS

Kamis, 02 Juni 2011

Goedel, Escher, Bach - Lecture 2

It will get a little bit mathy, but that's ok.

Curran Kelleher

Lecture 2 is given by Curran Kelleher. This lecture is all about recursion and ends with a nice explanation of the Mandelbrot set.

He starts out with the traditional examples factorial:
factorial[0]:=1;
factorial[n_]:=factorial[n-1]*n;
and fibonacci sequence:
fib[1]:=1;
fib[2]:=1;
fib[n_]:=fib[n-1]+fib[n-2];
Kelleher's factorial program

Kelleher's hand-out ( pdf ) contains examples of Java code for drawings of the Koch curve and Sierpinski triangle. Although I fast-forwarded through this part of the lecture, it may be very interesting for non-programmers.

Explaining the Fern algorithm

Complex number implemented as a class in Groovy 
At around 1:00 he starts with the topic of the Mandelbrot set. Starting with f(z) = z^2 + c he manages to give a nice explanation of the Mandelbrot set. The color of a point in the Mandelbrot set is based on the number of iterations it took f to 'escape' a circle. Since this is done on a pixel by pixel basis and one pixel may generate not one but several iterations this explains the long time it takes to generate a Mandelbrot set.

P.S.
GEB does not seem 'outdated' at all although it was written in the late seventies. A time when there were no mobile phones, no PCs, let alone laptops and the internet was still in its toddler phase.

Tidak ada komentar:

Posting Komentar