Here is 9 years old (1992) implementation in C.

Now, you see Java applet which does the same.

(C) 1992-1998 Anton Kolonin

1