REM NOTE: This program will ONLY run in an xterm window under NetBSD and Linux.
REM
REM It uses the Tektronics graphics terminal emulation that xterm provides
REM to draw a simple graph in the xterm 'Tek' window.
:
LIBRARY"examples/teklib"
PROCtekinit
PROCmode(0)
R%=2500
H%=R%/2
REM rotated towards viewer by:
R=-PI/4
U=COS(R):V=SIN(R)
PROCP(4,0)
FORI%=1TOR%
PROCP(5,I%)
NEXT
PROCtekexit
END
DEFPROCP(C%,S%)
T=PI*(S%-H%)/R%
C=COS(T)
X=COS(50*T)*C
Z=SIN(50*T)*C
Y=SIN(T)
W=Y*U+Z*V
Z=-Y*V+Z*U
Y=W
P=3500/(8-Z)
IFC%=4 THEN PROCmove(1024+X*P,768+Y*P) ELSE PROCdraw(1024+X*P,768+Y*P)
ENDPROC
