aboutsummaryrefslogtreecommitdiff
path: root/src/input/images3a.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/images3a.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/images3a.input.pamphlet')
-rw-r--r--src/input/images3a.input.pamphlet57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/input/images3a.input.pamphlet b/src/input/images3a.input.pamphlet
new file mode 100644
index 00000000..ff6d6741
--- /dev/null
+++ b/src/input/images3a.input.pamphlet
@@ -0,0 +1,57 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input images3a.input}
+\author{The Axiom Team}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{License}
+<<license>>=
+--Copyright The Numerical Algorithms Group Limited 1994-1996.
+@
+<<*>>=
+<<license>>
+
+-- Create a (p,q) torus-knot with radius r around the curve.
+-- The formula was derived by Larry Lambe.
+
+-- To produce a trefoil knot:
+-- torusKnot(2, 3, 0.5, 10, 200)
+
+-- compile, don't interpret functions
+)set function compile on
+
+-- read in the numeric generalized tube program
+)read ntube
+
+-- Create a (p,q) torus-knot with radius r around the curve.
+-- The formula was derived by Larry Lambe.
+-- To produce a trefoil knot:
+-- torusKnot(2, 3, 0.5)
+torusKnot(p:DFLOAT, q:DFLOAT, r:DFLOAT, uSteps:PI, tSteps:PI):VIEW3D ==
+ -- equation for the torus knot
+ knot := (t:DFLOAT):Point DFLOAT +->
+ fac := 4/(2.2@DFLOAT-sin(q*t))
+ fac * point [cos(p*t), sin(p*t), cos(q*t)]
+ -- equation for the cross section of the tube
+ circle := (u:DFLOAT, t:DFLOAT):Point DFLOAT +->
+ r * point [cos u, sin u]
+ -- draw the tube around the knot
+ ntubeDrawOpt(knot, circle, 0..2*%pi, 0..2*%pi, var1Steps == uSteps,
+ var2Steps == tSteps)
+
+
+
+-- draw a seris of unfolding torus knots
+
+for i in 0..4 repeat torusKnot(2, 2 + i/4, 0.5, 25, 250)
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}