'=========================================================================== ' Subject: NICE GRADIENT FILL ROUTINE Date: 06-23-99 (09:42) ' Author: Eric Sonne Code: QB, QBasic, PDS ' Origin: www.karland.com/code/basic/ Packet: GRAPHICS.ABC '=========================================================================== ' GFILL.BAS ' by Eric Sonne ' http://www.thrillhaus.com/ ' Generates clouds/gradient DEFINT A-Z RANDOMIZE TIMER SCREEN 13 CONST S = 5 CONST A = 2 FOR X = 16 TO 64 OUT &H3C8, X OUT &H3C9, X - 1 OUT &H3C9, 0 OUT &H3C9, 0 NEXT PSET (0, 0), INT(RND * 48) + 16 FOR X = 1 TO 319 CLR = POINT(X - 1, 0) CLR = CLR + (INT(RND * S) - A) IF CLR < 16 THEN CLR = 16 IF CLR > 64 THEN CLR = 64 PSET (X, 0), CLR NEXT FOR Y = 1 TO 199 CLR = POINT(0, Y - 1) CLR = CLR + (INT(RND * S) - A) IF CLR < 16 THEN CLR = 16 IF CLR > 64 THEN CLR = 64 PSET (0, Y), CLR NEXT FOR Y = 1 TO 199 CLR = POINT(319, Y - 1) CLR = CLR + (INT(RND * S) - A) IF CLR < 16 THEN CLR = 16 IF CLR > 64 THEN CLR = 64 PSET (319, Y), CLR NEXT FOR Y = 1 TO 199 FOR X = 1 TO 318 IF INKEY$ <> "" THEN END CLR = (POINT(X, Y - 1) + POINT(X - 1, Y) + POINT(X - 1, Y - 1) + POINT(X + 1, Y - 1)) / 4 CLR = CLR + (INT(RND * S) - A) IF CLR < 16 THEN CLR = 16 IF CLR > 64 THEN CLR = 64 PSET (X, Y), CLR NEXT NEXT