Computer Science Canada growing shrinking circle

Author:  Paul [ Thu Dec 18, 2003 10:30 pm ]
Post subject:  growing shrinking circle

Im supposed to make this growing and shrinking circle, but when it shrinks, white stripes appear, is there anyway of doing this better?
 code: var xr, yr : int := 0 loop     xr := 0     yr := 0     for a : 1 .. 200         drawfilloval (maxx div 2, maxy div 2, xr, yr, black)         xr := xr + 1         yr := yr + 1         delay (15)     end for     for b : 1 .. 200         drawfilloval (maxx div 2, maxy div 2, xr, yr, black)         delay (15)         drawfilloval (maxx div 2, maxy div 2, xr, yr, white)         xr := xr - 1         yr := yr - 1     end for end loop
[/code]

Author:  arhamz [ Thu Dec 18, 2003 10:56 pm ]
Post subject:  here it is

Here this will do the trick ( added the View.Update technique )

 code: View.Set("offscreenonly") var xr, yr : int := 0 loop     xr := 0     yr := 0     for a : 1 .. 200         drawfilloval (maxx div 2, maxy div 2, xr, yr, black)         xr := xr + 1         yr := yr + 1         View.Update         delay (15)     end for     for b : 1 .. 200         drawfilloval (maxx div 2, maxy div 2, xr, yr, black)         View.Update         delay (15)         drawfilloval (maxx div 2, maxy div 2, xr, yr, white)         xr := xr - 1         yr := yr - 1     end for end loop

 Author: Paul [ Thu Dec 18, 2003 11:09 pm ] Post subject: thanx thanx alot

 Author: Andy [ Fri Dec 19, 2003 10:18 am ] Post subject: Just use recursion, DUH

 :