summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lapdf/line.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/lapdf/line.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/lapdf/line.tex')
-rw-r--r--macros/latex/contrib/lapdf/line.tex45
1 files changed, 45 insertions, 0 deletions
diff --git a/macros/latex/contrib/lapdf/line.tex b/macros/latex/contrib/lapdf/line.tex
new file mode 100644
index 0000000000..2fd0f67ceb
--- /dev/null
+++ b/macros/latex/contrib/lapdf/line.tex
@@ -0,0 +1,45 @@
+\input preamble.tex
+
+\Defnum(\n,10)
+\Defdim(\m,0)
+\Defdim(\r,7)
+\newdimen\a
+\newdimen\x
+\newdimen\y
+
+% ---------------------------------------------------------------------------
+\begin{document}
+\unitlength1.25cm
+
+\begin{center}
+{\Huge\bf{Line}}
+\bigskip
+
+\begin{lapdf}(14,14)(-7,-7)
+ \Whiledim{\m<360}{\Rad(\Np\m,\a)
+ \Cos(\Np\a,\x) \Mul(\x,7)
+ \Sin(\Np\a,\y) \Mul(\y,7)
+ \Nextcol(0,23)
+ \Line(0,0)(\Np\x,\Np\y) \Stroke
+ \Dadd(\m,7.5)}
+\end{lapdf}
+\end{center}
+
+\newpage
+
+\begin{center}
+{\Huge\bf{Lineto}}
+\bigskip
+
+\begin{lapdf}(14,14)(-7,-7)
+ \Moveto(\Np\r,0)
+ \Whilenum{\n<1445}{\Rad(\n,\a)
+ \Cos(\Np\a,\x) \Dmul(\x,\r)
+ \Sin(\Np\a,\y) \Dmul(\y,\r)
+ \Nextcol(0,23)
+ \Lineto(\Np\x,\Np\y) \Stroke
+ \Moveto(\Np\x,\Np\y)
+ \Add(\n,10) \Dsub(\r,0.05)}
+\end{lapdf}
+\end{center}
+\end{document}