I've been trying to make the Mandelbrot Set program in Grammer code for a little while (I made my first attempt in August), but something kept bugging out. It turns out, that all I had to do was add in a colon
Anyways, this version I threw together yesterday after carefully writing out the code in a notebook
All it does at the moment is show a scaled down view of the MSet. You just run it and it computes the set appropriately. I plan to make it better for exploring the MSet zoomed in (where you can scroll the viewing area dynamically). It isn't nearly as fast as it would be in Axe or Assembly, but it is quite a bit faster than TI-BASIC which is what I was using before
Here is the code:
Repeat !!I: and I<999
ClrDraw
Text(0,0,"ITERATIONS:
expr(Input→I
End
Full
ClrDraw
For(A,0,111
A-64→C
For(B,0,95
B-48→D→H
C→G
For(E,0,I
G-H:*G+H:/ 32:+C→F ;The space after the / is for using signed division
G*H
+Ans:/ 32:+D→H
If F→G2:+H2:>4096 ;This is G^2 and H^2, respectively, using the squared token
999→E
End
If E<999
Pxl-On(8+B/2,20+A/2
Is>(B
End
Is>(A
DispGraph
End
Stop