%%HP: T(3)A(R)F(.);
@ Biorythm program by Mr. B. Scott "Scotty" Thompson (213) 539-3611 /-0397.
DIR
  BIO @ main program; just run it.  Default input is current date.
    \<< RCLF 6 FIX CLLCD ERASE "Enter Beginning Date\010   as MM.DDYYYY"
      "" INPUT DUP
      IF "" ==
      THEN DROP DATE \->STR
      END "Enter Ending Date\010   as MM.DDYYYY" "" INPUT DUP
      IF "" ==
      THEN DROP DATE \->STR
      END OBJ\-> SWAP OBJ\-> SWAP DUP2
      IFERR DDAYS
      THEN 4 DROPN 0 0 0
      END ABS 0 0 0 \-> FLG DB DE NOD PC EC IC
      \<< NOD 23 / FP 23 * 'PC' STO NOD 28 / FP 28 * 'EC' STO NOD 33 / FP 33
* 'IC' STO DEG { # 0h # 0h } PVIEW 0 360 XRNG -1.5 1.5 YRNG FUNCTION 'SIN(X)'
STEQ DRAW (0,0) (360,0) LINE (0,1.1) (360,1.1) LINE (0,-1.1) (360,-1.1) LINE
(0,0) (90,0) 90 11.5 PC - 11.5 / R\->C DUP ROT LINE DUP ROT LINE (180,0) 180
14 EC - 14 / R\->C DUP ROT LINE DUP ROT LINE (270,0) 270 16.5 IC - 16.5 /
R\->C DUP ROT LINE DUP ROT LINE (360,0) LINE PICT PICT (0,1.02381)
(360,-1.02381) SUB NEG (0,1.02381) SWAP REPL 1 FIX PICT "P:" PC \->STR + 1
\->GROB DUP SIZE DROP 2 / # 0h 2 \->LIST PX\->C RE NEG 90 + -1.3 R\->C SWAP
GXOR PICT "E:" EC + 1 \->GROB DUP SIZE DROP 2 / # 0h 2 \->LIST PX\->C RE NEG
180 + -1.3 R\->C SWAP GXOR PICT "I:" IC + \->STR 1 \->GROB DUP SIZE DROP 2 /
# 0h 2 \->LIST PX\->C RE NEG 270 + -1.3 R\->C SWAP GXOR PICT DB D\->STR "-"
+ DE D\->STR + " \GD " + STD NOD \->STR + 1 \->GROB DUP SIZE DROP 2 / # 0h 2
\->LIST PX\->C RE NEG 180 + 1.5 R\->C SWAP GXOR FLG STOF 0 WAIT DROP
      \>>
    \>>
  DROT
    \<< 1000000 * IP 100000000 +
    \>>
  D\->STR
    \<< DROT \->STR DUP 2 3 SUB "/" + SWAP DUP 4 5 SUB "/" + SWAP 6 9 SUB + +
    \>>
  EQ 'SIN(X)'
  PPAR { (0,-1.5) (360,1.5) X 0 (0,0) FUNCTION Y }
END
