aboutsummaryrefslogtreecommitdiff
path: root/src/input/knot2.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/knot2.input.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/input/knot2.input.pamphlet')
-rw-r--r--src/input/knot2.input.pamphlet46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/input/knot2.input.pamphlet b/src/input/knot2.input.pamphlet
new file mode 100644
index 00000000..17c24b7c
--- /dev/null
+++ b/src/input/knot2.input.pamphlet
@@ -0,0 +1,46 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input knot2.input}
+\author{The Axiom Team}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+<<*>>=
+)cl all
+
+-- see how long this all takes
+)set messages time on
+
+-- this is the color function, nothing elaborate for now
+f(x:SF):SF == x
+
+--------------------------------------------------------------
+-- Creation of the knot!!! --
+-- only p/q is really used, but p and q correspond to --
+-- the factors in the notes deriving these knotty things --
+-- see the notes for detail...too involved to explain here --
+--------------------------------------------------------------
+
+[p,q] := [3,5]
+PQ := p/q
+
+l := lcm(p, q) quo p
+maxRange := (odd? l => l * %pi::SF; 2 * l * %pi::SF)
+theRange := 0..maxRange
+
+-- create the knot
+knot:TUBE := tubePlot(sin t * cos(PQ*t),cos t * cos(PQ*t),cos t * sin(PQ*t),
+ f, theRange, 0.1::SF, 6, "open" )
+
+-- make a viewport out of it
+makeViewport3D(knot, concat ["knot",p::String,q::String])$VIEW3D
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}