SRC" PLASMA.4TH"
SRC" CONIO.4TH"
SRC" FPU.4TH"

: HLIN
  ROT ROT 1+ SWAP DO
    DUP I SWAP PLOT
  LOOP
  DROP
;
: VLIN
  ROT ROT 1+ SWAP DO
    DUP I PLOT
  LOOP
  DROP
;
: DRAWAXIS
  GR
  2 COLOR
  0 39 19 HLIN
  0 39 19 VLIN
;
: PLOTDONE
  KEY DROP
  TEXT
;
: PLOT OVER 40 U< OVER 40 U< AND IF _PLOT ELSE DROP THEN DROP ;

FPEXT XSCALE
FPCONSTPI 20 >FPINT FP/ XSCALE FPEXT!

FPEXT YSCALE
-20 >FPINT YSCALE FPEXT!

DEFER FUNC

: PLOTFUNC
  15 COLOR
  40 0 DO
    I DUP 19 - >FPINT XSCALE FPEXT@ FP*
    FUNC
    YSCALE FPEXT@ FP* FPINT> 19 +
    PLOT
  LOOP
;

' FPSIN IS FUNC
DRAWAXIS PLOTFUNC PLOTDONE

' FPCOS IS FUNC
DRAWAXIS PLOTFUNC PLOTDONE
