// Classic animation program modified for fun
// Galileo, 02/2018
// Powered by Yabasic ;-)
clear screen
open window 500, 500
backcolor 0, 0, 0
clear window
color 200, 200, 0
pozx = 0
pozy = 0
do
rysuj()
wait 0.03
pozx = pozx + 2
pozy = pozy + 2
// clear window
loop
sub rysuj()
a = pozx / 99
b = pozy / 99
for x = -1 to 1
for y = -1 to 1
for z = -1 to 1
y2 = y
x2 = x * cos(a) - y2 * sin(a)
y3 = x * sin(a) + y2 * cos(a)
y2 = y3
y3 = y2 * cos(b) - z * sin(b)
z2 = y2 * sin(b) + z * cos(b)
sx = 250 + x2 * (z2 + 2) * 35
sy = 250 + y3 * (z2 + 2) * 35
size = (z2 + 2) * 5 : colorin = size * 8
color colorin, colorin, colorin
fill circle sx, sy, size
next z
next y
next x
end sub