aboutsummaryrefslogtreecommitdiff
path: root/src/input/coordsys.input.pamphlet
blob: af2f31298e55bfffc9d3dda7e3fd3521cab2344c (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
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input coordsys.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1994.
@
<<*>>=
<<license>>
-- test input for CoordinateSystems package
draw(sin(x),x=0.5..%pi,coordinates == bipolar(1$DFLOAT))
m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,0..2*%pi, 0..%pi,coordinates == bipolar(1$DFLOAT))

draw(surface(u*cos(v),u*sin(v),u),u=1..4,v=1..2*%pi,coordinates == bipolarCylindrical(1$DFLOAT))

--conical(a,b) maps a 3D point (lambda,mu,nu) to the rectangular coordinates:
--x = lambda*mu*nu/(a*b)
--y = lambda/a*sqrt((mu**2-a**2)*(nu**2-a**2)/(a**2-b**2))
--z = lambda/b*sqrt((mu**2-b**2)*(nu**2-b**2)/(b**2-a**2))
--NOTE:  There will be a division by zero error if a*b = 0, or a**2-b**2 = 0,
--     or if b**2-a**2 = 0. Also, the following relations must be true:
--       (mu**2-a**2)*(nu**2-a**2)/(a**2-b**2) > 0 and
--       (mu**2-b**2)*(nu**2-b**2)/(b**2-a**2) > 0.

j1(t:DFLOAT):DFLOAT == 4
j2(t:DFLOAT):DFLOAT == t
draw(curve(j1,j2,j2),-9..9,coordinates == cylindrical)

draw(sin(4*t/7),t=0..14*%pi,coordinates == elliptic(1$DFLOAT))
m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,0..2*%pi,0..%pi,coordinates == elliptic(1$DFLOAT))

U2:Vector Expression Integer := vector [0,0,1]
x(u,v) == beta(u) + v*delta(u)
beta u == vector [cos u, sin u, 0]
delta u == (cos(u/2)) * beta(u) + sin(u/2) * U2
vec := x(u,v)
draw(surface(vec.1,vec.2,vec.3),v=-0.5..0.5,u=0..2*%pi,coordinates == ellipticCylindrical(1$DFLOAT),var1Steps == 50,var2Steps == 50)

m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,-%pi/2..%pi/2,0..2*%pi,coordinates == oblateSpheroidal(1$DFLOAT))

h1(t:DFLOAT):DFLOAT == t
h2(t:DFLOAT):DFLOAT == 2
draw(curve(h1,h2),-3..3,coordinates == parabolic)
draw(surface(u*cos(v),u*sin(v),2*u),u=0..4,v=0..2*%pi,coordinates == parabolic)

draw(surface(u*cos(v),u*sin(v),v*cos(u)),u=0..4,v=0..2*%pi,coordinates == parabolicCylindrical)

draw(surface(u*cos(v),u*sin(v),u*v),u=0..4,v=0..2*%pi,coordinates==paraboloidal,var1Steps == 50, var2Steps == 50)

draw(sin(4*t/7),t=0..14*%pi,coordinates == polar)
m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,0..2*%pi, 0..%pi,coordinates == polar)

m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,-%pi/2..%pi/2,0..2*%pi,coordinates == prolateSpheroidal(1$DFLOAT))

m(u:DFLOAT,v:DFLOAT):DFLOAT == 1
draw(m,0..2*%pi,0..%pi,coordinates == spherical)

draw(surface(u*cos(v),u*sin(v),u),u=1..4,v=1..4*%pi,coordinates == toroidal(1$DFLOAT))


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