Julia set: Difference between revisions

Content added Content deleted
Line 678: Line 678:
</pre>
</pre>

=={{header|Easyprog.online}}==

[https://easyprog.online/ide/run.html?code=floatvars%0Acx%20%3D%20-0.7%0Acy%20%3D%200.27015%0Afor%20y%25%20range%20300%0Afor%20x%25%20range%20300%0Aiter%25%20%3D%200%0Azx%20%3D%20%28x%25%20-%20150%29%20/%20100%0Azy%20%3D%20%28y%25%20-%20150%29%20/%20150%0Awhile%20zx%20%2A%20zx%20%2B%20zy%20%2A%20zy%20%3C%204%20and%20iter%25%20%3C%20128%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.%0Aif%20iter%25%20%3D%20128%0Acolor_red%200%0Aelse%0Acolor_red%20iter%25%20/%2016%0A.%0Amove%20x%25%20/%203%20y%25%20/%203%0Arect%200.4%200.4%0A.%0A. Run it]

<lang>floatvars
cx = -0.7
cy = 0.27015
for y% range 300
for x% range 300
iter% = 0
zx = (x% - 150) / 100
zy = (y% - 150) / 150
while zx * zx + zy * zy < 4 and iter% < 128
h = zx * zx - zy * zy + cx
zy = 2 * zx * zy + cy
zx = h
iter% += 1
.
if iter% = 128
color_red 0
else
color_red iter% / 16
.
move x% / 3 y% / 3
rect 0.4 0.4
.
.</lang>


=={{header|Elixir}}==
=={{header|Elixir}}==