%%HP: T(3)A(D)F(.);
@ Lincoln Labs Logo, a Lissajous animation.
@ by Rob Steele
DIR
    GEN \<<
        @ Generates a list of graphic objects and stores them in IMAGES.
        @ Only run this once.  From then on, just run SHO.
        RCLF DEG
        0 'IMAGES' STO
        30 90 FOR i
            i 'Z' STO
            ERASE DRAW PICT RCL
        10 STEP @ (90-30)/10+1=7; change as required for other effects.
        7 \->LIST 'IMAGES' STO
        STOF
        1250 1 BEEP
    \>>

    SHO \<<
        @ Displays the graphic objects in IMAGES in rapid succession.
        IMAGES SIZE \-> n
        \<<
            ERASE { # 0h # 0h } PVIEW
            MEM DROP
            WHILE KEY NOT REPEAT
                1 n 1 - FOR i
                    PICT {  # 0h # 0h } 'IMAGES' i GET REPL
                NEXT
                n 2 FOR i
                    PICT {  # 0h # 0h } 'IMAGES' i GET REPL
                -1 STEP
            END
            DROP
        \>>
    \>>

    @ Definition of the lissajous.
    @ Set Z to zero to produce the Lincoln logo.
    EQ 'SIN(4*x+Z)+COS(3*x)*i'

    Z 0

    PPAR { (-3,-1) (3,1) { x 0 360 } 0 (10,10) PARAMETRIC Y }
    @ change resolution for special effects.

    IMAGES 0
END
