11:58am, Monday 22 March 2004

I found a web page describing how someone did ray-tracing on his 1980's pocket calculator. I have a calculator just like that, so I taught it to calculate a Mandelbrot set.

Here's the code (public domain, blah blah):

Prog 1

-1->Y:Lbl 4:-1.5->X:Lbl 0:Prg 2:C>=10=>Goto 8:".",Goto 7:Lbl 8: "#",Lbl 7:X+0.1->X:X<0.8=>Goto 0:"X",Y+0.1->Y:Y<1=>Goto 4Prog 2

0->R:0->S:0->C:Lbl 0:Isz C:R^2-S^2+x->P:2xRxS+Y->Q:P->R:Q->S: ./(R^2+S^2)>=2=>Goto 9:C>=10=>Goto 9:Goto 0:Lbl 9