diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/lapdf/buttrfly.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/lapdf/buttrfly.tex | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lapdf/buttrfly.tex b/Master/texmf-dist/doc/latex/lapdf/buttrfly.tex new file mode 100644 index 00000000000..df8ea18e6d6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/buttrfly.tex @@ -0,0 +1,31 @@ +% --------------------------------------------------------------------------- +% The butterfly curve is defined by the equation: +% r=exp(cos(a))-2*cos(4*a)+sin^5(a/n). (we use n = 14) +% --------------------------------------------------------------------------- +\input preamble.tex + +\Defnum(\n,0) +\newcount\m +\newdimen\x +\newdimen\y +\newdimen\z + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{The Butterfly Curve}} +\bigskip + +\begin{lapdf}(16,16)(-7,-8) + \col=6 + \def\Px(#1,#2){\Dset(\x,#1) \y=4\x \z=0.0714\x + \Cos(\Np\x,\x) \Exp(\Np\x,#2) \Cos(\Np\y,\y) \Mul(\y,2) + \Sin(\Np\z,\z) \Pot(\Np\z,5,\z) \Sub(#2,\y) \Add(#2,\z) #2=2.2#2} + + \Whilenum{\n<24}{% + \m=\n \Add(\m,1) \Stepcol(0,23, 2) \Pplot(100)(\n,\m) \Stroke \Add(\n,1)} +\end{lapdf} + +$r(\phi)=exp(\cos(\phi))-2cos(4\phi)+sin^5(\phi/14)$ +\end{center} +\end{document} |