### Author Topic: MSet (Grammer)  (Read 2951 times)

0 Members and 1 Guest are viewing this topic.

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4669
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### MSet (Grammer)
« on: October 25, 2012, 07:28:25 pm »
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:
Code: [Select]
Repeat !!I: and I<999ClrDrawText(0,0,"ITERATIONS:expr(Input→IEndFullClrDrawFor(A,0,111A-64→CFor(B,0,95B-48→D→HC→GFor(E,0,IG-H:*G+H:/ 32:+C→F   ;The space after the / is for using signed divisionG*H+Ans:/ 32:+D→HIf F→G2:+H2:>4096    ;This is G^2 and H^2, respectively, using the squared token999→EEndIf E<999Pxl-On(8+B/2,20+A/2Is>(BEndIs>(ADispGraphEndStop
« Last Edit: October 25, 2012, 09:26:45 pm by Xeda112358 »

#### Yeong

• Not a bridge
• LV12 Extreme Poster (Next: 5000)
• Posts: 3739
• Rating: +278/-12
• Survivor of Apocalypse
##### Re: MSet (Grammer)
« Reply #1 on: October 25, 2012, 09:21:02 pm »
Nice.
Sig wipe!

#### Xeda112358

• they/them
• Moderator
• LV12 Extreme Poster (Next: 5000)
• Posts: 4669
• Rating: +718/-6
• Calc-u-lator, do doo doo do do do.
##### Re: MSet (Grammer)
« Reply #2 on: October 25, 2012, 09:24:10 pm »
Thanks The math is a bit weird the way I did it. Also, the colon that I was missing was at ":>4096" and I was under some impression that I didn't need it >.>

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: MSet (Grammer)
« Reply #3 on: October 25, 2012, 10:22:13 pm »
woo, this is looking nice!
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!