Debian Codegraph @

texmf-dist/doc/latex/lapdf/roundtri.tex

raw
1 % ---------------------------------------------------------------------------
2 % Rounded Triangles: x=a*exp(cos(t)), y =a*exp(sin(t))
3 % ---------------------------------------------------------------------------
4 \input preamble.tex
5
6 \Defdim(\a,1)
7 \newdimen\x
8 \newdimen\y
9
10 \def\Roundtriangle(#1,#2){
11 \def\Tx(##1,##2){\Cos(##1,\x) \Pow(2,\Np\x,##2) \Dmul(##2,\a)
12 ##2=#1##2}
13 \def\Ty(##1,##2){\Sin(##1,\y) \Pow(2,\Np\y,##2) \Dmul(##2,\a)
14 ##2=#2##2}
15 \Tplot(100)(0,6.2832) \Stroke}
16
17 % ---------------------------------------------------------------------------
18 \begin{document}
19
20 \begin{center}
21 {\Huge\bf{Rounded Triangles}}
22 \bigskip
23
24 \begin{lapdf}(18,18)(-9,-9)
25 \Lingrid(10)(1,2)(-9,9)(-9,9)
26 \Whiledim{\a<5}{
27 \Stepcol(0,23,2)
28 \Roundtriangle(+1,+1)
29 \Roundtriangle(-1,+1)
30 \Roundtriangle(-1,-1)
31 \Roundtriangle(+1,-1)
32 \Dadd(\a,0.5)}
33 \end{lapdf}
34
35 $x=a \cdot 2^{\cos t}$ \qquad $y=a \cdot 2^{\sin t}$
36 \end{center}
37 \end{document}