uses gdip 

Screen 300,330,1
SetCaption "NEWTON"
SetSmoothMode 2
sys font = LoadFont ("verdana",38)

single yacc=.98, yvel=-10, xvel=10, x=20, y=100, r=40

While Key(27)=0
ClsColor 55,0,0,255
yvel = yvel + yacc
y = y + yvel
x = x + xvel
iF  y >289 
yvel = -0.9 * yvel 
y =289 
xvel = xvel * 0.9 
End iF
iF x >285 
xvel = -xvel
x =285 
End iF
iF x<10 
xvel = -xvel 
x = 10 
End iF
FillOval x, y, r,r, ARGB 155,255,255,255
iF xvel * xvel <0.0001 Then Exit While 
Flip
SetFps 24
Wend
Text font,20,100,"HIT ESCAPE", ARGB 155,255,0,55
WaitKey(27)
Ends