Data update

This commit is contained in:
Ingy döt Net 2023-07-01 19:04:33 -04:00
parent 8f05c7136f
commit 0bf4da02c3
82 changed files with 2194 additions and 118 deletions

View file

@ -1,19 +1,51 @@
for y0 = 0 to 299
cy = (y0 - 150) / 120
for x0 = 0 to 299
cx = (x0 - 220) / 120
x = 0 ; y = 0 ; iter = 0
while iter < 64 and x * x + y * y < 4
h = x * x - y * y + cx
y = 2 * x * y + cy
x = h
iter += 1
.
if iter = 64
iter = 0
.
color3 iter / 16 0 0
move x0 / 3 y0 / 3
rect 0.4 0.4
.
center_x = 220
center_y = 150
scale = 150
background 000
textsize 2
#
proc draw . .
clear
for scr_y = 0 to 299
cy = (scr_y - center_y) / scale
for scr_x = 0 to 299
cx = (scr_x - center_x) / scale
x = 0 ; y = 0 ; iter = 0
repeat
xx = x * x
yy = y * y
until xx + yy >= 4 or iter = 128
h = xx - yy + cx
y = 2 * x * y + cy
x = h
iter += 1
.
if iter < 128
color3 iter / 32 iter / 128 0
move scr_x / 3 scr_y / 3
rect 0.4 0.4
.
.
.
color 990
move 1 1
text "Short press to zoom in, long to zoom out"
.
on mouse_down
time0 = systime
.
on mouse_up
center_x += 150 - mouse_x * 3
center_y += 150 - mouse_y * 3
if systime - time0 < 0.3
center_x -= 150 - center_x
center_y -= 150 - center_y
scale *= 2
else
center_x += (150 - center_x) / 2
center_y += (150 - center_y) / 2
scale /= 2
.
call draw
.
call draw