10 ! This program demonstrates the "locate" command (and the "frame" 20 ! command) by "locating" a user's plotting surface in a square in 30 ! in the center of the display - and plotting a lissajou pattern in 40 ! the square. (The phase and frequency of the sine function on the 50 ! "y" axis relative to the sine function on the "x" axis can be 60 ! adjusted by changing the "phase" and "rel_freq" variables. 70 ! 80 INTEGER NUMBER_SAMPLES 90 REAL angle,ANGLE_INCREMENT,PHASE,REL_FREQ 100 NUMBER_SAMPLES=300 @ ANGLE_INCREMENT=2*PI/100 @ PHASE=PI/6 @ REL_FREQ=3 110 ! 120 PEN 1 @ GCLEAR @ LINE TYPE 1 @ RAD 130 LOCATE 60,140,10,90 @ SCALE -1.1,1.1,-1.1,1.1 @ FRAME 140 ! 150 angle=0 160 MOVE SIN(angle),SIN(REL_FREQ*angle+PHASE) 170 FOR sample=1 TO NUMBER_SAMPLES 180 angle=angle+ANGLE_INCREMENT 190 DRAW SIN(angle),SIN(REL_FREQ*angle+PHASE) 200 NEXT sample 210 ! 220 END