>From: rsteele@XN.LL.MIT.EDU (Rob Steele) Newsgroups: comp.sys.handhelds Subject: HP-48 Movie Date: 15 Mar 90 21:50:41 GMT Reply-To: rsteele@LL-XN.ARPA.ll.mit.edu (Rob Steele) Organization: MIT Lincoln Laboratory The following code plots a series of lissajous and animates them. It is possible to see the resulting figure in about eleventy- two different ways: cylindrical or flat, rotating or oscillating about a horizontal or vertical axis, moving toward you or away, moving to the left or to the right, or just wobbling. I call the program LLL for Lincoln Lab Lissajous since the lissajous is our logo. To work it, download or enter it and press the GEN button. It will run for a few minutes and beep when it's through. Then press the SHO button and watch. Finally, press any key to quit. If you have trouble seeing the image in different ways, try focusing on a single intersection in the plot as it moves. Pretend that the point is in front as it moves in one direction and in back when it goes the opposite way. Once you get that to work, reverse directions. Rob Steele rsteele@xn.ll.mit.edu %%HP: T(3)A(D)F(.); @ Lincoln Labs Logo, a Lissajous animation. 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