Mandelbrot set: Difference between revisions

m (→‎{{header|Raku}}: use "raku" for syntax highlight)
Line 5,228:
 
<syntaxhighlight lang="easylang">
# Mandelbrot
#
res = 4
maxiter = 200
Line 5,244 ⟶ 5,246:
textsize 2
#
fastprocfastfunc iter cx cy . itmaxiter .
while xx + yy < 4 and it >< 0maxiter
y = 2 * x * y + cy
x = xx - yy + cx
xx = x * x
yy = y * y
it -+= 1
.
return it
.
proc draw . .
Line 5,259 ⟶ 5,262:
for scr_x = 0 to 2 * mid - 1
cx = (scr_x - center_x) / scale
it = iter cx cy maxiter
callif iterit cx< cy itmaxiter
if it > 0
it = maxiter - it
color3 it / 20 it / 100 it / 150
move scr_x / res scr_y / res
Line 5,288 ⟶ 5,289:
scale /= 4
.
call draw
.
call draw
</syntaxhighlight>
 
2,083

edits