(FILECREATED "19-Feb-86 11:10:19" {ERIS}<LISPUSERS>KOTO>TRAJECTORY-FOLLOWER.;2 8079 changes to: (VARS TRAJECTORY-FOLLOWERCOMS) (FNS TRAJECTORY.FOLLOW TRAJECTORY.FOLLOWER.POINT TRAJECTORY.FOLLOWER.PUT TRAJECTORY.FOLLOWER.SETUP TRAJECTORY.FOLLOWER.TEST) previous date: "25-APR-83 17:28:48" {PHYLEX:PARC:XEROX}<LISP>INTERMEZZO>LISPUSERS>TRAJECTORY-FOLLOWER.;1) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT TRAJECTORY-FOLLOWERCOMS) (RPAQQ TRAJECTORY-FOLLOWERCOMS ((FNS TRAJECTORY.FOLLOW TRAJECTORY.FOLLOWER.POINT TRAJECTORY.FOLLOWER.PUT TRAJECTORY.FOLLOWER.SETUP TRAJECTORY.FOLLOWER.TEST TRAJECTORY.FOLLOWER.WRAPUP) (VARS (TRAJECTORY.FOLLOWER.POINTS)) (GLOBALVARS TRAJECTORY.FOLLOWER.COUNT TRAJECTORY.FOLLOWER.LAST.TIME TRAJECTORY.FOLLOWER.POINTER TRAJECTORY.FOLLOWER.POINTS TRAJECTORY.FOLLOWER.DELAY TRAJECTORY.FOLLOWER.DSP TRAJECTORY.FOLLOWER.BITMAP TRAJECTORY.FOLLOWER.HALF.WIDTH TRAJECTORY.FOLLOWER.HALF.HEIGHT TRAJECTORY.FOLLOWER.WIDTH TRAJECTORY.FOLLOWER.HEIGHT) (BITMAPS TRAJECTORY.FOLLOWER.DEFAULT.BITMAP TRAJECTORY.FOLLOWER.BALL TRAJECTORY.FOLLOWER.HORIZONTAL TRAJECTORY.FOLLOWER.VERTICAL) (P (FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES) READNUMBER)))) (DEFINEQ (TRAJECTORY.FOLLOW [LAMBDA (KNOTS CLOSED N DELAY BITMAP WINDOW) (* N.H.Briggs "19-Feb-86 11:01") (* DAHJr "22-APR-83 17:56") (PROG NIL (TRAJECTORY.FOLLOWER.SETUP (OR WINDOW (SCREENBITMAP)) N DELAY (OR BITMAP TRAJECTORY.FOLLOWER.BALL)) (DRAWCURVE KNOTS CLOSED (FUNCTION TRAJECTORY.FOLLOWER.POINT) NIL (OR WINDOW PROMPTWINDOW)) (TRAJECTORY.FOLLOWER.WRAPUP]) (TRAJECTORY.FOLLOWER.POINT [LAMBDA (X Y WINDOW) (* N.H.Briggs "19-Feb-86 10:49") (* DAHJr "19-APR-83 21:06") (if (IGREATERP (SETQ TRAJECTORY.FOLLOWER.POINTER (IPLUS TRAJECTORY.FOLLOWER.POINTER 2)) TRAJECTORY.FOLLOWER.COUNT) then (SETQ TRAJECTORY.FOLLOWER.POINTER 1)) (TRAJECTORY.FOLLOWER.PUT TRAJECTORY.FOLLOWER.POINTER) (if TRAJECTORY.FOLLOWER.DELAY then (DISMISS (IDIFFERENCE TRAJECTORY.FOLLOWER.DELAY (CLOCKDIFFERENCE TRAJECTORY.FOLLOWER.LAST.TIME))) (SETQ TRAJECTORY.FOLLOWER.LAST.TIME (CLOCK 0))) (if X then (SETA TRAJECTORY.FOLLOWER.POINTS TRAJECTORY.FOLLOWER.POINTER (FIXR X)) (SETA TRAJECTORY.FOLLOWER.POINTS (ADD1 TRAJECTORY.FOLLOWER.POINTER) (FIXR Y)) (TRAJECTORY.FOLLOWER.PUT TRAJECTORY.FOLLOWER.POINTER) else (SETA TRAJECTORY.FOLLOWER.POINTS TRAJECTORY.FOLLOWER.POINTER MAX.FIXP]) (TRAJECTORY.FOLLOWER.PUT [LAMBDA (POINTER) (* N.H.Briggs "19-Feb-86 11:05") (* DAHJr "19-APR-83 20:57") (PROG (X Y) (if (NOT (IEQP (SETQ X (ELT TRAJECTORY.FOLLOWER.POINTS POINTER)) MAX.FIXP)) then (SETQ Y (ELT TRAJECTORY.FOLLOWER.POINTS (ADD1 POINTER))) (BITBLT TRAJECTORY.FOLLOWER.BITMAP 0 0 TRAJECTORY.FOLLOWER.DSP (IDIFFERENCE X TRAJECTORY.FOLLOWER.HALF.WIDTH) (IDIFFERENCE Y TRAJECTORY.FOLLOWER.HALF.HEIGHT) TRAJECTORY.FOLLOWER.WIDTH TRAJECTORY.FOLLOWER.HEIGHT (QUOTE INPUT) (QUOTE INVERT]) (TRAJECTORY.FOLLOWER.SETUP [LAMBDA (DSP N DELAY BITMAP) (* N.H.Briggs "19-Feb-86 10:49") (* DAHJr "19-APR-83 21:05") (PROG ((REAL.N (OR N 100)) (REAL.BITMAP (OR BITMAP TRAJECTORY.FOLLOWER.DEFAULT.BITMAP))) (if (AND TRAJECTORY.FOLLOWER.POINTS (EQ (ITIMES REAL.N 2) (ARRAYSIZE TRAJECTORY.FOLLOWER.POINTS))) else (SETQ TRAJECTORY.FOLLOWER.POINTS (ARRAY (ITIMES REAL.N 2) (QUOTE FIXP) MAX.FIXP))) (SETQ TRAJECTORY.FOLLOWER.POINTER 1) (SETQ TRAJECTORY.FOLLOWER.COUNT REAL.N) (SETQ TRAJECTORY.FOLLOWER.DSP DSP) (SETQ TRAJECTORY.FOLLOWER.DELAY DELAY) (if DELAY then (SETQ TRAJECTORY.FOLLOWER.LAST.TIME (CLOCK 0))) (SETQ TRAJECTORY.FOLLOWER.BITMAP REAL.BITMAP) (SETQ TRAJECTORY.FOLLOWER.WIDTH (fetch (BITMAP BITMAPWIDTH) of REAL.BITMAP)) (SETQ TRAJECTORY.FOLLOWER.HEIGHT (fetch (BITMAP BITMAPHEIGHT) of REAL.BITMAP)) (SETQ TRAJECTORY.FOLLOWER.HALF.WIDTH (IQUOTIENT TRAJECTORY.FOLLOWER.WIDTH 2)) (SETQ TRAJECTORY.FOLLOWER.HALF.HEIGHT (IQUOTIENT TRAJECTORY.FOLLOWER.HEIGHT 2]) (TRAJECTORY.FOLLOWER.TEST [LAMBDA NIL (* N.H.Briggs "19-Feb-86 11:02") (* DAHJr "22-APR-83 16:17") (PROG (KNOTS N DELAY CLOSED BITMAP) (printout PROMPTWINDOW "Indicate knots on a trajectory; hold down left shift key on last point") [SETQ KNOTS (CONS (GETPOSITION) (collect (GETPOSITION) repeatuntil (KEYDOWNP (QUOTE LSHIFT] (SETQ N (RNUMBER "Indicate the number of points in the follower")) (SETQ DELAY (MAX 0 (RNUMBER "Indicate the delay per point (milliseconds)"))) (if (ZEROP DELAY) then (SETQ DELAY NIL)) [SETQ CLOSED (MENU (create MENU ITEMS ← (QUOTE (OPEN CLOSED] [SETQ BITMAP (MENU (create MENU ITEMS ← (QUOTE (("single point" NIL) ("A horizontal line" TRAJECTORY.FOLLOWER.HORIZONTAL) ("A vertical line" TRAJECTORY.FOLLOWER.VERTICAL) ("A ball" TRAJECTORY.FOLLOWER.BALL] (TRAJECTORY.FOLLOWER.SETUP (SCREENBITMAP) N DELAY BITMAP) (if (EQ CLOSED (QUOTE CLOSED)) then (until (KEYDOWNP (QUOTE LSHIFT)) do (DRAWCURVE KNOTS T (FUNCTION TRAJECTORY.FOLLOWER.POINT) NIL PROMPTWINDOW)) else (DRAWCURVE KNOTS NIL (FUNCTION TRAJECTORY.FOLLOWER.POINT) NIL PROMPTWINDOW)) (TRAJECTORY.FOLLOWER.WRAPUP]) (TRAJECTORY.FOLLOWER.WRAPUP [LAMBDA NIL (* DAHJr "19-APR-83 17:29") (for I to TRAJECTORY.FOLLOWER.COUNT do (TRAJECTORY.FOLLOWER.POINT]) ) (RPAQQ TRAJECTORY.FOLLOWER.POINTS NIL) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS TRAJECTORY.FOLLOWER.COUNT TRAJECTORY.FOLLOWER.LAST.TIME TRAJECTORY.FOLLOWER.POINTER TRAJECTORY.FOLLOWER.POINTS TRAJECTORY.FOLLOWER.DELAY TRAJECTORY.FOLLOWER.DSP TRAJECTORY.FOLLOWER.BITMAP TRAJECTORY.FOLLOWER.HALF.WIDTH TRAJECTORY.FOLLOWER.HALF.HEIGHT TRAJECTORY.FOLLOWER.WIDTH TRAJECTORY.FOLLOWER.HEIGHT) ) (RPAQ TRAJECTORY.FOLLOWER.DEFAULT.BITMAP (READBITMAP)) (1 1 "H@@@") (RPAQ TRAJECTORY.FOLLOWER.BALL (READBITMAP)) (21 21 "@AOL@@@@" "@COO@@@@" "@OOOH@@@" "AOOOL@@@" "COOON@@@" "GOOOO@@@" "GOOOO@@@" "GOOOOH@@" "OOOOOH@@" "OOOOOH@@" "OOOOOH@@" "OOOOOH@@" "GOOOOH@@" "GOOOO@@@" "GOOOO@@@" "COOON@@@" "COOON@@@" "AOOOL@@@" "@OOOH@@@" "@GOO@@@@" "@AOL@@@@") (RPAQ TRAJECTORY.FOLLOWER.HORIZONTAL (READBITMAP)) (18 1 "OOOOL@@@") (RPAQ TRAJECTORY.FOLLOWER.VERTICAL (READBITMAP)) (1 16 "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@" "H@@@") (FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES) READNUMBER) (PUTPROPS TRAJECTORY-FOLLOWER COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (1351 6909 (TRAJECTORY.FOLLOW 1361 . 1898) (TRAJECTORY.FOLLOWER.POINT 1900 . 2967) ( TRAJECTORY.FOLLOWER.PUT 2969 . 3699) (TRAJECTORY.FOLLOWER.SETUP 3701 . 5054) (TRAJECTORY.FOLLOWER.TEST 5056 . 6693) (TRAJECTORY.FOLLOWER.WRAPUP 6695 . 6907))))) STOP