EDIT: Actually, nevermind. I converted the program to an appvar via Celtic III on jsTIfied and I was able to send it to my CE fine. Now I can link my calc-to-calc cable and send it to my TI-84 Plus and convert it back to a program. Sweet!

]]>` ``{0,1,1,1,1,0,0,0→L1 For(Y,0,61 2pxl-Test(Y,0)+4pxl-Test(Y,1 For(X,1,93 int(Ans.5)+4pxl-Test(Y,X+1 If L1(1+Ans Pxl-On(Y+1,X End End`

Also, excellent work!

]]>Here is the code I wrote in its entirety:

` ``"01001001"→Str1 100→W DelVar Y FnOff AxesOff GridOff ClrDraw For(A,132-W/2,132+W/2) If randInt(0,1 Pxl-On(0,A End For(Y,0,163) For(X,132-W/2,132+W/2) If expr(sub(Str1,8-4(pxl-Test(Y,X-1))-2(pxl-Test(Y,X))-pxl-Test(Y,X+1),1 Pxl-On(Y+1,X End End`

This will draw a line of random 1s and 0s across the top of the screen, so it should be much more interesting to watch!

]]>` ``{0,1,1,1,1,0,0,0→L1 For(Y,0,61 2pxl-Test(Y,0)+pxl-Test(Y,1 For(X,1,93 2Ans+pxl-Test(Y,X+1 If Ans≥8 Ans-8 If L1(1+And Pxl-On(Y+1,X End End`

Note that L1 is the binary for 30, reversed, so this is a Rule 30. (30=0b00011110, reversed it is 01111000).

If you add in a way to convert a number to binary, you can have the user input the rule number :)

This is going to be slow in BASIC, but still bearable. It took 180 seconds (3 minutes) to draw the whole screen on my 84+.

]]>Thanks for your advice, though! ]]>

For now, all you need to know to help with this program is that there is a line of cells across the top, and each one is either on or off. When it advances to the next generation of cells (drawn in on the next line), it changes one cell's state based on the cell to the left and the cell to the right. Because of this, the program has to check each cell in the row to determine if it should stay on, stay off, or change state. I am hoping there is a faster way to do this, since right now it takes a very long time to draw an entire screen.

W is the width of the screen that the calculator is drawing on (and it is centered at 132, the middle of the screen for a TI 84 CE)

Str1 is an 8 digit string of zeroes and ones. The calculator determines how a cell should change by checking the cell and its left and right neighbor and turning that into a number 1-8 (because there are 8 different states the 3 cells could be in). The number corresponds to a digit in Str1 and determines if that cell should be on or off. Str1 can be changed to show any of the rules for cellular automata.

` ``For(Y,0,163) For(X,132-W/2,132+W/2) If expr(sub(Str1,8-4(pxl-Test(Y,X-1))-2(pxl-Test(Y,X))-pxl-Test(Y,X+1),1 Pxl-On(Y+1,X End End`

There are online programs that can do this in a matter of seconds. Is there a way I can make this loop run faster? I have tried referencing a list of 8 numbers instead of a string, but it didn't appear to run faster. I'm hoping there is something that I have missed, but it's possible that a calculator just can't run any faster. If you have any ideas of how to speed this up, I would greatly appreciate it!

]]>