Code archives/Graphics/Circle Madness
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
The first one I learned this on Q-Basic, or something like it. The second is a gradient circle. I will comment this soon. This is now on http://n8r2k.deviousbytes.com/. Graphics 800,600,16,2 SeedRnd MilliSecs() x = 399 y = 299 w = 3 l = 3 f = 1 While Not KeyHit(1) If l > 1000 Then x = 399 y = 299 w = 3 l = 3 EndIf Color Rand(0,255),Rand(0,255),Rand(0,255) Oval x,y,w,l,f f = 0 x = x - 1 y = y - 1 w = w + 2 l = l + 2 Wend | |||||
Graphics 800,600,16,2 SeedRnd MilliSecs() x = 399 y = 299 w = 3 l = 3 f = 1 r = 1 c = 1 While Not KeyHit(1) .Red If r >= 255 x = 399 y = 299 w = 3 l = 3 r = 255 c = -1 ElseIf r <= 0 x = 399 y = 299 w = 3 l = 3 r = 0 c = 1 EndIf Color r,0,0 Oval x,y,w,l,f f = 0 x = x - 1 y = y - 1 w = w + 2 l = l + 2 r = r + c Wend |
Comments
None.
Code Archives Forum