diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/lapdf/cycloid.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/lapdf/cycloid.tex | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lapdf/cycloid.tex b/Master/texmf-dist/doc/latex/lapdf/cycloid.tex new file mode 100644 index 00000000000..e868d76bede --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/cycloid.tex @@ -0,0 +1,61 @@ +\input preamble.tex + +\Defnum(\n,2) +\newdimen\x +\newdimen\y +\def\ds{\displaystyle} + +% ------------------------------------------------------------------------- +% 1. Epicycloid: +% x(t)=r/(n+1)*[n*cos(t)-cos(n*t)] +% y(t)=r/(n+1)*[n*sin(t)-sin(n*t)] +% ------------------------------------------------------------------------- +\def\Epicycloid(#1,#2){\Dset(\y,#2) \Dset(\x,#1) \Dadd(\x,1) \Ddiv(\y,\x) + \def\Tx(##1,##2){\Cos(##1,##2) ##2=#1##2 \Dset(\x,##1) \x=#1\x + \Cos(\Np\x,\x) \Sub(##2,\x) \Dmul(##2,\y)} + \def\Ty(##1,##2){\Sin(##1,##2) ##2=#1##2 \Dset(\x,##1) \x=#1\x + \Sin(\Np\x,\x) \Sub(##2,\x) \Dmul(##2,\y)} + \Tplot(200)(0,6.2832)} + +% ------------------------------------------------------------------------- +% 2. Hypocycloid: +% x(t)=r/(n+1)*[n*cos(t)+cos(n*t)] +% y(t)=r/(n+1)*[n*sin(t)-sin(n*t)] +% ------------------------------------------------------------------------- +\def\Hypocycloid(#1,#2){\Dset(\y,#2) \Dset(\x,#1) \Dadd(\x,1) \Ddiv(\y,\x) + \def\Tx(##1,##2){\Cos(##1,##2) ##2=#1##2 \Dset(\x,##1) \x=#1\x + \Cos(\Np\x,\x) \Add(##2,\x) \Dmul(##2,\y)} + \def\Ty(##1,##2){\Sin(##1,##2) ##2=#1##2 \Dset(\x,##1) \x=#1\x + \Sin(\Np\x,\x) \Sub(##2,\x) \Dmul(##2,\y)} + \Tplot(200)(0,6.2832)} + +% ------------------------------------------------------------------------- +\begin{document} +\unitlength1.5cm + +\begin{center} +{\Huge\bf{I. Epicycloids}} +\bigskip + +\begin{lapdf}(12,12)(-6,-6) + \Polgrid(1,2)(6) + \Whilenum{\n<7}{\Stepcol(0,23,4) \Epicycloid(\n,6) \Stroke \Add(\n,1)} +\end{lapdf} + +$x(t)=\frac{\ds r}{\ds{n+1}}[n\cos(t)-\cos(nt)]$ \qquad +$y(t)=\frac{\ds r}{\ds{n+1}}[n\sin(t)-\sin(nt)]$ +\newpage + +{\Huge\bf{II. Hypocycloids}} +\bigskip + +\begin{lapdf}(12,12)(-6,-6) + \Resetcol + \Polgrid(1,2)(6) + \Whilenum{\n<7}{\Stepcol(0,23,4) \Hypocycloid(\n,6) \Stroke \Add(\n,1)} +\end{lapdf} + +$x(t)=\frac{\ds r}{\ds{n+1}}[n\cos(t)+\cos(nt)]$ \qquad +$y(t)=\frac{\ds r}{\ds{n+1}}[n\sin(t)-\sin(nt)]$ +\end{center} +\end{document} |