[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nifty II+ demo?



In article <4cddf5$3jh@lastactionhero.rs.itd.umich.edu> mcafee@umich.edu (Sean
McAfee) writes:
>[snip]
>So, can anyone suggest any II+ demos appropriate for this purpose?
>Programs available via FTP would be good, as well as descriptions of simple
>demos that I could program myself (eg. the "moire pattern" demo that comes
>on the 3.3 System Master, or the clock one I originally had in mind for the
>PET).  Heyyy, and come to think of it, there were a lot of good demos among
>the entries in the "One-Liners and Two-Liners" contest that Nibble magazine
>used to have for programs written in Applesoft BASIC, and I have dozens of
>back issues.  Cool!

Here are some two-liners that may be useful in your quest for small-but-
pretty demos.  I can pretty much guarantee that these have never appeared
in Nibble.

The first two can be thought of as "variations on a theme by Brian."  The
third is a neat-looking effect that I sort of stumbled across by accident.

(Hmm.  Maybe I should issue a "Top this!" challenge, and thereby start
the Great Comp.Sys.Apple2 Two-Liner Competition?)


 1  HGR :A =  RND (1) * 279:B =  RND (1) * 159:C =  RND (1) * 279:D =  RND
    (1) * 159:S% =  RND (1) * 4 + 2: FOR X = 0 TO 278 STEP S%: HCOLOR= 3:
    HPLOT X,0 TO A,B TO 278 - X,158 TO C,D TO X,0: HCOLOR= 0: HPLOT X + 1,0
    TO A,B TO 279 - X,158 TO C,D TO X + 1,0: NEXT : FOR X = 1 TO 1000: NEXT
    : GOTO 1
 2  REM By Neil Parker


 1  HGR :A =  RND (1) * 279:B =  RND (1) * 159:C =  RND (1) * 279:D =  RND
    (1) * 159:S% =  RND (1) * 4 + 2: FOR X = 0 TO 278 STEP S%: HCOLOR= 3:
    HPLOT X,0 TO A,B TO 278 - X,158 TO C,D TO X,0: HCOLOR= 0: HPLOT X + 1,0
    TO A,B TO 279 - X,158 TO C,D TO X + 1,0: NEXT 
 2  FOR Y = 158 TO 0 STEP  - S%: HCOLOR= 3: HPLOT 0,Y TO A,B TO 278,158 - Y
    TO C,D TO 0,Y: HCOLOR= 0: HPLOT 0,Y + 1 TO A,B TO 278,159 - Y TO C,D TO
    0,Y + 1: NEXT : FOR X = 1 TO 1000: NEXT : GOTO 1
 3  REM By Neil Parker


 1 I = 1: HGR : HCOLOR= 3:A = 140:B = 80: FOR R = 1 TO 80 STEP 8: GOSUB 2:
    NEXT : HGR2 : FOR R = 5 TO 80 STEP 8: GOSUB 2: NEXT : FOR X = 0 TO 13:
    READ Y: POKE 768 + X,Y: NEXT : CALL 768: DATA 173,84,192,234,234,234,234,
    173,85,192,234,76,0,3
 2 X = R:Y = Z:D = Z: FOR J = Z TO I:K = D - X:L = D + Y:M =  ABS (K) <
    ABS (L):N =  NOT M:X = X - M:Y = Y + N:D = K * M + L * N: HPLOT A + X,B
    + Y: HPLOT A + X,B - Y: HPLOT A - Y,B + X: HPLOT A + Y,B + X: HPLOT A -
    X,B + Y: HPLOT A - X,B - Y: HPLOT A + Y,B - X: HPLOT A - Y,B - X:J = X
    < Y: NEXT : RETURN 
 3  REM By Neil Parker
 4  REM On a IIGS, set the system speed to "slow"
 5  REM Takes a minute or so to set up
 6  REM Must press RESET to quit

               - Neil Parker
-- 
Neil Parker                       | No cute quote, no cute ASCII art, no cute
nparker@cie-2.uoregon.edu         | disclaimer, no deposit, no return....
nparker@cie.uoregon.edu           | (This space intentionally left blank:
http://cie-2.uoregon.edu/~nparker |                                           )