File: tekdemo2

package info (click to toggle)
brandy 1.23.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,268 kB
  • sloc: ansic: 39,421; makefile: 91; sh: 1
file content (32 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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)
PROCorigin(1024, 750)
xlow = -10
xhigh = 10
ylow = -10
yhigh = 10
depth = 8
xscale = 50
yscale = 20
c = -4000
:
FOR x = xlow TO xhigh
  PROCmove(xscale*(x+ylow), yscale*(ylow-x)+c/(x*x+ylow*ylow+depth))
  FOR y = ylow TO yhigh
    PROCdraw(xscale*(x+y), yscale*(y-x)+c/(x*x+y*y+depth))
  NEXT
NEXT
FOR y = ylow TO yhigh
  PROCmove(xscale*(xlow+y), yscale*(y-xlow)+c/(xlow*xlow+y*y+depth))
  FOR x = xlow TO xhigh
    PROCdraw(xscale*(x+y), yscale*(y-x)+c/(x*x+y*y+depth))
  NEXT
NEXT
PROCtekexit
END