diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-04 16:35:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-04 16:35:48 +0000 |
commit | 60b4ec6f2bf1ba57aa206b2ac46c454d75f3bf93 (patch) | |
tree | cbf61d6f8bd4a2c6ff62d5e7940e22c352757cfa /Master/texmf-dist/doc/latex/lapdf/qcircle.tex | |
parent | d422465c9efb44dd32ba6a50f6ef9879bce018be (diff) |
lapdf is back (2sep11)
git-svn-id: svn://tug.org/texlive/trunk@23806 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/lapdf/qcircle.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/lapdf/qcircle.tex | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lapdf/qcircle.tex b/Master/texmf-dist/doc/latex/lapdf/qcircle.tex new file mode 100644 index 00000000000..feea113e0a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/qcircle.tex @@ -0,0 +1,50 @@ +\input preamble.tex + +\Defdim(\r,0) +\newdimen\rr \newdimen\rx \newdimen\ry \newdimen\rz +\newdimen\ax \newdimen\ay \newdimen\bx \newdimen\by +\newdimen\cx \newdimen\cy \newdimen\dx \newdimen\dy +\newdimen\ex \newdimen\ey \newdimen\fx \newdimen\fy + +\def\Qcircle(#1)(#2,#3,#4){% + \Dset(\rr,#4) + \Dset(\rx,#4) \Mul(\rx,2) + \Dset(\ry,#4) \Mul(\ry,3) + \Dset(\rz,#4) \Mul(\rz,4) + \Dset(\ax,#2) \Dset(\ay,#3) \Add(\ay,\rr) + \Dset(\bx,#2) \Dset(\by,#3) \Add(\bx,\rz) \Add(\by,\rr) + \Dset(\cx,#2) \Dset(\cy,#3) \Add(\cx,\rx) \Sub(\cy,\ry) + \Dset(\dx,#2) \Dset(\dy,#3) \Sub(\dx,\rx) \Sub(\dy,\ry) + \Dset(\ex,#2) \Dset(\ey,#3) \Sub(\ex,\rz) \Add(\ey,\rr) + \Dset(\fx,#2) \Dset(\fy,#3) \Add(\fy,\rr) + \Rcurve(#1)(\Np\ax,\Np\ay,5)(\Np\bx,\Np\by,1)(\Np\cx,\Np\cy,1) + (\Np\dx,\Np\dy,1)(\Np\ex,\Np\ey,1)(\Np\fx,\Np\fy,5)} + +\def\ba{\left(\begin{array}{c}} \def\ea{\end{array}\right)} + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge\bf{Quintic Circles}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Whiledim{\r<8}{\Dadd(\r,0.5) \Nextcol(0,23) \Qcircle(128)(0,0,\Np\r) + \Stroke} +\end{lapdf} +\end{center} + +You can draw a full circle with one rational quintic Bezier curve. This is +the lowest possible Bezier degree to do this. These are the control points +for a circle at $(x,y)$ with radius $r$ (the third components are the +weights): +\parskip0.1cm +\begin{center} +$P_0=\ba x \\y+r \\5 \ea$, +$P_1=\ba x+4r\\y+r \\1 \ea$, +$P_2=\ba x+2r\\y-3r\\1 \ea$, +$P_3=\ba x-2r\\y-3r\\1 \ea$, +$P_4=\ba x-4r\\y+r \\1 \ea$, +$P_5=\ba x \\y+r \\5 \ea$. +\end{center} +\end{document} |