summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lapdf/roundtri.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/lapdf/roundtri.tex')
-rw-r--r--macros/latex/contrib/lapdf/roundtri.tex37
1 files changed, 37 insertions, 0 deletions
diff --git a/macros/latex/contrib/lapdf/roundtri.tex b/macros/latex/contrib/lapdf/roundtri.tex
new file mode 100644
index 0000000000..9d38ee35f0
--- /dev/null
+++ b/macros/latex/contrib/lapdf/roundtri.tex
@@ -0,0 +1,37 @@
+% ---------------------------------------------------------------------------
+% Rounded Triangles: x=a*exp(cos(t)), y =a*exp(sin(t))
+% ---------------------------------------------------------------------------
+\input preamble.tex
+
+\Defdim(\a,1)
+\newdimen\x
+\newdimen\y
+
+\def\Roundtriangle(#1,#2){
+ \def\Tx(##1,##2){\Cos(##1,\x) \Pow(2,\Np\x,##2) \Dmul(##2,\a)
+ ##2=#1##2}
+ \def\Ty(##1,##2){\Sin(##1,\y) \Pow(2,\Np\y,##2) \Dmul(##2,\a)
+ ##2=#2##2}
+ \Tplot(100)(0,6.2832) \Stroke}
+
+% ---------------------------------------------------------------------------
+\begin{document}
+
+\begin{center}
+{\Huge\bf{Rounded Triangles}}
+\bigskip
+
+\begin{lapdf}(18,18)(-9,-9)
+ \Lingrid(10)(1,2)(-9,9)(-9,9)
+ \Whiledim{\a<5}{
+ \Stepcol(0,23,2)
+ \Roundtriangle(+1,+1)
+ \Roundtriangle(-1,+1)
+ \Roundtriangle(-1,-1)
+ \Roundtriangle(+1,-1)
+ \Dadd(\a,0.5)}
+\end{lapdf}
+
+$x=a \cdot 2^{\cos t}$ \qquad $y=a \cdot 2^{\sin t}$
+\end{center}
+\end{document}