aboutsummaryrefslogtreecommitdiff
path: root/src/input/drawcurv.input.pamphlet
blob: b1a03a9454c09c20e0999cff4719322220272d71 (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
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input drawcurv.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>

)clear all
-- a circle

seg1 : SEG FRAC INT := -3/2..3/2
range1 : LIST SEG FRAC INT := [seg1,seg1]

draw(x**2 + y**2 = 1,x,y,range == range1,title == "Unit Circle")

-- ditto

seg2 : SEG FLOAT := -1.1..1.1
range2 : LIST SEG FLOAT := [seg2,seg2]

draw(x**2 + y**2 = 1,x,y,range == range2,title == "Unit Circle, 2nd Graph")

-- an ellipse

seg3 : SEG FRAC INT := -4..4
range3 : LIST SEG FRAC INT := [seg3,seg3]

draw(x**2/9 + y**2/4 = 1,x,y,range == range3,_
                             toScale == true,title == "Ellipse")

-- another ellipse

seg4 : SEG FRAC INT := -5..5
range4 : LIST SEG FRAC INT := [seg4,seg4]

draw(5*x**2 - 8*x*y + 5*y**2 = 9,x,y,range == range4)

-- a parabola

seg5a : SEG FRAC INT := -3..14
seg5b : SEG FRAC INT := -3..10
range5 : LIST SEG FRAC INT := [seg5a,seg5b]
draw(x**2 - 2*x*y + y**2 - x - 2 = 0,x,y,range == range5)

-- a hyperbola

draw(x**2/4 - y**2 = 1,x,y,range == range4)

-- an elliptic curve

seg6a : SEG FRAC INT := -2..2
seg6b : SEG FRAC INT := -2..1
range6 : LIST SEG FRAC INT := [seg6a,seg6b]

draw(y**2 + y = x**3 - x,x,y,range == range6)

-- ovals

seg7a : SEG FRAC INT := -8..8
seg7b : SEG FRAC INT := -4..4
range7 : LIST SEG FRAC INT := [seg7a,seg7b]

eq1 := (x**2 + y**2 + 5**2)**2 - (6**4 + 4*5**2*x**2) = 0
draw(eq1,x,y,range == range7,title == "Cassinian oval with one loop")

seg8a : SEG FRAC INT := -10..10
range8 : LIST SEG FRAC INT := [seg8a,seg7b]

eq2 := (x**2 + y**2 + 7**2)**2 - (6**4 + 4*7**2*x**2) = 0
draw(eq2,x,y,range == range8,title == "Cassinian oval with two loops")
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}