Last active
June 25, 2025 16:19
-
-
Save eparadis/d4a242c8cc149f3583c303efa80532c4 to your computer and use it in GitHub Desktop.
ascii art mandelbrot drawing program in BASIC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10 x1=59 | |
| 11 y1=21 | |
| 20 i1=-1.0 | |
| 21 i2=1.0 | |
| 22 r1=-2.0 | |
| 23 r2=1.0 | |
| 30 s1=(r2-r1)/x1 | |
| 31 s2=(i2-i1)/y1 | |
| 40 for y=0 to y1 | |
| 50 i3=i1+s2*y | |
| 60 for x=0 to x1 | |
| 70 r3=r1+s1*x | |
| 71 z1=r3 | |
| 72 z2=i3 | |
| 80 for n=0 to 29 | |
| 90 a=z1*z1 | |
| 91 b=z2*z2 | |
| 100 if a+b>4.0 goto 130 | |
| 110 z2=2*z1*z2+i3 | |
| 111 z1=a-b+r3 | |
| 120 next n | |
| 130 print chr$(62-n); | |
| 140 next x | |
| 150 print | |
| 160 next y | |
| 170 end |
Author
Where did N come from here?
The ANSI color modification is for the original listing at the top of the page, whereNis the number of iterations through the inner-most loop.
In the other listings, I is the equivalent variable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where did
Ncome from here? Was it originallyI?