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
|
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input knot.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>
)cl all
-- Create a (p,q) torus-knot with radius around the curve of r.
torusKnot(p,q,r) ==
a := 1
b := 1
ab := a+b
fac := 2*ab/(1.1*ab-sin(q*t))
Title := concat("Torus Knot of Type (", concat(p::String,
concat(",", concat(q::String, ")"))))
Curve := curve(a*fac*cos(p*t), a*fac*sin(p*t), b*fac*cos(q*t))
r = 0 => draw(Curve, t=0..2*%pi, title == Title)
draw(Curve, t=0..2*%pi, tubeRadius == r, title == Title)
torusKnot(2, 3, 0.3)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
|