DEF f(x)=a*SIN(x)
LET x1=-4
LET x2= 4
LET y1=-4
LET y2= 4 
SET WINDOW x1,x2,y1,y2
ASK PIXEL SIZE(x1,y1; x2,y2) px,qx
LET px=px-1
LET py=py-1
DRAW grid
SET POINT STYLE 1
FOR a=x1 TO x2 STEP (x2-x1)/px
   LET x=1
   FOR n=1 TO 400
      LET x=f(x)
   NEXT n
   FOR n=401 TO 1000
      LET x=f(x)
      PLOT POINTS:a,x
   NEXT n
NEXT a
END




