include "sdl.inc"

SetDisplay 640,480,1
SetCaption "SDL BUBBLES"
single a,b,zx,zy,x,y,z,y2,x2,y3,x3,z2,sx,sy 

While Key(27)=0
ClsColor  0,0,200
zx = zx + 2
zy = zy + 2
a = zx / 99
b = zy / 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 = x2 * (z2 + 2) 
sy = y3 * (z2 + 2) 
Ellipse( sx*64+280, sy*42+200,(z2+2)*14,(z2+2)*10, 200,255,200 )
Next		
Next 		
Next 
Flip
SetFps 60
Wend
Ends