<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\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&lt;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&lt;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}
</pre></body></html>