File: graphdemo

package info (click to toggle)
brandy 1.20~pre5-4
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,924 kB
  • sloc: ansic: 25,653; makefile: 222
file content (27 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (4)
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
REM NOTE: This program will only run using a version of the
REM interpreter that supports graphics.
:
MODE 27
ORIGIN 640, 512
xlow = -10
xhigh = 10
ylow = -10
yhigh = 10
depth = 10
xscale = 30
yscale = 12
c = -4000
:
FOR x = xlow TO xhigh
  MOVE xscale*(x+ylow), yscale*(ylow-x)+c/(x*x+ylow*ylow+depth)
  FOR y = ylow TO yhigh
    DRAW xscale*(x+y), yscale*(y-x)+c/(x*x+y*y+depth)
  NEXT
NEXT
FOR y = ylow TO yhigh
  MOVE xscale*(xlow+y), yscale*(y-xlow)+c/(xlow*xlow+y*y+depth)
  FOR x = xlow TO xhigh
    DRAW xscale*(x+y), yscale*(y-x)+c/(x*x+y*y+depth)
  NEXT
NEXT
END