aboutsummaryrefslogtreecommitdiff
path: root/src/input/draw2dSF.input.pamphlet
blob: 93836dbdde9d27fcaee14ad62bd12a6d35a320df (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input draw2dSF.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1994.
@
<<*>>=
<<license>>
)clear all

--open a file for input

drawList(lp:List Point DoubleFloat):VIEW2D ==
  n := #lp
  g := graphImage()$GRIMAGE
  for p in lp repeat
    component(g,p,pointColorDefault(),lineColorDefault(),pointSizeDefault())
  gi := makeGraphImage(g)$GRIMAGE
  makeViewport2D(gi,[title("Points")])$VIEW2D

readTheFile(filename,numberOfPoints) ==
  filenew:FILE(DoubleFloat):=open(filename,"input")
  llp:=[point([read!(filenew),read!(filenew)])$Point(DoubleFloat)
          for i in 1..numberOfPoints]

-- first we read the file of x, y data
-- we cheat to get at the AXIOM variable
axiom:=string getEnv("AXIOM")$Lisp
pts:=readTheFile(axiom "/../../src/input/draw2dSF.data",1024)

-- then we plot the points
drawList(pts)





@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}