aboutsummaryrefslogtreecommitdiff
path: root/src/input/matrox.input.pamphlet
blob: 1bfc66051c1fb1ed5e6ff48450a5e9bd3e18a1d7 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input matrox.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=
-- Screen setup for graphics demos for the matrox card screen width


--)lo clip grdef viewdef draw2d )update
--)lo grimage view2D )up


-- 2D things

   -- demo of adaptive plotting
--)cl all
--)r adaptive
-- these should be set already
setAdaptive true -- this is the default
viewDefaults()   -- ditto

--)r "/spad/graphics/oldInput/curl"
draw(curve(sin(t)*sin(2*t)*sin(3*t),sin(4*t)*sin(5*t)*sin(6*t)),t=0..2*pi())
curl1:=getGraph(c1:=%,1)

setAdaptive false
viewXPos 410
pointColor pastel yellow();
lineColor pastel blue();
--)r "/spad/graphics/oldInput/curl"
rc := range curl1
--draw2D(rc.xRange,rc.yRange,sin(t)*sin(2*t)*sin(3*t),sin(4*t)*sin(5*t)*sin(6*t),0..2*pi())
draw(curve(sin(t)*sin(2*t)*sin(3*t),sin(4*t)*sin(5*t)*sin(6*t)),t=0..2*pi(),[ranges([rc.0,rc.1])])
curl2:=getGraph(c2:=%,1)

curl:=viewport2D()
title(curl,"Adaptive vs Non-Adaptive")
putGraph(curl,curl1,1)
putGraph(curl,curl2,2)
key curl
curly:=makeViewport2D curl
key curly

resize(curly,368,428)
move(curly,905,588)

-- reset defaults
setAdaptive true
viewDefaults()

   -- implicit graphs
--pointColor pastel red()
--lineColor light blue()
--)r cart
--cart := %
--resize(cart,277,180)
--move(cart,600,483)

viewDefaults()


-- a few 3D things

--)r wiggle
--wiggle:=%
wiggle:=draw(cos(x*y),x=-3..3,y=-3..3)
move(wiggle,876,200)

--)r lumpy
--lumpy:=%
lumpy:=sin(2*x**2 + 3 * y**2)/(x**2 + y**2)
resize(lumpy,300,330)
move(lumpy,600,688)

--)r torus
--donut:=%
fcolor(x:SF):SF == x
--donut:=newdraw(sin t,cos t,0,fcolor,t=0..2*%pi)
donut:=draw(surface(sin t,cos t,0),fcolor,t=0..2*%pi)
resize(donut,374,180)
move(donut,900,0)

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