Mandelbrot set: Difference between revisions

Content deleted Content added
Chkas (talk | contribs)
Chkas (talk | contribs)
Line 2,593:
=={{header|Easyprog.online}}==
 
[https://easyprog.online/ide/run.html?code=floatvars%0Awhile0Afor%20y%2025%3C20range%20300%0Ax%20%3D%200%0Awhile0Afor%20x%2025%3C20range%20300%0Azx%20%3D%200%0Azy%20%3D%200%0Acx%20%3D%20%28x%25%20-%20220%29%20/%20120%0Acy%20%3D%20%28y%25%20-%20150%29%20/%20120%0Aiter%25%20%3D%2030200%0Awhile%20zx%20%2A%20zx%20%2B%20zy%20%2A%20zy%20%3C%204%20and%20iter%25%20%3E3C%20020128%0Ah%20%3D%20zx%20%2A%20zx%20-%20zy%20%2A%20zy%20%2B%20cx%0Azy%20%3D%202%20%2A%20zx%20%2A%20zy%20%2B%20cy%0Azx%20%3D%20h%0Aiter%25%20-%2B%3D%201%0A.%0Amove0Aif%20x20iter%25%20%3D%20128%0Acolor_red%200%0Aelse%0Acolor_red%20iter%25%20/%2032016%20y0A.%0Amove%20x%25%20/%203%0Acolor_red20y%20iter25%20/%2010203%0Arect%200.4%200.4%0Ax%20%2B%3D%201%0A.%0Ay%20%2B%3D%201%0A. Try it]
 
<lang>floatvars
whilefor y% <range 300
for x% =range 0300
while x < 300
zx = 0
zy = 0
cx = (x% - 220) / 120
cy = (y% - 150) / 120
iter% = 300
while zx * zx + zy * zy < 4 and iter% >< 0128
h = zx * zx - zy * zy + cx
zy = 2 * zx * zy + cy
zx = h
iter% -+= 1
.
moveif xiter% /= 3 y / 3128
color_red iter /color_red 100
else
color_red iter% / 16
y += 1.
move x% / 3 y% / 3
rect 0.4 0.4
x += 1
.
y += 1
.</lang>