'=========================================================================== ' Subject: EYE PLOT Date: 12-14-98 (14:35) ' Author: Dave Navarro, Jr. Code: QB, QBasic, PDS ' Origin: dave@powerbasic.com Packet: GRAPHICS.ABC '=========================================================================== 'Eye Plot 'From "Microcomputer Graphics Techniques and Applications" by Donald Heard 'ported to PB by Dave Navarro (dave@powerbasic.com) SCREEN 7 FOR I = -3.2 TO 3.05 STEP .05 GOSUB DOPLOT NEXT I = -3.2 GOSUB DOPLOT C = 10 DO SLEEP .05 FOR I = -3.2 TO 3.05 STEP .05 J = SIN(I) * 25 K = COS(I) * 23 L = SIN(I+.8) * 25 M = COS(I+.8) * 23 LINE (159-J, 99-K) - (159+L, 99+M), C IF LEN(INKEY$) THEN EXIT DO END IF NEXT C = C + 1 IF C = 15 THEN C = 1 LOOP END DOPLOT: X = SIN(I) * 105 Y = COS(I) * 90 A = SIN(I+.6) * 105 B = COS(I+.6) * 90 J = SIN(I) * 25 K = COS(I) * 23 L = SIN(I+.8) * 25 M = COS(I+.8) * 23 LINE (159-X, 99-Y) - (159+A, 99+B) LINE (159-J, 99-K) - (159+L, 99+M), 9 IF D THEN LINE (159-X, 99-Y) - (159 - D, 99 - E) LINE (159+A, 99+B) - (159 + F, 99 + G) END IF D = X E = Y F = A G = B RETURN