Data update
This commit is contained in:
parent
07c7092a52
commit
61b93a2cd1
313 changed files with 6160 additions and 346 deletions
21
Task/Mandelbrot-set/MSX-Basic/mandelbrot-set.basic
Normal file
21
Task/Mandelbrot-set/MSX-Basic/mandelbrot-set.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
100 SCREEN 2
|
||||
110 CLS
|
||||
120 x1 = 256 : y1 = 192
|
||||
130 i1 = -1 : i2 = 1
|
||||
140 r1 = -2 : r2 = 1
|
||||
150 s1 = (r2-r1)/x1 : s2 = (i2-i1)/y1
|
||||
160 FOR y = 0 TO y1
|
||||
170 i3 = i1+s2*y
|
||||
180 FOR x = 0 TO x1
|
||||
190 r3 = r1+s1*x
|
||||
200 z1 = r3 : z2 = i3
|
||||
210 FOR n = 0 TO 30
|
||||
220 a = z1*z1 : b = z2*z2
|
||||
230 IF a+b > 4 GOTO 270
|
||||
240 z2 = 2*z1*z2+i3
|
||||
250 z1 = a-b+r3
|
||||
260 NEXT n
|
||||
270 PSET (x,y),n-16*INT(n/16)
|
||||
280 NEXT x
|
||||
290 NEXT y
|
||||
300 GOTO 300
|
||||
Loading…
Add table
Add a link
Reference in a new issue