Created
September 29, 2018 16:59
-
-
Save houmei/fa774c2586003ccae165d09a75dac15e to your computer and use it in GitHub Desktop.
MachiKania Type M sample BASIC program / Mandelblot https://rosettacode.org/wiki/Mandelbrot_set#Processing
This file contains 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
USEGRAPHIC 5 | |
W=288 | |
H=216 | |
I=0 | |
J=0 | |
F=10 | |
X=W/4 | |
Y=H/8 | |
V=2 | |
Z=1 | |
K=0 | |
L=0 | |
FOR K=0 TO W | |
T#=(FLOAT#(K)+FLOAT#(I))/FLOAT#(X)-FLOAT#(V) | |
FOR L=0 TO H | |
U#=FLOAT#(Z)-(FLOAT#(L)+FLOAT#(J))/FLOAT#(W) | |
R#=0 | |
S#=0 | |
P#=0 | |
Q#=0 | |
N=1 | |
WHILE (P#+Q#)<4 | |
IF N>255 THEN BREAK | |
Q#=S#*S# | |
P#=R#*R# | |
S#=2*S#*R#+U# | |
R#=P#-Q#+T# | |
N=N+1 | |
WEND | |
PSET K,L,N | |
NEXT | |
NEXT | |
END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment