aboutsummaryrefslogtreecommitdiff
path: root/src/input/knot.input.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/input/knot.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/knot.input.pamphlet')
-rw-r--r--src/input/knot.input.pamphlet40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/input/knot.input.pamphlet b/src/input/knot.input.pamphlet
new file mode 100644
index 00000000..073e649d
--- /dev/null
+++ b/src/input/knot.input.pamphlet
@@ -0,0 +1,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}