XEROX TRAJECTORY-FOLLOWER 2 4 1 Trajectory-Follower 1 4 By: D. Austin Henderson, Jr. (AHenderson.pa@Xerox.com) INTRODUCTION Trajectory-Follower provides a function which causes a "snake" to crawl along a trajectory. Comments on both interface and functionality are welcomed. FUNCTIONS (TRAJECTORY.FOLLOW KNOTS CLOSED N DELAY BITMAP WINDOW) [Function] The trajectory is specified by KNOTS (a set of knots) and CLOSED (a flag indicating whether it is an open or closed curve). N is the length of the snake in points along the curve. DELAY is the time (in milliseconds) between each move along the curve; DELAY = 0 or NIL means go as fast as you can. BITMAP is the brush to be used at each point in creating the snake. WINDOW is the window in whose coordinate system the knots are given and in which the snake is to be drawn; if NIL, then the SCREEN bitmap is used. The snake is moved by INVERTing the bitmap at the points along the curve, and then INVERTing the bitmap back out again. Examples A demonstration function is also provided with the package: (TRAJECTORY.FOLLOWER.TEST) [Function] Interacts with the user through prompting in the promptwindow to gather up arguments for TRAJECTORY.FOLLOW and then carries it out. Closed curves are snaked around repeatedly until the left shift key is found depressed when it reaches the curve's starting point. Internal Functions The internal functions used by this package are also available for use. They are: (TRAJECTORY.FOLLOWER.SETUP WINDOW N DELAY BITMAP) [Function] Initializes drawing variables. (TRAJECTORY.FOLLOWER.POINT X Y WINDOW) [Function] Defines the next point on the curve. Note that the argument structure of this function is appropriate for use as a BRUSH with the curve drawing functions DRAWCURVE, DRAWCIRCLE, and DRAWELLIPSE. (For an example, see the demonstration function TRAJECTORY.FOLLOWER.TEST) (TRAJECTORY.FOLLOWER.WRAPUP) [Function] Finishes the job after all the points have been defined. (LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È1È È(ŠŠ8(È (ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN 8 ™ " <7B)> <&S   (9ºXzº