Being bored this morning, I decided to implement the ifs algorithm on my TI-89 graphics calculator. It was not particularly difficult, and after 23 lines of TI-BASIC, I had this image on my screen.

The program takes a n*7 matrix, like this

Where a, b, c, and d are the elements of a 2*2 transformation matrix, e and f are elements of an offset vector, and p is the probability of the rule occuring. Note that it runs extremely slowly, I waited about ten minutes for the picture shown to be generated. I’ve added it to the repo though; in case anyone else is also bored ;)

`Prgm`

rand()->a

rand()->b

0->i

1000000->iters

100->s

While ic

rand()->l

While pc

r[c,7]+p->p

EndWhile

r[c,1]*a+r[c,2]*b+r[c,5]->t

r[c,3]*a+r[c,4]*b+r[c,6]->b

t->a

If i>s

PtOn a,b

1+i->i

EndWhile

EndPrgm