Conjunto de Mandelbrot - III



 -2.5
 1.49
 -1.5
  1.5



-2.0441784784197810
-0.6517373919487000
-0.5372491925954819
 0.5372493267059326




-0.4456810876727104
 0.1475113034248352
 0.7607450187206268
 1.2163323909044270






10 SCREEN 9: KEY OFF: CLS
15 GOSUB 2000
20 DEFDBL A-Z
30 XX% = 640: YY% = 350: I% = 100: CM% = 100
35 MX = 80: V = -300
37 DS = MX - V
40 LOCATE 1, 1: INPUT "X1 = "; X1
41 LOCATE 2, 1: INPUT "X2 = "; X2
42 LOCATE 3, 1: INPUT "Y1 = "; Y1
43 LOCATE 4, 1: INPUT "Y2 = "; Y2
45 CLS
50 H1 = (X2 - X1) / (XX% - 1)
60 H2 = (Y2 - Y1) / (YY% - 1)
90 FOR N1% = 0 TO 639 STEP 3
    100 F = (N1% - V) / DS
    110 FOR N2% = -175 TO 175
        120 T1 = X1 + N1% * H1: T2 = Y1 + (N2% + 175) * H2
        130 CT% = 0: X = 0: Y = 0
        140 XN = (X * X) - (Y * Y) + T1: Y = 2 * X * Y + T2
        160 X = XN: CT% = CT% + 1
        170 IF (X * X) + (Y * Y) > I% THEN CL% = CT%: GOTO 200
        180 IF CT% = CM% THEN CL% = 0: GOTO 200
        190 GOTO 140
        200 REM
        210 GOSUB 330
        220 NY = CINT(N2% * F + 360): IF NY = PY THEN 270
        230 NZ = Z + N1% * .4 + 50
        245 CL% = CL% / 4
        250 PSET (NY, NZ), CL%
        260 PY = NY: PZ = NZ
    270 NEXT
280 NEXT
290 W$ = INPUT$(1)
300 END
330 REM
340 Z = (-N2% * .1) + CL%
350 RETURN
2000 PALETTE 0, 0
2010 PALETTE 1, 55
2020 PALETTE 2, 62
2030 PALETTE 3, 22
2040 PALETTE 4, 26
2050 PALETTE 5, 19
2060 PALETTE 6, 27
2070 PALETTE 7, 11
2080 PALETTE 8, 25
2090 PALETTE 9, 57
2100 PALETTE 10, 33
2110 PALETTE 11, 5
2120 PALETTE 12, 37
2130 PALETTE 13, 44
2140 PALETTE 14, 52
2150 PALETTE 15, 36
2160 RETURN



No hay comentarios:

Publicar un comentario

Nota: solo los miembros de este blog pueden publicar comentarios.