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 | |
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')
77 files changed, 3795 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/lapdf/README b/Master/texmf-dist/doc/latex/lapdf/README new file mode 100644 index 00000000000..c24ae48be6b --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/README @@ -0,0 +1,156 @@ +Lapdf +----- +This is a short introduction for the Lapdf style. It has many instructive example +files to show the usage of this macro package. I hope, this style helps you to +produce nice graphics with the pdfTeX engine. + +This package is distributed under the GNU general pupblic licence (GPL) and it's +free to use by everyone. + + +What is it? +----------- +Lapdf needs pdfTeX and the calc style, which is included in the LaTeX tools +folder as standard package. Lapdf is a drawing environment like the standard +LaTeX picture environment. So you can design you graphic from within the LaTeX +document. Lapdf uses pdfTeX to calculate everything and native PDF commands for +drawing everything. It lets you also put typesetted text into the graphic, which +is sometimes rather complicated in other packages. + +Additionally to all the PDF drawing commands, Lapdf has a unique set of it's own +drawing primitives and other macros. Here is a list: + +Math functions: These macros are used internally, but they can be also used in + your own drawings. + Sin, Cos, Tan, Asin, Acos, Atan, Sinh, Cosh, Tanh, Asinh, + Acosh, Atanh, Exp, Pow, Ln, Log, Pot, Root, Sqrt, Abs, Sig, + Mod, Len, Hypot, Direc, Rotpoint + +Loop macros: There are two looping macros for repeating tasks: + - Whilenum{condition}{commands} + - Whiledim{condition}{commands} + +PDF commands: These are the available PDF drawing primitives. I used my own + names, which differ only a bit from the original names: + - Gsave + - Grestore + - Setclip + - Stroke + - Closepath + - Setwidth + - Setcap + - Setjoin + - Setflat + - Setmiter + - Setdash + - Bezier + - Concat + - Translate + - Scale + - Rotate + - Rect + +Typesetting: You can typeset text at position with direction with: + - Text + +Drawing macros: Lapdf fully supports color without the need of any style file. Color + usage is specified as an option [black | color] in the preamble: + - Setcol + - Setgray + For repreated color changes (especially in loops) there are 96 + rainbow colors defined, wich can be used with these macros: + - Stepcol + - Nextcol + - Resetcol + Here are the standard drawing primitives: + - Moveto + - Lineto + - Line + - Polygon + - Vecto + - Vect + - Vpolygon + - Rectangle + - Triangle + - Epolygon + - Circle + - Point + - Ellipse + - Arc + - Sector + - Arcto + - Fill + - Gfill + - Sfill + These are special Bezier curve additions, which are unique. Lapdf + lets you draw integral and also rational Bezier curves up to a + degree of seven. + - Curveto + - Curve + - Rmoveto + - Rcurveto + - Rcurve + - Quadratic + - Cubic + There are 5 kinds of grids availabe: + - Lingrid + - Logxgrid + - Logygrid + - Logxygrid + - Polgrid + You can plot functions in three different ways: normal functions, + parameter functions, polar functions with these commands: + - Fplot + - Tplot + - Pplot + Additionally you can plot polynoms (degree <= 3) directly and also + Tangents: + - Polynom + - Tangent + For special tasks you can also compute polynom values, derivatives, + partial and total derivatives: + - Fpoly + - Dpoly + - Df + - Dtx + - Dty + - Dtt + - Dpx + - Dpy + - Dpt + Some macros are useful shortcuts, like these: + - Thick + - Thin + - Dash + - Black + - Dred + - Dgreen + - Dblue + - Dcyan + - Dmagenta + - Dyellow + - Dgray + - Gray + - Red + - Green + - Blue + - Cyan + - Magenta + - Yellow + - White + +Documentation: +-------------- +There are several additional info files, which help you to use this package. I'm +still working on the documentation, but the intro chapter completed. This Lapdf +docs will be completed as soon as possible. The package itself will also be +updated regularly. If you find errors or have any suggestions for improvements, +please let me know. + +I wish you happy Texing with Lapdf! + +Detlef Reimers + +--------------------------------------------------------------------------------- +(Email: detlefreimers@gmx.de; Web: http://detlefreimers.de) + diff --git a/Master/texmf-dist/doc/latex/lapdf/arcs.pdf b/Master/texmf-dist/doc/latex/lapdf/arcs.pdf Binary files differnew file mode 100644 index 00000000000..4030453bb70 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/arcs.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/arcs.tex b/Master/texmf-dist/doc/latex/lapdf/arcs.tex new file mode 100644 index 00000000000..e61adb9efee --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/arcs.tex @@ -0,0 +1,162 @@ +\input preamble.tex + +\Defnum(\a,-100) +\Defnum(\b,20) +\Defnum(\n,5) +\Defdim(\r,1) + +% -------------------------------------------------------------------------- +\begin{document} +\unitlength1.125cm + +\begin{center} +{\Huge\bf{I. Arc}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Whilenum{\b<380}{\Stepcol(0,23,4) + \Arc(\n)(0,0)(\a,\b)(\Np\r) \Stroke + \Dadd(\r,0.35) \Sub(\a,10) \Add(\b,20) \Add(\n,5)} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{II. Sector}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Resetcol + \Whilenum{\b<380}{\Stepcol(0,23,4) + \Sector(\n)(0,0)(\a,\b)(\Np\r) + \Stroke + \Dadd(\r,0.35) \Sub(\a,10) \Add(\b,20) \Add(\n,5)} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{III. Arcto}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Setwidth(0.02) + \Moveto(-5,0) + \Red + \Arcto(64)(-5,+5)(+0,+5)(5) + \Green + \Arcto(64)(+5,+5)(+5,+0)(5) + \Blue + \Arcto(64)(+5,-5)(+0,-5)(5) + \Cyan + \Arcto(64)(-5,-5)(-5,+0)(5) + + \Moveto(-2.83,+2.83) + \Red + \Arcto(64)(+0,+5.66)(+2.83,+2.83)(4) + \Green + \Arcto(64)(+5.66,+0)(+2.83,-2.83)(4) + \Blue + \Arcto(64)(+0,-5.66)(-2.83,-2.83)(4) + \Cyan + \Arcto(64)(-5.66,+0)(-2.83,+2.83)(4) + + \Moveto(-6,0) + \Red + \Arcto(64)(-6,+6)(+0,+6)(2) + \Green + \Arcto(64)(+6,+6)(+6,+0)(2) + \Blue + \Arcto(64)(+6,-6)(+0,-6)(2) + \Cyan + \Arcto(64)(-6,-6)(-6,+0)(2) + + \Moveto(-7,0) + \Red + \Arcto(64)(-7,+7)(+0,+7)(3) + \Green + \Arcto(64)(+7,+7)(+7,+0)(3) + \Blue + \Arcto(64)(+7,-7)(+0,-7)(3) + \Cyan + \Arcto(64)(-7,-7)(-7,+0)(3) +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{IV. Arcto}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Setwidth(0.02) + \Black + \Moveto(-0.5,3.5) + \Arcto(16)(-0.5,-6)(-3,-6)(2.5) + \Arcto(16)(-6,-6)(-6,-3)(2.5) + \Arcto(16)(-6,-0.5)(3,-0.5)(2.5) + \Arcto(16)(6,-0.5)(6,-3)(2.5) + \Arcto(16)(6,-6)(3,-6)(2.5) + \Arcto(16)(0.5,-6)(0.5,3)(2.5) + \Arcto(16)(0.5,6)(3,6)(2.5) + \Arcto(16)(6,6)(6,3)(2.5) + \Arcto(16)(6,0.5)(-3,0.5)(2.5) + \Arcto(16)(-6,0.5)(-6,3)(2.5) + \Arcto(16)(-6,6)(-3,6)(2.5) + \Arcto(16)(-0.5,6)(-0.5,3.5)(2.5) + + \Red + \Moveto(-2,-1) + \Arcto(32)(-4,+0)(-2,+1)(1) + \Arcto(16)(-1.25,+1.25)(-1,+2)(1) + \Arcto(32)(+0,+4)(+1,+2)(1) + \Arcto(16)(+1.25,+1.25)(+2,+1)(1) + \Arcto(32)(+4,+0)(+2,-1)(1) + \Arcto(16)(+1.25,-1.25)(+1,-2)(1) + \Arcto(32)(+0,-4)(-1,-2)(1) + \Arcto(16)(-1.25,-1.25)(-2,-1)(1) + + \Green + \Moveto(-4,-2) + \Arcto(32)(-8,+0)(-4,+2)(2) + \Arcto(16)(-2.5,+2.5)(-2,+4)(2) + \Arcto(32)(+0,+8)(+2,+4)(2) + \Arcto(16)(+2.5,+2.5)(+4,+2)(2) + \Arcto(32)(+8,+0)(+4,-2)(2) + \Arcto(16)(+2.5,-2.5)(+2,-4)(2) + \Arcto(32)(+0,-8)(-2,-4)(2) + \Arcto(16)(-2.5,-2.5)(-4,-2)(2) + + \Blue + \Moveto(-6,0) + \Arcto(32)(-6,+6)(+0,+6)(5) + \Arcto(32)(+6,+6)(+6,+0)(5) + \Arcto(32)(+6,-6)(+0,-6)(5) + \Arcto(32)(-6,-6)(-6,+0)(5) + + \Cyan + \Moveto(-2.83,+2.83) + \Arcto(32)(+0,+5.66)(+2.83,+2.83)(4) + \Arcto(32)(+5.66,+0)(+2.83,-2.83)(4) + \Arcto(32)(+0,-5.66)(-2.83,-2.83)(4) + \Arcto(32)(-5.66,+0)(-2.83,+2.83)(4) + + \Magenta + \Moveto(-7,0) + \Arcto(32)(-7,+7)(+0,+7)(3) + \Arcto(32)(+7,+7)(+7,+0)(3) + \Arcto(32)(+7,-7)(+0,-7)(3) + \Arcto(32)(-7,-7)(-7,+0)(3) + + \Yellow + \Moveto(-6.5,0) + \Arcto(32)(-6.5,+6.5)(+0,+6.5)(2.5) + \Arcto(32)(+6.5,+6.5)(+6.5,+0)(2.5) + \Arcto(32)(+6.5,-6.5)(+0,-6.5)(2.5) + \Arcto(32)(-6.5,-6.5)(-6.5,+0)(2.5) +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/bezier.pdf b/Master/texmf-dist/doc/latex/lapdf/bezier.pdf Binary files differnew file mode 100644 index 00000000000..ae4acbeb25c --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/bezier.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/bezier.tex b/Master/texmf-dist/doc/latex/lapdf/bezier.tex new file mode 100644 index 00000000000..cba3df13521 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/bezier.tex @@ -0,0 +1,43 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge\bf{Quadratic}} +\bigskip + +\begin{lapdf}(16,8)(-8,-4) + \Blue + \Quadratic(-8,0) + (-4,+8)(+0,0) + (+4,-8)(+8,0) + (+4,+8)(+0,0) + (-4,-8)(-8,0) \Stroke + \Point(1)(-8,0) + \Point(1)(+0,0) + \Point(1)(+8,0) +\end{lapdf} + +\em{4 quadratic Bezier curves} +\end{center} +\bigskip + +\begin{center} +{\Huge\bf{Cubic}} +\bigskip + +\begin{lapdf}(16,6)(-8,-3) + \Red + \Cubic(-8,0) + (-5,-8)(-3,8)(+0,0) + (+3,-8)(+5,8)(+8,0) + (+5,-8)(+3,8)(+0,0) + (-3,-8)(-5,8)(-8,0) \Stroke + \Point(1)(-8,0) + \Point(1)(+0,0) + \Point(1)(+8,0) +\end{lapdf} + +\em{4 cubic Bezier curves} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/bezinfo.pdf b/Master/texmf-dist/doc/latex/lapdf/bezinfo.pdf Binary files differnew file mode 100644 index 00000000000..87536f0d6ed --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/bezinfo.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/bezinfo.tex b/Master/texmf-dist/doc/latex/lapdf/bezinfo.tex new file mode 100644 index 00000000000..9cee401ee4f --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/bezinfo.tex @@ -0,0 +1,433 @@ +\documentclass[titlepage,a4paper,11pt]{report} +\usepackage{shortvrb} +\usepackage{array} +\usepackage[color]{lapdf} + +\textheight24.92cm +\textwidth15.92cm +\oddsidemargin0cm +\evensidemargin0cm +\topmargin-0.3cm +\headheight0cm +\topskip0cm +\headsep0cm +\unitlength1cm + +\MakeShortVerb{\|} + +\def\it{\textit} +\def\tt{\texttt} +\def\sf{\textsf} +\def\bf{\textbf} +\def\em{\textit} +\def\mr{\mathrm} +\def\mb{\mathbf} +\def\fr{\frac} +\def\qq{\qquad} + +\def\syn{\item[Syntax]} +\def\fun{\item[Function]} +\def\exa{\item[Example]} +\def\see{\item[See Also]} + +% ------------------------------------------- +\title{ + \bf{\Huge Bezier Curves} \\ \vspace{0.6cm} + \bf{An Introduction}} +\author{ \\ + Detlef Reimers\\ + detlefreimers@gmx.de\\ + http://detlefreimers.de} +\date{\today} + +% ------------------------------------------------------------------------- +\begin{document} + +\parindent0cm +\maketitle + +% ------------------------------------------------------------------------- +\chapter{Bezier Curve Basics} +\section{Linear Interpolation} +This section will give you a basic introduction to bezier curves. We begin +with the simplest curve form, a straight line. We can express any point +$\mb{x}$ on this straight line by the two given points and the parameter $t$: +\begin{equation} + \mb{x}=\mb{x}(t)=(t-1)\mb{a}+t\mb{b}. +\end{equation} +For $t=0$ the straight line passes through $\mb{a}$, and for $t=1$ +it passes through $\mb{b}$. For $0\le t\le 1$ the point $\mb{x}$ +is between $\mb{a}$ and $\mb{b}$, while for all other values of $t$ +it is outside (see Figure 1). +\begin{center} +\begin{lapdf}(6,3.6)(0,-0.3) + \Dash(0) + \Red + \Line(0,0)(6,3) \Stroke + \Point(1)(1,0.5) + \Point(0)(2.5,1.25) + \Point(1)(5,2.5) + \Text(1,0.7,bc){$\mb{a}$} + \Text(2.5,1.45,bc){$\mb{x}$} + \Text(5,2.7,bc){$\mb{b}$} + \Text(1.8,0.5,bc){$t$} + \Text(2.5,0.7,bc){:} + \Text(4.1,1.5,bc){$1-t$} +\end{lapdf} + +\it{\bf{Figure 1}: Line interpolation on a straight line} +\end{center} +The point $\mb{x}$ divides the straight line segment between $\mb{a}$ +and $\mb{b}$ in the ratio $t:1-t$ and any point on the straight line can be +calculated by changing this parameter. If t lies between $\mb{a}$ and +$\mb{b}$, then $t\in [0,1]$. We can remove this restriction for $t$, if +we define $t=(u-a)/(b-a)$ with $u\in [a,b]$, we get: +\begin{equation} + \mb{x}=\mb{x}(t)=\fr{b-u}{b-a}\mb{a}+\fr{u-a}{b-a}\mb{b}. +\end{equation} +For $u=a$ the point is $\mb{x}=\mb{a}$ and for $u=b$ it is $\mb{x}=\mb{b}$ +accordingly. Notice, that the value of the ratio $t:1-t$ did not change +after this reparametrisation. +\begin{equation} + ratio(\mb{a,x,b}):=\fr{t}{1-t}=\fr{u-a}{b-u}. +\end{equation} +One of the most fundamental properties of the linear interpolation is its +\it{affine invariance}. This means, if you apply any affine map like +translation, scaling, rotation, shearing or parallel projection to the +points and then calculate $\mb{x}$, the result will the same as if you first +calculated the point and then applied the affine map to the three points. + +It should also be mentioned, that from a numerical point of view the linear +interpolation is a stable mathematical operation. This means that small changes +in the supplied values never lead to sudden great changes in the result. The well +known Horner's schema for instance, which can be used to evaluate polynomials, +is a bad example in this area. + +\section{Quadratic Bezier Curves} +We now want to use the results from the linear case to develop the +most elementary nonlinear curve form, the \it{parabola}. The main idea +is very simple: we use repeated linear interpolations to compute a point +on a parabola (a quadratic curve). Let $\mb{p}_0,\mb{p}_1,\mb{p}_2$ be +three given points and let $t\in \mb{\Re}$. Now we build: +\begin{eqnarray*} + \mb{p}_0^1(t) & = & (1-t)\mb{p}_0+t\mb{p}_1 \\ + \mb{p}_1^1(t) & = & (1-t)\mb{p}_1+t\mb{p}_2 \\ + \mb{p}_0^2(t) & = & (1-t)\mb{p}_0^1(t)+t\mb{p}_1^1(t). +\end{eqnarray*} +Inserting the first two equations into the third one, we get: +\begin{eqnarray} + \mb{p}_0^2(t) & = & (1-t)^2\mb{p}_0+2(1-t)t\mb{p}_1+t^2\mb{p}_2. +\end{eqnarray} +This formula represents a quadratic expression in $t$. We use the +superscript here to denote the curve degree. So, we can say that +$\mb{p}_0^2$ traces out a parabolic curve, if $t$ varies from $-\infty$ +to $+\infty$. The first three expressions clearly show that we only used +repeated linear interpolation to compute a curve point and we can state, +that this curve construction is \it{affine invariant}. Look at Figure 2 +for the geometric construction of the curve point $\mb{p}_0^2$ for $t=1/3$. +\begin{center} +\begin{lapdf}(10,7.6)(0,0.2) + \Setwidth(0.01) + \Black + \Polygon(1,2)(7,7)(9,1) \Stroke + \Dash(1) + \Line(3,3.667)(7.667,5) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Curve(64)(1,2)(7,7)(9,1) \Stroke + \Point(1)(1,2) + \Point(1)(7,7) + \Point(1)(9,1) + \Point(1)(3,3.667) + \Point(1)(7.667,5) + \Point(0)(4.556,4.111) + \Text(1,1.6,bc){$\mb{p}_0$} + \Text(7,7.2,bc){$\mb{p}_1$} + \Text(9,0.6,bc){$\mb{p}_2$} + \Text(2.7,3.7,bc){$\mb{p}_0^1$} + \Text(8,4.9,bc){$\mb{p}_1^1$} + \Text(4.556,3.62,bc){$\mb{p}_0^2$} +\end{lapdf} + +\it{\bf{Figure 2}: Repeated Line interpolation on a parabola} +\end{center} +For $t\in [0,1]$ the curve lies in the triangle formed by +$\mb{p}_0,\mb{p}_1,\mb{p}_2$. This is called the \it{convex hull property}. +As special points we have $\mb{p}^2(0)=\mb{p}_0$ and $\mb{p}^2(1)=\mb{p}_2$. +If the point $\mb{p}_1$ only lies on the curve, it must be a straight line. +The construction also shows the following property: +\begin{equation} + ratio(\mb{p}_0,\mb{p}_0^1,\mb{p}_1)=ratio(\mb{p}_1,\mb{p}_1^1,\mb{p}_2) + =ratio(\mb{p}_0^1,\mb{p}_0^2,\mb{p}_1^1)=\fr{t}{1-t}. +\end{equation} +All ratios are equal, this proves the affine invariance of the curve +construction. If you look at the generated curve, you see that for $t=0$ +the curve is tangent to the line $\mb{p}_0\mb{p}_1$ and for $t=1$ it is +tangent to the line $\mb{p}_1\mb{p}_2$. We come back to this fact later. + +The geometric construction is based on the principle of repeated linear +interpolation and the curve point is obtained by the last interpolation. +This principle is the underlying concept for the construction of all +\it{bezier curves} of any degree $n$. If we want to construct an $n$ +degree curve, we need $n+1$ \it{control points}. The number of linear +interpolations, needed to compute a point on a curve of degree $n$, is: +\begin{equation} + N=\fr{n(n+1)}{2} +\end{equation} + +\section{Cubic Bezier Curves} +Parabolas cannot form real space curves, because the three control points +always build a plane. This leads us to the next class of curves, the cubic +curves. + +Here we have four control points $\mb{p}_0,\mb{p}_1,\mb{p}_2,,\mb{p}_3$ +and let $t\in \mb{\Re}$. We compute a curve point with the following +construction: +\begin{eqnarray*} + \mb{p}_0^1(t) & = & (1-t)\mb{p}_0+t\mb{p}_1 \\ + \mb{p}_1^1(t) & = & (1-t)\mb{p}_1+t\mb{p}_2 \\ + \mb{p}_2^1(t) & = & (1-t)\mb{p}_2+t\mb{p}_3 \\ + \mb{p}_0^2(t) & = & (1-t)\mb{p}_0^1(t)+t\mb{p}_1^1(t) \\ + \mb{p}_1^2(t) & = & (1-t)\mb{p}_1^1(t)+t\mb{p}_2^1(t) \\ + \mb{p}_0^3(t) & = & (1-t)\mb{p}_0^2(t)+t\mb{p}_1^2(t). +\end{eqnarray*} +Inserting the first three equations into the next two, we obtain: +\begin{eqnarray*} + \mb{p}_0^2(t) & = & (1-t)^2\mb{p}_0+2(1-t)t\mb{p}_1+t^2\mb{p}_2 \\ + \mb{p}_1^2(t) & = & (1-t)^2\mb{p}_1+2(1-t)t\mb{p}_2+t^2\mb{p}_3. +\end{eqnarray*} +Again, we insert these two equations into the last one, and get this: +\begin{eqnarray*} + \mb{p}_0^3(t) & = & (1-t)^3\mb{p}_0+2(1-t)^2t\mb{p}_1+(1-t)t^2\mb{p}_2 + +(1-t)^2t\mb{p}_1+2(1-t)t^2\mb{p}_2+t^3\mb{p}_3. +\end{eqnarray*} +After some simplifications, we obtain this result: +\begin{eqnarray} + \mb{p}_0^3(t)=(1-t)^3\mb{p}_0+3(1-t)^2t\mb{p}_1+3(1-t)t^2\mb{p}_2 + +t^3\mb{p}_3. +\end{eqnarray} +Now, $\mb{p}_0^3$ is our point on the curve at parameter value $t$ and +we see that the construction is principally the same as in the quadratic +case. In Figure 3 you see the geometric construction for $t=1/2$: +\begin{center} +\begin{lapdf}(10,7.4)(0,0.3) + \Setwidth(0.01) + \Black + \Polygon(1,2)(4,7)(8,6)(9,1) \Stroke + \Dash(1) + \Polygon(2.5,4.5)(6,6.5)(8.5,3.5) \Stroke + \Line(4.25,5.5)(7.25,5) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Curve(64)(1,2)(4,7)(8,6)(9,1) \Stroke + \Point(1)(1,2) + \Point(1)(4,7) + \Point(1)(8,6) + \Point(1)(9,1) + \Point(1)(2.5,4.5) + \Point(1)(6,6.5) + \Point(1)(8.5,3.5) + \Point(1)(4.25,5.5) + \Point(1)(7.25,5) + \Point(0)(5.75,5.25) + \Text(1,1.6,bc){$\mb{p}_0$} + \Text(4,7.2,bc){$\mb{p}_1$} + \Text(8,6.2,bc){$\mb{p}_2$} + \Text(9,0.6,bc){$\mb{p}_3$} + \Text(2.2,4.5,bc){$\mb{p}_0^1$} + \Text(6,6.7,bc){$\mb{p}_1^1$} + \Text(8.8,3.5,bc){$\mb{p}_2^1$} + \Text(4.0,5.6,bc){$\mb{p}_0^2$} + \Text(7.5,5.1,bc){$\mb{p}_1^2$} + \Text(5.75,4.7,bc){$\mb{p}_0^3$} +\end{lapdf} + +\it{\bf{Figure 3}: Repeated Line interpolation on a cubic} +\end{center} +From equation (7) we see, that this is a cubic expression in $t$, so +the obtained curve is a cubic curve. This is the first curve form that +can build space curves, because four control points can live in space +and not only in a plane. + +This curve is also affine invariant and we need 6 linear interpolations, +to compute a point $\mb{p}_0^3$ on the curve. If we look at the curve +form, we see that for $t=0$ the curve is tangent to the line +$\mb{p}_0\mb{p}_1$ and for $t=1$ it is tangent to the line +$\mb{p}_1\mb{p}_2$. We already mentioned this fact for the parabola. +Cubic curve are always inside the convex hull of the four control points. + +Parametric cubic curves have much more form variations than parabolas, +they can have inflection points, nodes (points of self intersection) +or even a cusp (point, in which the curve has two tangents). Therefore +these cubic curves are used as the major curve forms in Postscript, PDF +or in vector drawing and CAD programs. + +\section{Rational Quadratic Bezier Curves} +As last curve form I want to introduce rational quadratic bezier curves. +They are very important, because they can exactly produce conic curves like +parabolas, hyperbolas, ellipses and circles. + +These curves are a generalisation of their so called integral counterparts, +because they include them but they have even more form variations than +the integral bezier curves. + +Generally spoken, rational curves lie in another space as integral curves. +If you draw a circle on a piece of paper and rotate the paper in front of +your eyes, you'll see an ellipse. It's a so called projection of the circle. +If you repeat this experiment with a parabola, you might see a hyperbola. +If we look at this subject backwards, we can state that every rational +quadratic bezier curve in 3D-space can be seen as a projection of an +integral quadratic bezier curve in the plane. This is fundamental for the +understanding of rational bezier curves. + +We can deal with rational curves just the way we did with integral curves, +but we have to put them first in a so called homogeneous space. This has +one more coordinate, the weight of a point. In the rational case, every +bezier point has an $x$-value, an $y$-value and a weight $w$. In normal +space, each point of a bezier curve has the weight $w=1$. This weight can +be interpreted as the $z$-coordinate of a point. + +Here is the mathematical description of a rational quadratic bezier curve: +\begin{eqnarray} + \mb{p}(t) & = & \fr{(1-t)^2w_0\mb{p}_0+2(1-t)tw_1\mb{p}_1+t^2w_2\mb{p}_2} + {(1-t)^2w_0+2(1-t)tw_1+t^2w_2}. +\end{eqnarray} +As you can see, every point is associated with it's own weight. This is the +general form of a rational quadratic bezier curve. With some more involved +math it can be translated into a simpler form, which is called the +\it{standard form} and it looks like this: +\begin{eqnarray} + \mb{p}(t) & = & \fr{(1-t)^2\mb{p}_0+2(1-t)tw\mb{p}_1+t^2\mb{p}_2} + {(1-t)^2+2(1-t)tw+t^2}. +\end{eqnarray} +The outer weights $w_0$ and $w_2$ are gone (their value is 1) and the central inner weight is transformed to $w$. The term \it{rational} simply reflects the fact, that every rational bezier curve is build from a rational expression, which is much more complicated then the expression for integral curves. + +But now comes the magic of homogeneous coordinates. If we do the following +transformation at the very beginning of our curve calculation: +\begin{eqnarray} + x \rightarrow x \cdot w & y \rightarrow y \cdot w & z \rightarrow w, +\end{eqnarray} +we can compute the curve points without any fractional math in the same way +as we did in the integral case. But before we draw the point, we have to +transform it back to the so called affine space (here: our normal 2D-space) +with the following caculations: +\begin{eqnarray} + x \rightarrow x / w & y \rightarrow y / w & z \rightarrow 1, +\end{eqnarray} +I'm not going to explain the mathematical background, but I want to mention +that this is the reason, why homogeneous coordinates are used in so many +advanced graphic algorithms. If we go back to our paper example, we can say +that changing from affine space to homogeneous space is like the projective +view of the original shape and changing it back gives us the original. In the style file you can look up the |Rcurve| macro to see how this is +implemented in \TeX. \it{Figure 4} shows several conic curves, which all share the same bezier points, only the inner weight $w$ changes. +\begin{center} +\begin{lapdf}(11,9.5)(-5.5,-3.3) + \Setwidth(0.01) + \Black + \Polygon(-5,0.5)(2,6)(5,-0.5) \Stroke + \Dash(1) + \Line(-1,-3)(2,6) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rcurve(64)(-5,0.5,1)(2,6,3)(5,-0.5,1) \Stroke + \Green + \Rcurve(64)(-5,0.5,1)(2,6,1)(5,-0.5,1) \Stroke + \Blue + \Rcurve(64)(-5,0.5,3)(2,6,1)(5,-0.5,3) \Stroke + \Cyan + \Rcurve(64)(-5,0.5,3)(2,6,0)(5,-0.5,1) \Stroke + \Magenta + \Rcurve(96)(-5,0.5,3)(2,6,-1)(5,-0.5,3) \Stroke + \Point(1)(-5,0.5) + \Point(1)(2,6) + \Point(1)(5,-0.5) + \Point(1)(1.5,4.5) + \Point(1)(1,3) + \Point(1)(0.5,1.5) + \Point(1)(0,0) + \Point(1)(-1,-3) + \Text(-5.1,0.55,br){$P_0$} + \Text(2,6.2,bc){$P_1$} + \Text(5.1,-0.5,bl){$P_2$} + \Text(-0.9,-3,bl){$-1/3$} + \Text(0.15,0.05,bl){$w=0$} + \Text(0.65,1.5,bl){$1/3$} + \Text(1.15,3.05,bl){$1$} + \Text(1.62,4.55,bl){$3$} + \Text(-5.6,5.5,tl){$w^2>1$: Hyperbola} + \Text(-5.6,4.9,tl){$w^2=1$: Parabola} + \Text(-5.6,4.3,tl){$w^2<1$: Ellipse} + \Text(-5.6,3.7,tl){$w^2=0$: Line} +\end{lapdf} + +\it{\bf{Figure 4}: Various conic arcs defined by $w=(3,1,1/3,0,-1/3)$}. +\end{center} +To the left of the picture is the curve form classification corresponding to +different values of $w$. You may ask now: ``\it{Where is the circle?}''. Well, that's no real problem. Without any proof here follows the answer. Let's first name the angle, formed by the bezier polygon. We call it $a$. As we saw before, the circle is simply a special case of an ellipse. The ellipse is actually a circle, if the following condition holds: +\begin{eqnarray} + w & = & \cos(a). +\end{eqnarray} +Here is an example of a circle, build with two rational quadratic bezier curves: +\begin{center} +\begin{lapdf}(6,8)(-3,-2.6) + \Setwidth(0.01) + \Black + \Polygon(+2.167,+1.25)(+0.00,+5.0)(-2.167,+1.25) \Stroke + \Setwidth(0.02) + \Red + \Rmoveto(+2.167,+1.25,2) + \Rcurveto(64)(+0.00,+5.0,1)(-2.167,+1.25,2) + \Rcurveto(96)(+0.00,+5.0,-1)(+2.167,+1.25,2) \Stroke + \Point(1)(+2.167,+1.25) + \Point(1)(+0.00,+5.0) + \Point(1)(-2.167,+1.25) + \Text(0,4.6,tc){$a$} + \Text(1,4.73,tl){$w=\cos 60^\circ=0.5$} + \Text(0,2.2,tc){$w=0.5$} + \Text(0,-2.2,bc){$w=-0.5$} + \Text(-2.24,+1.29,br){$P_0$} + \Text(+0.05,+5.13,bc){$P_1$} + \Text(+2.22,+1.28,bl){$P_2$} +\end{lapdf} + +\it{\bf{Figure 5}: A full circle with two rational quadratic bezier curves.} +\end{center} +Both curves share the same bezier points, but the lower one (the complementary curve) has negative weight $-w$. Everytime you want to draw the complementary rational curve, you only have to negate the weight value. + +Now it's up to you. I hope, this short introduction into the world of bezier +curves has risen your appetite. There are many good books around, which deal +with this subject. Look at the end of this paper for some suggestions. + +\section{Additional Readings} +Depending on the levels of insight you want to achieve, there are lots of +good books and free literature on the market and on the internet. I want +to give you some suggestions for literature, that will help you to learn +more about graphics programming. + +\begin{thebibliography}{0} + \bibitem{1} MORTENSON M.E.: \textsl{Mathematics for Computer Graphics + Applications}, + Industrial Press, Inc., 2 ed. 1999. + + \bibitem{2} FOLEY, VAN DAM.: \textsl{Computer Graphics -- Principles + and Practice}, Addison-Wesley, 2 ed. 1996. + + \bibitem{3} PAETH, ALAN W.: \textsl{Graphics GEMS I-V}, + AP Professional, 1995. + + \bibitem{4} ABRASH, MICHAEL.: \textsl{Graphics Programming Black Book}, + Coriolis Group Books, 1997. + + \bibitem{5} FARIN G.: \it{Curves and Surfaces For Computer Aided + Geometric Design -- A Practical Guide}, Academic Press, 2 ed. 1999. + + \bibitem{6} FARIN G.: \it{NURBS -- from Projective Geometry to + Practical Use}, A K Peters Ltd., Natick, MA, 2 ed. 1990. + + \bibitem{7} PIEGL L. \& TILLER W.: \it{The NURBS Book}, Springer, 2 ed. 1997. +\end{thebibliography} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/buttrfly.pdf b/Master/texmf-dist/doc/latex/lapdf/buttrfly.pdf Binary files differnew file mode 100644 index 00000000000..097d1c9f397 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/buttrfly.pdf 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} diff --git a/Master/texmf-dist/doc/latex/lapdf/cfamily.pdf b/Master/texmf-dist/doc/latex/lapdf/cfamily.pdf Binary files differnew file mode 100644 index 00000000000..beffafd29c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/cfamily.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/cfamily.tex b/Master/texmf-dist/doc/latex/lapdf/cfamily.tex new file mode 100644 index 00000000000..49d36366ffd --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/cfamily.tex @@ -0,0 +1,124 @@ +\input preamble.tex + +\Defdim(\k,-0.7) +\newdimen\a +\newdimen\b +\newdimen\x +\newdimen\y + +\def\dsp{\displaystyle} + +% ------------------------------------------------------------------------- +\begin{document} +\unitlength1.3cm + +\begin{center} +{\huge \bf{Curve Family I}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Lingrid(10)(1,3)(-7,7)(-7,7) + \Rect(-7,-7,14,14) + \Setclip + \def\FamilyI(#1){\Polynom(-7,+7)(0.1,#1,0,#1) \Stroke} + \Whiledim{\k<0.8}{\Stepcol(0,23,2) \FamilyI(\Np\k) \Dadd(\k,0.1)} + \Setwidth(0.01) + \Black + \Dash(1) + \Polynom(-7,+7)(-0.05,0,-0.15,0) \Stroke + \Dash(0) + \Point(1)(+4.67,-5.78) + \Point(1)(+4.00,-3.80) + \Point(1)(+3.33,-2.35) + \Point(1)(+2.67,-1.35) + \Point(1)(+2.00,-0.70) + \Point(1)(+1.33,-0.32) + \Point(1)(+0.67,-0.11) + \Point(1)(+0.00,+0.00) + \Point(1)(-0.67,+0.11) + \Point(1)(-1.33,+0.32) + \Point(1)(-2.00,+0.70) + \Point(1)(-2.67,+1.35) + \Point(1)(-3.33,+2.35) + \Point(1)(-4.00,+3.80) + \Point(1)(-4.67,+5.78) + \Text(-5.8,5,rb){$k=7$} + \Text(5.8,-5,lt){$k=-7$} + \Text(-4.6,6.2,lb){$f_{e}(x)=-\dsp\frac{1}{20}(x^3+3x)$} +\end{lapdf} + +$f_{k}(x)=\dsp\frac{1}{10}(x^3+kx^2+k)$ \qquad $k = -7 \dots +7$ + +\newpage + +{\huge \bf{Curve Family II}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Lingrid(10)(1,3)(-7,7)(-7,7) + \Rect(-7,-7,14,14) + \Setclip + \def\FamilyII(#1){\Polynom(-7,+7)(0.1,#1,0.1,0) \Stroke} + \Whiledim{\k<0.8}{\Stepcol(0,23,2) \FamilyII(\Np\k) \Dadd(\k,0.1)} + \Setwidth(0.01) + \Black + \Dash(1) + \Polynom(-7,+7)(-0.05,0,0.05,0) \Stroke + \Dash(0) + \Point(1)(+4.59,-4.62) + \Point(1)(+3.91,-2.80) + \Point(1)(+3.23,-1.52) + \Point(1)(+2.54,-0.69) + \Point(1)(+1.82,-0.21) + \Point(1)(+1.00,+0.00) + \Point(1)(+0.00,+0.00) + \Point(1)(-1.00,+0.00) + \Point(1)(-1.82,+0.21) + \Point(1)(-2.54,+0.69) + \Point(1)(-3.23,+1.52) + \Point(1)(-3.91,+2.80) + \Point(1)(-4.59,+4.62) + \Text(-5.6,4.1,rb){$k=7$} + \Text(5.6,-4.1,lt){$k=-7$} + \Text(-4.9,6.2,lb){$f_{e}(x)=-\dsp\frac{1}{20}(x^3-x)$} +\end{lapdf} + +$f_{k}(x)=\dsp\frac{1}{10}(x^3+kx^2+x)$ \qquad $k = -7 \dots +7$ + +\newpage + +{\huge \bf{Curve Family III}} +\bigskip + +\begin{lapdf}(13,11)(-5,-3) + \Lingrid(10)(1,3)(-5,8)(-3,8) + \Rect(-5,-3,13,11) + \Setclip + \def\Fx(#1,#2){\Dset(\x,#1) \y=2\k \Sub(\y,\x) + \Exp(\Np\y,#2) \Add(#2,\x) \y=3\k \Sub(#2,\y)} + \Dset(\k,-1) + \Whiledim{\k<3.5}{ + \a=\k \Dsub(\a,3.25) \b=\k \Dadd(\b,8) + \Stepcol(0,23,2) \Fplot(96)(\Np\a,\Np\b) \Stroke \Dadd(\k,0.5)} + \Setwidth(0.01) + \Black + \Dash(1) + \Polynom(-4,+7)(0,0,-0.5,1) \Stroke + \Dash(0) + \Point(1)(-2.0,+2.0) + \Point(1)(-1.0,+1.5) + \Point(1)(+0.0,+1.0) + \Point(1)(+1.0,+0.5) + \Point(1)(+2.0,+0.0) + \Point(1)(+3.0,-0.5) + \Point(1)(+4.0,-1.0) + \Point(1)(+5.0,-1.5) + \Point(1)(+6.0,-2.0) + \Text(-4.7,7.7,lt){$k=-1$} + \Text(+2.9,7.7,lt){$k=+3$} + \Text(-4.9,2.1,lb){$y_e=1-\dsp\frac{x}{2}$} +\end{lapdf} + +$f_{k}(x)=e^{\dsp{2k-x}}+x-3k$ \qquad $k = -1 \dots +3$ +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/chrysant.pdf b/Master/texmf-dist/doc/latex/lapdf/chrysant.pdf Binary files differnew file mode 100644 index 00000000000..c268ecd1996 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/chrysant.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/chrysant.tex b/Master/texmf-dist/doc/latex/lapdf/chrysant.tex new file mode 100644 index 00000000000..351c4978780 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/chrysant.tex @@ -0,0 +1,34 @@ +% --------------------------------------------------------------------------- +% The chrysanteme curve is defined by the equation: +% r=5(1+sin(11a/5)-4sin^4(17a/3)*sin^8(2cos(3a)-14a)). +% --------------------------------------------------------------------------- +\input preamble.tex + +\Defnum(\n,0) +\newcount\m +\newdimen\a +\newdimen\x +\newdimen\y +\newdimen\z + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength0.88cm + +\begin{center} +{\Huge \bf{The Chrysanteme Curve}} +\bigskip + +\begin{lapdf}(18,20)(-9,-10) + \def\Px(#1,#2){\Dset(\a,#1) \x=2.2\a \y=5.667\a \z=3\a \a=14\a + \Sin(\Np\x,#2) \Dadd(#2,1) #2=1.25#2 \Sin(\Np\y,\y) + \Cos(\Np\z,\z) \Sub(\z,\a) \Add(\z,\z) \Sin(\Np\z,\z) + \Dmul(\z,\z) \Dmul(\y,\z) \Pot(\Np\y,4,\y) \Sub(#2,\y) #2=4#2} + + \Whilenum{\n<24}{% + \m=\n \Add(\m,1) \Nextcol(0, 23) \Pplot(100)(\n,\m) \Stroke \Add(\n,1)} +\end{lapdf} + +$r(\phi)=5(1+\sin(11\phi/5)-4\sin^4(17\phi/3)\sin^8(2\cos(3\phi)-14\phi))$ +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/circle.pdf b/Master/texmf-dist/doc/latex/lapdf/circle.pdf Binary files differnew file mode 100644 index 00000000000..7c471904018 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/circle.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/circle.tex b/Master/texmf-dist/doc/latex/lapdf/circle.tex new file mode 100644 index 00000000000..55ad9bc03e0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/circle.tex @@ -0,0 +1,37 @@ +\input preamble.tex + +\Defdim(\d,0) +\Defdim(\t,0) +\Defdim(\x,0) +\Defdim(\y,0) + +\def\Ncirc(#1){% + \Rad(#1,\t) + \Cos(\Np\t,\x) \Dmul(\x,4.8pt) + \Sin(\Np\t,\y) \Dmul(\y,4.8pt) + \Circle(64)(\Np\x,\Np\y,4) \Stroke} + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge\bf{Circle I}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Whiledim{\d<9}{\Dadd(\d,0.3) \Nextcol(0,23) \Circle(96)(0,0,\Np\d) \Stroke} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{Circle II}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Setwidth(0.02) + \Resetcol + \Whiledim{\d<360}{\Nextcol(0,23) \Ncirc(\Np\d) \Dadd(\d,15)} +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/colors.pdf b/Master/texmf-dist/doc/latex/lapdf/colors.pdf Binary files differnew file mode 100644 index 00000000000..9c8d3baa4f5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/colors.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/colors.tex b/Master/texmf-dist/doc/latex/lapdf/colors.tex new file mode 100644 index 00000000000..1e28ebc4478 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/colors.tex @@ -0,0 +1,72 @@ +\input preamble.tex + +\newcount\k +\newcount\m +\newcount\n +\newcount\ra +\newcount\rb + +\newdimen\a +\newdimen\w +\newdimen\xa +\newdimen\ya +\newdimen\xb +\newdimen\yb + +\gdef\Segment(#1,#2){% + \n=0 + \Whilenum{\n<360}{% + \m=\n \Mod(\m,15) + \ifnum\m=0 \Nextcol(\k,96) \fi + \Dset(\w,0.054) \Mul(\w,#2) \Setwidth(\Np\w) + \Dset(\a,\n) \Dsub(\a,5.8) \Rad(\Np\a,\a) + \Cos(\Np\a,\xa) \xb=#2\xa \Mul(\xa,#1) + \Sin(\Np\a,\ya) \yb=#2\ya \Mul(\ya,#1) + \Moveto(\Np\xa,\Np\ya) \Lineto(\Np\xb,\Np\yb) \Stroke \Add(\n,3)} + \White + \Setwidth(0.03) + \ifnum#2<5 \Arc(128)(0,0)(0,360)(#2) \Stroke \fi} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.5cm + +\begin{center} +{\Huge \bf{\Lapdf{} Step-Colors}} +\bigskip + +\begin{lapdf}(12,12)(-6,-7) + \Setcap(0) + \rb=5 + \k=0 + \Whilenum{\rb>1}{% + \ra=\rb \Sub(\ra,1) + {\Segment(\ra,\rb)} \Add(\k,24) \Sub(\rb,1)} + + \n=0 + \White + \Setwidth(0.03) + \Whilenum{\n<360}{% + \Dset(\a,\n) \Dsub(\a,7.5) \Rad(\Np\a,\a) + \Cos(\Np\a,\xa) \xb=5\xa + \Sin(\Np\a,\ya) \yb=5\ya + \Moveto(\Np\xa,\Np\ya) \Lineto(\Np\xb,\Np\yb) \Stroke \Add(\n,15)} + + \n=0 + \Dset(\xa,-4.75) + \Setwidth(0.105) + \Resetcol + \Whilenum{\n<96}{% + \Nextcol(0,96) + \Line(\Np\xa,-7)(\Np\xa,-6) \Stroke \Dadd(\xa,0.1) \Add(\n,1)} + + \Black + \Setwidth(0.02) + \Rectangle(-4.8,-7)(9.6,1)(0) \Stroke +\end{lapdf} +\bigskip + +These are the 96 colors, used for {\it Stepcol(c1,c2,s)} and +{\it Nextcol(c1,c2)}. +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/conic.pdf b/Master/texmf-dist/doc/latex/lapdf/conic.pdf Binary files differnew file mode 100644 index 00000000000..0145129f833 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/conic.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/conic.tex b/Master/texmf-dist/doc/latex/lapdf/conic.tex new file mode 100644 index 00000000000..61109d2b8a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/conic.tex @@ -0,0 +1,68 @@ +\input preamble.tex + +\def\bf{\textbf} +\def\it{\textit} +\def\tt{\texttt} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength0.85cm + +\begin{center} +{\Huge \bf{Drawing with \pdfTeX} \bigskip} +\end{center} + +Now you can draw arbitrary lines, polygons, integral and rational bezier +curves up to a degree of seven within your \pdfTeX{} document. The \Lapdf{} +style allows to draw directly with PDF, without any other files. You can +scale your drawing and use drawing primitives that look and function like +corresponding postscript commands. You can use PDF drawing primitives and +also \LaTeX{} typesetting of text in the same environment. + +\begin{center} +\begin{lapdf}(18,18)(-9,-6) + \Red + \Rcurve(64)(-8,0,1)(2,12,3)(8,0,1) \Stroke + \Green + \Rcurve(64)(-8,0,1)(2,12,1)(8,0,1) \Stroke + \Blue + \Rcurve(64)(-8,0,3)(2,12,1)(8,0,3) \Gfill(0.9) + \Dgray + \Rcurve(64)(-8,0,1)(2,12,0)(8,0,1) \Stroke + \Magenta + \Rcurve(64)(-8,0,3)(2,12,-1)(8,0,3) \Gfill(0.9) + \Dash(1) + \Setwidth(0.01) + \Black + \Polygon(-8,0)(2,12)(8,0) \Stroke + \Line(-1,-6)(2,12) \Stroke + \Dash(0) + \Point(0)(-8,0) + \Point(0)(2,12) + \Point(0)(8,0) + \Point(1)(1.5,9) + \Point(1)(1,6) + \Point(1)(0.5,3) + \Point(1)(0,0) + \Point(1)(-1,-6) + \Text(-8.0,0.2,br){$P_0$} + \Text(2,12.2,bc){$P_1$} + \Text(8.0,0.2,bl){$P_2$} + \Text(-0.8,-5.8,bl){$-1/3$} + \Text(0.2,0.2,bl){$w=0$} + \Text(0.7,3.2,bl){$1/3$} + \Text(1.2,6.2,bl){$1$} + \Text(1.7,9.2,bl){$3$} +\end{lapdf} + +\it{Various conic arcs defined by $w=(3,1,1/3,0,-1/3)$}. +\end{center} + +This file shows some capabilities of the \Lapdf{} style. Rational quadratic +bezier curves can form all conic curves. These enable you to exactly draw any +parabolas, hyperbolas, ellipses and circles. + +The above curves share the same control points, the only difference are the +curve's weights, which control the curve shape. \Lapdf{} has commands like +\it{Stroke, Fill, Setcol} and many others and it supports color. +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/curve.pdf b/Master/texmf-dist/doc/latex/lapdf/curve.pdf Binary files differnew file mode 100644 index 00000000000..0a11285325e --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/curve.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/curve.tex b/Master/texmf-dist/doc/latex/lapdf/curve.tex new file mode 100644 index 00000000000..ecdf6b253f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/curve.tex @@ -0,0 +1,61 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.125cm + +\begin{center} +{\Huge \bf{Integral Bezier Curves}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Dgray + \Rect(-8,-8,16,16) \Gfill(.9) + \Black + \Curve(80)(-8,-8)(8,8) \Stroke + \Red + \Curve(80)(-8,-8)(0,8)(8,-8) \Stroke + \Green + \Curve(80)(-8,-8)(-4,8)(4,-8)(8,8) \Stroke + \Blue + \Curve(80)(-8,-8)(-8,0)(12,-12)(0,8)(8,8) \Stroke + \Cyan + \Curve(96)(0,-8)(-8,-8)(-8,8)(8,8)(8,-8)(0,-8) \Stroke + \Magenta + \Curve(96)(-8,-8)(0,-8)(-8,0)(0,8)(8,0)(0,-8)(8,-8) \Stroke + \Yellow + \Curve(96)(-8,0)(-5.715,8)(-3.43,-16)(-1.145,8)(1.145,-8)(3.43,16) + (5.715,-8)(8,0) \Stroke +\end{lapdf} + +\em{Curve-Degree: 1 black, 2 red, 3 green, 4 blue, 5 cyan, 6 magenta, 7 dyellow} +\end{center} + +\newpage +\unitlength1cm + +\begin{center} +{\Huge \bf{Rational Bezier Curves}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Dgray + \Rect(-9,-9,18,18) \Gfill(.9) + \Red + \Rcurve(80)(-9,9,1)(0,-9,4)(9,9,1) \Stroke + \Green + \Rcurve(80)(-9,-9,0.1)(-4.5,9,2.8)(4.5,-9,2.8)(9,9,0.1) \Stroke + \Blue + \Rcurve(80)(-9,9,0.1)(-4.5,-9,0.7)(0,9,1)(4.5,-9,0.7)(9,9,0.1) \Stroke + \Cyan + \Rcurve(96)(3,0,3)(0,3,1)(-3,0,1)(0,-3,1)(3,0,3) \Stroke + \Magenta + \Rcurve(96)(4,0,1)(4,16,0.2)(-12,8,0.2)(-12,-8,0.2)(4,-16,0.2)(4,0,1) + \Stroke + \Yellow + \Rcurve(96)(0,-9,1)(-9,-9,2)(-9,9,1)(9,9,1)(9,-9,2)(0,-9,1) \Stroke +\end{lapdf} + +\em{Curve-Degree: 2 red, 3 green, 4 blue, 5 cyan, 6 magenta, 7 dyellow} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/curveto.pdf b/Master/texmf-dist/doc/latex/lapdf/curveto.pdf Binary files differnew file mode 100644 index 00000000000..08e5ba85afd --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/curveto.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/curveto.tex b/Master/texmf-dist/doc/latex/lapdf/curveto.tex new file mode 100644 index 00000000000..f1f9bd032ab --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/curveto.tex @@ -0,0 +1,75 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.125cm + +\begin{center} +{\Huge \bf{Integral Bezier Curves}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Dgray + \Rect(-8,-8,16,16) \Gfill(.9) + \Black + \Moveto(-8,-8) + \Curveto(80)(8,8) \Stroke + \Red + \Moveto(-8,-8) + \Curveto(80)(0,8)(8,-8) \Stroke + \Green + \Moveto(-8,-8) + \Curveto(80)(-4,8)(4,-8)(8,8) \Stroke + \Blue + \Moveto(-8,-8) + \Curveto(80)(-8,0)(12,-12)(0,8)(8,8) \Stroke + \Cyan + \Moveto(0,-8) + \Curveto(96)(-8,-8)(-8,8)(8,8)(8,-8)(0,-8) \Stroke + \Magenta + \Moveto(-8,-8) + \Curveto(96)(-8,-8)(0,-8)(-8,0)(0,8)(8,0)(0,-8)(8,-8) \Stroke + \Yellow + \Moveto(-8,0) + \Curveto(96)(-5.715,8)(-3.43,-16)(-1.145,8)(1.145,-8)(3.43,16) + (5.715,-8)(8,0) \Stroke +\end{lapdf} + +\em{Curve-Degree: 1 black, 2 red, 3 green, 4 blue, 5 cyan, 6 magenta, +7 dyellow} +\end{center} + +\newpage +\unitlength1cm + +\begin{center} +{\Huge \bf{Rational Bezier Curves}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Dgray + \Rect(-9,-9,18,18) \Gfill(.9) + \Red + \Rmoveto(-9,9,1) + \Rcurveto(80)(0,-9,4)(9,9,1) \Stroke + \Green + \Rmoveto(-9,-9,0.1) + \Rcurveto(80)(-4.5,9,2.8)(4.5,-9,2.8)(9,9,0.1) \Stroke + \Blue + \Rmoveto(-9,9,0.1) + \Rcurveto(80)(-4.5,-9,0.7)(0,9,1)(4.5,-9,0.7)(9,9,0.1) \Stroke + \Cyan + \Rmoveto(3,0,3) + \Rcurveto(96)(0,3,1)(-3,0,1)(0,-3,1)(3,0,3) \Stroke + \Magenta + \Rmoveto(4,0,1) + \Rcurveto(96)(4,16,0.2)(-12,8,0.2)(-12,-8,0.2)(4,-16,0.2)(4,0,1) + \Stroke + \Yellow + \Rmoveto(0,-9,1) + \Rcurveto(96)(-9,-9,2)(-9,9,1)(9,9,1)(9,-9,2)(0,-9,1) \Stroke +\end{lapdf} + +\em{Curve-Degree: 2 red, 3 green, 4 blue, 5 cyan, 6 magenta, 7 dyellow} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/cycloid.pdf b/Master/texmf-dist/doc/latex/lapdf/cycloid.pdf Binary files differnew file mode 100644 index 00000000000..d7a06a2eace --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/cycloid.pdf 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} diff --git a/Master/texmf-dist/doc/latex/lapdf/drawing.pdf b/Master/texmf-dist/doc/latex/lapdf/drawing.pdf Binary files differnew file mode 100644 index 00000000000..e1feffb676c --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/drawing.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/drawing.tex b/Master/texmf-dist/doc/latex/lapdf/drawing.tex new file mode 100644 index 00000000000..49ca0390718 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/drawing.tex @@ -0,0 +1,60 @@ +\input preamble + +% -------------------------------------------------------------------------- +\begin{document} +\unitlength0.93cm + +\begin{center} +{\Huge \bf{Drawing with \Lapdf}} +\bigskip + +\begin{lapdf}(12,12)(-6,-6) + \Setwidth(0.01) + \Rect(-6,-6,12,12) + \Line(-6,0)(+6,0) \Stroke + \Line(0,-6)(0,+6) \Stroke + \Dash(2) + \Line(-6,-6)(+6,+6) \Stroke + \Dash(0) + \Gsave + \Dash(1) + \Moveto(-6,0) + \Lineto(-2,6) + \Lineto(2,-6) + \Lineto(6,0) \Stroke + \Grestore + \Setwidth(0.02) + \Red + \Curve(64)(-6,0)(-2,6)(2,-6)(6,0) \Closepath \Gfill(0.9) + \Cyan + \Dash(2) + \Rcurve(96)(-5,0,3)(0,8,1)(5,0,3) \Stroke + \Rcurve(96)(-5,0,3)(0,8,-1)(5,0,3) \Stroke + \Dash(0) + \Green + \Rcurve(96)(-5,0,1)(0,8,1)(5,0,1) \Stroke + \Yellow + \Rcurve(96)(-5,0,1)(0,8,3)(5,0,1) \Stroke + \Rcurve(96)(-5,0,1)(0,8,0)(5,0,1) \Stroke + \Magenta + \Circle(64)(0,0,5) \Stroke + \Setcol(0.3,0.3,0.3) + \Curve(64)(-5,0)(0,-8)(5,0) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(12,12)(-6,-6) + \Setwidth(0.02) + \Setjoin(1) + \Red + \Rotate(45) + \Scale(1,0.8) + \Circle(64)(0,0,1.86) + \Circle(64)(0,0,4) + \Circle(64)(0,0,6) + \Fill(1,1,0) + \Polygon(0,6)(3.527,-4.854)(-5.706,1.854)(5.706,1.854)(-3.527,-4.854)(0,6) + \Fill(0,1,1) +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/ellipse.pdf b/Master/texmf-dist/doc/latex/lapdf/ellipse.pdf Binary files differnew file mode 100644 index 00000000000..372e25a6469 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/ellipse.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/ellipse.tex b/Master/texmf-dist/doc/latex/lapdf/ellipse.tex new file mode 100644 index 00000000000..91f6d753927 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/ellipse.tex @@ -0,0 +1,36 @@ +\input preamble.tex + +\Defdim(\d,0) +\Defdim(\e,9) + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Ellipse I}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Whiledim{\d<9}{ + \Nextcol(0,23) + \Dadd(\d,0.5) + \Ellipse(32)(0,0)(\Np\d,\Np\e,0) \Stroke + \Dsub(\e,0.5)} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge \bf{Ellipse II}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Setwidth(0.02) + \Dset(\d,0) + \Whiledim{\d<180}{ + \Nextcol(0,23) + \Ellipse(20)(0,0)(9,3,\Np\d) \Stroke + \Dadd(\d,7.5)} +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/fplot.pdf b/Master/texmf-dist/doc/latex/lapdf/fplot.pdf Binary files differnew file mode 100644 index 00000000000..c5817eb4897 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/fplot.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/fplot.tex b/Master/texmf-dist/doc/latex/lapdf/fplot.tex new file mode 100644 index 00000000000..a1bbaf03add --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/fplot.tex @@ -0,0 +1,271 @@ +\input preamble.tex + +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\huge \bf{Trigonometric Functions}} +\bigskip + +\begin{lapdf}(12,10.3)(-6,-5) + \Lingrid(10)(1,3)(-6,6)(-5,5) + \Red + \def\Fx(#1,#2){\Sin(#1,#2)} + \Fplot(50)(-6,6) \Stroke + \Green + \def\Fx(#1,#2){\Cos(#1,#2)} + \Fplot(50)(-6,6) \Stroke + \Blue + \def\Fx(#1,#2){\Tan(#1,#2)} + \Fplot(50)(-6,-4.91) \Stroke + \Fplot(50)(-4.515,-1.768) \Stroke + \Fplot(50)(-1.373,1.373) \Stroke + \Fplot(50)(1.768,4.515) \Stroke + \Fplot(50)(4.91,6) \Stroke +\end{lapdf} +\bigskip + +{\huge \bf{Arcus Functions}} + +\begin{lapdf}(12,7.3)(-6,-3) + \Lingrid(10)(1,3)(-6,6)(-3,4) + \Red + \def\Fx(#1,#2){\Asin(#1,#2)} + \Fplot(50)(-1,1) \Stroke + \Green + \def\Fx(#1,#2){\Acos(#1,#2)} + \Fplot(50)(-1,1) \Stroke + \Blue + \def\Fx(#1,#2){\Atan(#1,#2)} + \Fplot(50)(-6,6) \Stroke +\end{lapdf} + +\newpage + +{\huge \bf{Hyperbolic Functions}} + +\begin{lapdf}(12,10.3)(-6,-5) + \Lingrid(10)(1,3)(-6,6)(-5,5) + \Red + \def\Fx(#1,#2){\Sinh(#1,#2)} + \Fplot(50)(-2.31,2.31) \Stroke + \Green + \def\Fx(#1,#2){\Cosh(#1,#2)} + \Fplot(50)(-2.3,2.3) \Stroke + \Blue + \def\Fx(#1,#2){\Tanh(#1,#2)} + \Fplot(50)(-6,6) \Stroke +\end{lapdf} +\bigskip + +{\huge \bf{Area Functions}} + +\begin{lapdf}(12,10.3)(-6,-5) + \Lingrid(10)(1,3)(-6,6)(-5,5) + \Red + \def\Fx(#1,#2){\Asinh(#1,#2)} + \Fplot(50)(-6,6) \Stroke + \Green + \def\Fx(#1,#2){\Acosh(#1,#2)} + \Fplot(80)(1,6) \Stroke + \def\Fx(#1,#2){\Acosh(#1,#2) #2=-#2} + \Fplot(80)(1,6) \Stroke + \Blue + \def\Fx(#1,#2){\Atanh(#1,#2)} + \Fplot(80)(-1,1) \Stroke +\end{lapdf} + +\newpage + +{\huge \bf{Log and Exponential Functions}} + +\begin{lapdf}(10,10.3)(-3,-3) + \Lingrid(10)(1,3)(-3,7)(-3,7) + \Red + \def\Fx(#1,#2){\Ln(#1,#2)} + \Fplot(80)(0.05,7) \Stroke + \Green + \def\Fx(#1,#2){\Log(1.5,#1,#2)} + \Fplot(80)(0.3,7) \Stroke + \Blue + \def\Fx(#1,#2){\Exp(#1,#2)} + \Fplot(50)(-3,1.946) \Stroke + \Cyan + \def\Fx(#1,#2){\Pow(1.5,#1,#2)} + \Fplot(50)(-3,4.8) \Stroke +\end{lapdf} +\bigskip + +{\huge \bf{Square and Square Root Functions}} + +\begin{lapdf}(10,10.3)(-3,-3) + \Lingrid(10)(1,3)(-3,7)(-3,7) + \Red + \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) #2=\x} + \Fplot(100)(-2.64,2.64) \Stroke + \Green + \def\Fx(#1,#2){\Sqrt(#1,#2)} + \Fplot(100)(0,7) \Stroke + \def\Fx(#1,#2){\Sqrt(#1,#2) #2=-#2} + \Fplot(100)(0,7) \Stroke +\end{lapdf} + +\newpage + +{\huge \bf{Power and Root Functions}} +\bigskip + +\begin{lapdf}(18,22)(0,0) + \Lingrid(10)(1,3)(0,18)(0,22) + \Rect(0,0,18,22) + \Setclip + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.0,#2)} + \Fplot(100)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.1,#2)} + \Fplot(100)(0,16.6) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.2,#2)} + \Fplot(100)(0,13.2) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.3,#2)} + \Fplot(100)(0,10.8) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.4,#2)} + \Fplot(100)(0,9.2) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.5,#2)} + \Fplot(100)(0,7.9) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,1.7,#2)} + \Fplot(100)(0,6.3) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,2.0,#2)} + \Fplot(100)(0,4.8) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,2.5,#2)} + \Fplot(100)(0,3.5) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,3.0,#2)} + \Fplot(50)(0,2.8) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,3.5,#2)} + \Fplot(30)(0,2.45) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Pow(#1,4.0,#2)} + \Fplot(23)(0,2.2) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.1,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.2,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.3,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.4,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.5,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,1.7,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,2.0,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,2.5,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,3.0,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,3.5,#2)} + \Fplot(300)(0,18) \Stroke + \Stepcol(0,23,2) + \def\Fx(#1,#2){\Root(#1,4.0,#2)} + \Fplot(300)(0,18) \Stroke +\end{lapdf} + +\newpage + +{\huge \bf{Hyperbolas}} + +\begin{lapdf}(10,10.3)(-5,-5) + \Lingrid(10)(1,3)(-5,5)(-5,5) + \Red + \def\Fx(#1,#2){\Dset(\x,#1) \Dset(\y,1) \Ddiv(\y,\x) #2=\y} + \Fplot(50)(-5,-0.2) \Stroke + \Fplot(50)(0.2,5) \Stroke + \Green + \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) \Dset(\y,1) \Ddiv(\y,\x) #2=\y} + \Fplot(50)(-5,-0.447) \Stroke + \Fplot(50)(0.447,5) \Stroke +\end{lapdf} +\bigskip + +{\huge \bf{Other Functions}} + +\begin{lapdf}(10,10.3)(-5,-5) + \Lingrid(10)(1,3)(-5,5)(-5,5) + \Red + \def\Fx(#1,#2){\Dset(\x,#1) \y=\x \x=2.5\x \Sin(\Np\x,#2) \Ddiv(#2,\y) #2=2#2} + \Fplot(100)(-5,5) \Stroke + \Green + \def\Fx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) \Dadd(\x,1) \Dset(\y,5) \Ddiv(\y,\x) #2=\y} + \Fplot(100)(-5,5) \Stroke + \Blue + \def\Fx(#1,#2){\Dset(\x,#1) \y=9\x \Dmul(\x,\x) \Dadd(\x,1) \Ddiv(\y,\x) #2=\y} + \Fplot(100)(-5,5) \Stroke +\end{lapdf} + +\newpage + +{\huge \bf{Damped Oszillator}} + +\begin{lapdf}(14,11.3)(-2,-5) + \Lingrid(10)(1,3)(-2,12)(-5,6) + \Red + \def\Fx(#1,#2){\Dset(#2,#1) #2=3#2 \Sin(\Np#2,#2)\Dset(\x,#1) \x=-0.2\x \Exp(\Np\x,\x) \Dmul(#2,\x) #2=4#2} + \Fplot(300)(-2,12) \Stroke + \Dgray + \Dash(1) + \def\Fx(#1,#2){\Dset(#2,#1) #2=-0.2#2 \Exp(\Np#2,#2) #2=4#2} + \Fplot(50)(-1.6,12) \Stroke + \def\Fx(#1,#2){\Dset(#2,#1) #2=-0.2#2 \Exp(\Np#2,#2) #2=-4#2} + \Fplot(50)(-0.6,12) \Stroke +\end{lapdf} +\bigskip + +{\huge \bf{Function, Derivatives \& Asymptotes}} + +\begin{lapdf}(12,10.3)(-5,-5) + \Lingrid(10)(1,3)(-5,7)(-5,5) + \Red + \def\Fx(#1,#2){\Dset(\x,#1) \Dsub(\x,2) \y=#1\x \Dsub(\y,3) \y=0.2\y \Dset(#2,1) \Ddiv(#2,\x) \Add(#2,\y)} + \Fplot(100)(-4.47,1.765) \Stroke + \Fplot(100)(2.18,6.28) \Stroke + \Green + \def\Fx(#1,#2){\Dset(#2,#1) \Dsub(#2,1) \x=#2 \Dsub(\x,1) \Dmul(\x,\x) #2=0.4#2 \Dset(\y,1) \Ddiv(\y,\x) \Sub(#2,\y)} + \Fplot(100)(-5,1.56) \Stroke + \Fplot(100)(2.422,7) \Stroke + \Blue + \def\Fx(#1,#2){\Dset(#2,2) \Dset(\x,#1) \Dsub(\x,2) \Pot(\Np\x,3,\x) \Ddiv(#2,\x) \Dadd(#2,0.4)} + \Fplot(100)(-5,1.282) \Stroke + \Fplot(100)(2.758,7) \Stroke + \Black + \Setwidth(0.01) + \def\Fx(#1,#2){\Dset(#2,#1) \Dadd(#2,1) \Dset(\x,#1) \Dsub(\x,3) \Dmul(#2,\x) #2=0.2#2} + \Fplot(100)(-4.4,6.43) \Stroke + \Dash(1) + \Line(2,-5)(2,5) \Stroke + \Line(-5,0.4)(7,0.4) \Stroke + \Line(-5,-2.4)(7,2.4) \Stroke +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/geometry.pdf b/Master/texmf-dist/doc/latex/lapdf/geometry.pdf Binary files differnew file mode 100644 index 00000000000..6a043912280 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/geometry.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/geometry.tex b/Master/texmf-dist/doc/latex/lapdf/geometry.tex new file mode 100644 index 00000000000..96b54cd4ac5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/geometry.tex @@ -0,0 +1,44 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Geometric Sketch}} +\bigskip + +\begin{lapdf}(14,18)(-9,-12) + \Lingrid(10)(1,3)(-9,5)(-12,6) + \Setwidth(0.01) + \Dash(1) + \Polygon(-4,0)(3,6)(4,0) \Stroke + \Polygon(-6,-12)(3,6) \Stroke + \Dash(0) + \Line(-7.849,-11.396)(3.049,1.796) \Stroke + \Line(-5.882,-1.924)(1.082,-7.676) \Stroke + \Setwidth(0.02) + \Red + \Rcurve(128)(-4,0,3)(3,6,2)(4,0,3) \Stroke + \Rcurve(128)(-4,0,3)(3,6,-2)(4,0,3) \Stroke + \Green + \Rcurve(96)(-4,0,2)(3,6,1)(4,0,2) \Stroke + \Rcurve(96)(-4,0,2)(3,6,-1)(4,0,2) \Stroke + \Blue + \Rcurve(64)(-4,0,4)(3,6,1)(4,0,4) \Stroke + \Rcurve(64)(-4,0,4)(3,6,-1)(4,0,4) \Stroke + \Point(1)(-4,0) + \Point(1)(3,6) + \Point(1)(4,0) + \Point(1)(1.2,2.4) + \Point(1)(-6,-12) + \Point(1)(1,2) + \Point(1)(-3,-6) + \Point(1)(0.6,1.2) + \Point(1)(-1,-2) + \Point(1)(-2.4,-4.8) + \Point(1)(-7.849,-11.396) + \Point(1)(3.049,1.796) + \Point(1)(-5.882,-1.924) + \Point(1)(1.082,-7.676) +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/grids.pdf b/Master/texmf-dist/doc/latex/lapdf/grids.pdf Binary files differnew file mode 100644 index 00000000000..95cbdfbd4f1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/grids.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/grids.tex b/Master/texmf-dist/doc/latex/lapdf/grids.tex new file mode 100644 index 00000000000..8da8abae13d --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/grids.tex @@ -0,0 +1,69 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge\bf{Lingrid}} +\bigskip + +\begin{lapdf}(15.5,10.5)(-5,-5) + \Lingrid(10)(1,3)(-5,10)(-5,5) +\end{lapdf} +\bigskip + +\begin{lapdf}(15.5,10.5)(-5,0) + \Lingrid(10)(1,3)(-5,10)(0,10) +\end{lapdf} + +\newpage + +{\Huge\bf{Logxgrid}} +\bigskip + +\begin{lapdf}(15.5,10.5)(0,-5) + \Logxgrid(10)(1,3)(-1,2)(-5,5) +\end{lapdf} +\bigskip + +\begin{lapdf}(15.5,10.5)(0,0) + \Logxgrid(10)(1,3)(-1,2)(0,10) +\end{lapdf} + +\newpage + +{\Huge\bf{Logygrid}} +\bigskip + +\begin{lapdf}(15.5,10.5)(0,0) + \Logygrid(10)(1,3)(1,3)(0,15) +\end{lapdf} +\bigskip + +\begin{lapdf}(15.5,10.5)(-5,0) + \Logygrid(10)(1,3)(-1,1)(-5,10) +\end{lapdf} + +\newpage + +{\Huge\bf{Logxygrid}} +\bigskip + +\begin{lapdf}(15.5,20.5)(0,0) + \Logxygrid(10)(1,3)(1,4)(0,4) +\end{lapdf} + +\newpage + +{\Huge\bf{Polgrid}} +\bigskip + +\begin{lapdf}(11,10.5)(-5.5,-5) + \Polgrid(1,3)(5) +\end{lapdf} +\bigskip + +\begin{lapdf}(11,11.5)(-5.5,-5.8) + \Polgrid(1,4)(5) +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/hippo.pdf b/Master/texmf-dist/doc/latex/lapdf/hippo.pdf Binary files differnew file mode 100644 index 00000000000..0011f18e2f0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/hippo.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/hippo.tex b/Master/texmf-dist/doc/latex/lapdf/hippo.tex new file mode 100644 index 00000000000..2fe1ec48f9d --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/hippo.tex @@ -0,0 +1,22 @@ +\input preamble.tex + +\Defnum(\n,-1) + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.4cm + +\begin{center} +{\Huge\bf{Hippopede Curves}} +\bigskip + +\begin{lapdf}(12,14)(-6,-7) + \Polgrid(1,4)(6) + \def\Px(#1,#2){\Sin(#1,#2) \Dmul(#2,#2) #2=\n#2 + \Dsub(#2,10) #2=-#2 \Sqrt(\Np#2,#2) #2=1.897#2} + \Whilenum{\n<10}{\Add(\n,1) \Stepcol(0,23,2) \Pplot(150)(0,2) \Stroke} +\end{lapdf} + +$r(\phi)=6 \cdot \sqrt{1-c \cdot \sin^2\phi}$ with ($c=0,1 \dots 1,0$) +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/lapdf.pdf b/Master/texmf-dist/doc/latex/lapdf/lapdf.pdf Binary files differnew file mode 100644 index 00000000000..f3c90f2836c --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/lapdf.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/lapdf.tex b/Master/texmf-dist/doc/latex/lapdf/lapdf.tex new file mode 100644 index 00000000000..057ccc2c1da --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/lapdf.tex @@ -0,0 +1,325 @@ +\documentclass[a4paper,11pt]{article} +\usepackage[color]{lapdf} +\usepackage{shortvrb} +\textheight24.62cm +\textwidth15.92cm +\oddsidemargin0cm +\topmargin-1cm +\parindent0cm +\parskip0cm +\unitlength1cm +\pagestyle{headings} + +\MakeShortVerb{\|} + +\newdimen\a +\newdimen\x +\newdimen\y +\Defnum(\n,0) + +\title{\Huge{\bf\Lapdf} \\ \vspace{0.5cm} + \Large Drawing in \TeX{} with PDF commands \\ \vspace{0.5cm} + \normalsize Integral/Rational Bezier Curves \\ + Many Useful Drawing Primitives \\ + A Rich Set Of Math Functions \\ + Function, Parametric \& Polar Plots and Grids \\ \vspace{0.8cm} + \begin{lapdf}(6,6.3)(-3,-3.3) + \Whilenum{\n<360}{% + \Nextcol(0,23) \Rad(\n,\a) + \Cos(\Np\a,\x) \Add(\x,\x) + \Sin(\Np\a,\y) \Add(\y,\y) + \Circle(64)(\Np\x,\Np\y,1.5) \Stroke + \Add(\n,15)} + \end{lapdf}} +\author{Detlef Reimers, detlefreimers@gmx.de} +\date{\today} + +% --------------------------------------------------------------------------- +\begin{document} +\maketitle + +\begin{abstract} +This package started as a project for drawing arbitrary bezier curves. +It implements the integral and rational bezier curves of degree one up +to seven. Using quadratic rational bezier curves makes it possible to +exactly draw arbitrary conics. Also implemented are most elementary math +functions as power series and two loop commands for programming constructs. + +This basic functionality gives the ability to draw many geometric +shapes like arbitray circles, rotated ellipses, rectangles and polygons. +The package also implements function, parametric and polar plotting +routines together with the possibility to draw special grids. + +You are invited to extend this package to your own needs. This is not +very complicated, because you can use all of the math capabilities in +your \TeX{} documents directly and so, you can program your drawings +(see example above). The package also defines a rainbow color palette +and you can step through the colors. + +This package needs the standard \LaTeX{} |calc| package for multiplication +and division of dimensions. No other packages are needed. Most of the drawing +primitives rely on the graphic capabilities of PDF, which is mostly like +PostScript without programming. With the help of the \pdfTeX{} engine this +programming possibility is back at the users hand. Now you can write your +PDF-graphics directly in your \pdfTeX{} source file. + +The author hopes that \Lapdf{} may be useful and helps, to produce beautiful +and sophisticated drawings. I will be thankful for contructive criticism and +help from the users to further improve this package. +\end{abstract} + +\tableofcontents +\parskip0.2cm + +\section{Introduction} + +\subsection{What is it for?} + +\Lapdf{} is intended as a practical extension to the standard \LaTeX{} +|picture| environment. It gives the user the ability to quickly +draw many useful geometric shapes like arbitrary lines, circles, +rotated ellipses, arcs, vectors, rectangles, triangles and equilateral +polygons. + +You can also draw bezier curves of degree one to seven. You may +choose the integral bezier form or the more general rational form. +The letter one enables you to exactly draw all kind of conic curves +like parabolas, hyperbolas, ellipses and circles. There is no need to +approximate them with quadratic or cubic bezier curves. + +This package also implements a rich set of basic math functions like: |Sin|, +|Cos|, |Tan|, |Asin|, |Acos|, |Atan|, |Sinh|, |Cosh|, |Tanh|, |Asinh|, |Acosh|, +|Atanh|, |Exp|, |Pow|, |Ln|, |Log|, |Sqrt|, |Hypot|, |Len|. They can be used in +your documents to program special plot functions or in loop constructs in +connection with drawing functions. Al these functions are based on the ability +to do floating point multiplication and division with dimension values and +with dimension registers. These calculations are provided by the help of the +|calc| package, which belongs to the standard \LaTeX{} tools. + +\subsection{How does it work?} + +\TeX{} and also \LaTeX{} were made to typeset arbirary complicated and +structured text documents, with the special ability to integrate math formulas +into the document. |Donald Knuth|, the inventor of this marvellous +typesetting machine, only provided a small peephole to implement +inline graphics in \TeX{} documents. The basic shape of these drawing +capabilities is the |dot|. If you want to draw a line with pure \TeX{} +commands, you have to draw lots of evenly spaced dots. This uses much of +\TeX{} memory and it takes a lot of time to place them. |Leslie Lamport|, +the inventor of the \LaTeX{} macro package, used this technique together with +some specially designed graphic fonts for his implementation of the |picture| +environment, which allows to produce simple to moderate comlicated graphics +from inside the \LaTeX{} document. This approach is nice for simple +drawings, but you are limited to only a small set of line or vector slopes, +you only can draw circles of limited radii and so on. This is the price for +general portability, because the line and circle fonts are limited to special +drawing primitives. + +Other new drawing packages avoid these limitations by using the |Postscript| +programming language for calculations and drawing. With the help of |DVIPS| +you can produce arbitrary sophisticated drawings to be integrated into you +\LaTeX{} file. But you are limited to output devices which can handle postscript. + +So, there were other approaches to implement more general drawing capabilities. +The first one uses so called |Tpic| specials. |Tpic| is a simple graphic +language from Unix systems, which was used together with |Groff| to produce +documents with inline graphics. Another approach was done by +|Eberhard Matthes| in his |EmTeX| distribution. He implemented a small but +powerful set of graphic primitives into his DVI drivers, which could set +points, draw arbitrary lines and set the linewidth. + +\Lapdf{} evolved out of my former |Ladraw| style, which had very similar +capabilities, but no way to fill or clip graphics. \Lapdf{} uses the |PDF| +capabilities directly, so it does not rely on other packages or tools with the +exception of the |calc| style to perform floating point arithmetic in \TeX{}. + +The ability to draw arbitrary lines frees us from the use of single dots as +basic drawing primitve. We don't need to calculate the number of dots to draw +a smooth bezier curve, because we use straight line segments to draw them. This +way, we never have white spaces in curve shapes, but we have to take care to use +enough line segments to produce a smooth curve. + +The Bezier curve drawing is invoked by two general calling routines |Curve| +for integral curves and |Rcurve| for rational curves. As an example, the +command: +\begin{verbatim} + \Curve(64)(0,0)(3,6)(6,-7)(9,0) +\end{verbatim} +will draw an integral cubic bezier curve (4 points), consisting of 64 line segments +and the command: +\begin{verbatim} + \Rcurve(96)(0,0,1)(5,8,2)(10,0,1) +\end{verbatim} +will draw a rational quadratic bezier curve (3 points) with the weights (will be +explained later) $w_0=1$, $w_1=2$ and $w_2=1$, consisting of 96 line segments. + +This package uses round brackets around command parameters with the only +exception of the |Text| command, where the last argument (the actual text) +cannot be bracketed with round brackets. This convention makes some functions +a little more static, but you don't have to remember complicated calling +syntaxes. My first decision was to make this style very easy to use. All +\Lapdf{} commands begin with a capital letter to distinguish them from other, +equally spelled \TeX{} commands. I hope that the names of the graphic macros +helps guessing what they do. The standiest one seems to be |concat|, which +is a native |PDF| matrix calculation commands, the others tell the user +what they mean. + +\subsection{How to use it?} + +Here are some simple examples that will show you the basic usage of the +\Lapdf{} package. First, we want to draw an ellipse at (1,2), rotated by an +angle of $30\deg$ with diameters $a=3cm$ and $b=2cm$ with red color and linewidth +of $0.3pt$. We also want to draw two axes with tick marks. The center point will +be marked and also the two main axes of the ellipse will be drawn dashed. +\vspace{0.1cm} + +\begin{minipage}[c][7cm]{8cm} +\small{ +\begin{verbatim} + \documentclass{article} + \usepackage[color]{Lapdf} + \unitlength1cm + \begin{document} + \begin{lapdf}(6,6)(-2,-1) + \Lingrid(10)(1,3)(-2,4)(-1,5) + \Red + \Ellipse(50)(1,2)(3,2,30) \Stroke + \Blue + \Dash(3) + \Line(-2,0.5)(4,3.5) \Stroke + \Line(-0.5,5)(2.5,-1) \Stroke + \Dash(0) + \Point(1)(1,2) + \Text(1.1,2.2,cb){C} + \end{lapdf} + \end{document} +\end{verbatim} +} +\end{minipage} +\begin{minipage}[c][7cm]{7cm} +\begin{lapdf}(6,6.3)(-2,-1) + \Lingrid(10)(1,3)(-2,4)(-1,5) + \Red + \Ellipse(50)(1,2)(3,2,30) \Stroke + \Blue + \Dash(3) + \Line(-2,0.5)(4,3.5) \Stroke + \Line(-0.5,5)(2.5,-1) \Stroke + \Dash(0) + \Point(1)(1,2) + \Text(1.1,2.2,cb){C} +\end{lapdf} +\end{minipage} +\vspace{0.1cm} + +From this example you can see how the package is invoked in the preamble +of the document. If you only want to draw in black and white, you would +use the option |black| instead of |color| or simply no option. This means that +all color commands will be silently ignored. The ellipse is drawn with 50 +line segments in it's first part and with $2\cdot 50=100$ segments in +the second part. |Line| draws a line (solid or dashed) between two points. The +|Point| command draws a circle filled with a shade of gray (black..white). +|Puttext| puts the bracketed text at a specific point with optional position +parameters (here centered and bottom). + +Our next example shows how to plot the function $f(x)=2\sin x$ from $x=-4$ +to $x=4$. We also want to write the term into the picture. We have to +supply the function definition in |Fx|. +\vspace{0.1cm} + +\begin{minipage}[c][5.7cm]{7.3cm} +\small{ +\begin{verbatim} + \documentclass{article} + \usepackage[color]{Lapdf} + \unitlength1cm + \begin{document} + \begin{lapdf}(8,4)(-7,-2) + \Lingrid(10)(1,3)(-4,4)(-2,2) + \Red + \def\Fx(#1,#2){\Sin(#1,#2) #2=2#2} + \Fplot(50)(-4,4) \Stroke + \Text(-2,1.2,cb){$y=2\sin x$} + \end{lapdf} + \end{document} +\end{verbatim} +} +\end{minipage} +\begin{minipage}[c][5.7cm]{8.5cm} +\begin{lapdf}(8,4)(-4,-2) + \Lingrid(10)(1,3)(-4,4)(-2,2) + \Red + \def\Fx(#1,#2){\Sin(#1,#2) #2=2#2} + \Fplot(50)(-4,4) \Stroke + \Text(-2,1.2,cb){$y=2\sin x$} +\end{lapdf} +\end{minipage} +\vspace{0.1cm} + +The function definition has two parameters. The first is the +$x$-value and the second is the register for the function value +$f(x)$. The |Sin| function also takes two parameters, the +same way as |Fx| does. So, $\sin x$ is in register |\#2|. +At last we have to multiply this value with 2 to get $2\sin x$. +The function is plotted with 50 line segments. The last introductory +example will draw several bezier curves (integral and rational) and +axes without a grid. All curves are drawn in different colors. +\vspace{0.1cm} + +\begin{minipage}[c][7.8cm]{9cm} +\small{ +\begin{verbatim} + \documentclass{article} + \usepackage[color]{Lapdf} + \unitlength1cm + \begin{document} + \begin{lapdf}(6,6)(0,0) + \Lingrid(10)(0,2)(0,6)(0,6) + \Stepcol(0,23,4) + \Curve(32)(0,0)(6,6) \Stroke + \Stepcol(0,23,4) + \Curve(64)(0,0)(3,6)(6,0) \Stroke + \Stepcol(0,23,4) + \Curve(64)(0,3)(2,6)(4,0)(6,3) \Stroke + \Stepcol(0,23,4) + \Rcurve(64)(0,0,1)(3,6,5)(6,0,1) \Stroke + \Stepcol(0,23,4) + \Rcurve(64)(0,3,1)(2,6,10)(4,0,10)(6,3,1) + \Stroke + \end{lapdf} + \end{document} +\end{verbatim} +} +\end{minipage} +\begin{minipage}[c][7.8cm]{6.5cm} +\begin{lapdf}(6,6)(0,0) + \Lingrid(10)(0,2)(0,6)(0,6) + \Stepcol(0,23,4) + \Curve(64)(0,0)(6,6) \Stroke + \Stepcol(0,23,4) + \Curve(64)(0,0)(3,6)(6,0) \Stroke + \Stepcol(0,23,4) + \Curve(64)(0,3)(2,6)(4,0)(6,3) \Stroke + \Stepcol(0,23,4) + \Rcurve(64)(0,0,1)(3,6,5)(6,0,1) \Stroke + \Stepcol(0,23,4) + \Rcurve(64)(0,3,1)(2,6,10)(4,0,10)(6,3,1) + \Stroke +\end{lapdf} +\end{minipage} +\vspace{0.1cm} + +The grid is disabled with the first 0 value in |Lingrid|. The next +value 2 only shows ticks mark without text. The first three curves are +integral bezier curves with degree 1, 2 and 3. The next two are +rational bezier curves with degree 2 and 3. All curves are drawn with +64 line segments. The rational form needs a so called |weight| parameter. +Usually, the first and the last values are set to 1, the other may have +arbitrary values. If $w>1$, the curve is pulled into the direction of +the bezier point, otherwise it is pushed away from this point. This allows +much more control over the shape of the bezier curve, compared to the +integral form. The |Stepcol| command cycles between color 0 and color +23 in step of length 4. Please look at the file |colors.tex| to see a +whole color circle with all possible 96 colors. + +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/licence.txt b/Master/texmf-dist/doc/latex/lapdf/licence.txt new file mode 100644 index 00000000000..e06ef4846fd --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/licence.txt @@ -0,0 +1,189 @@ +GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/> + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS +0. Definitions. + +ÒThis LicenseÓ refers to version 3 of the GNU General Public License. + +ÒCopyrightÓ also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +ÒThe ProgramÓ refers to any copyrightable work licensed under this License. Each licensee is addressed as ÒyouÓ. ÒLicenseesÓ and ÒrecipientsÓ may be individuals or organizations. + +To ÒmodifyÓ a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a Òmodified versionÓ of the earlier work or a work Òbased onÓ the earlier work. + +A Òcovered workÓ means either the unmodified Program or a work based on the Program. + +To ÒpropagateÓ a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To ÒconveyÓ a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays ÒAppropriate Legal NoticesÓ to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. +1. Source Code. + +The Òsource codeÓ for a work means the preferred form of the work for making modifications to it. ÒObject codeÓ means any non-source form of a work. + +A ÒStandard InterfaceÓ means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The ÒSystem LibrariesÓ of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A ÒMajor ComponentÓ, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The ÒCorresponding SourceÓ for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. +2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + * a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + * b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to Òkeep intact all noticesÓ. + * c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + * d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an ÒaggregateÓ if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + * a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + * b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + * c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + * d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + * e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A ÒUser ProductÓ is either (1) a Òconsumer productÓ, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, Ònormally usedÓ refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +ÒInstallation InformationÓ for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. +7. Additional Terms. + +ÒAdditional permissionsÓ are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + * a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + * b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + * c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + * d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + * e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + * f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered Òfurther restrictionsÓ within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An Òentity transactionÓ is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. +11. Patents. + +A ÒcontributorÓ is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's Òcontributor versionÓ. + +A contributor's Òessential patent claimsÓ are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, ÒcontrolÓ includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a Òpatent licenseÓ is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To ÒgrantÓ such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. ÒKnowingly relyingÓ means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is ÒdiscriminatoryÓ if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License Òor any later versionÓ applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ÒAS ISÓ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/lapdf/line.pdf b/Master/texmf-dist/doc/latex/lapdf/line.pdf Binary files differnew file mode 100644 index 00000000000..15e29efa88d --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/line.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/line.tex b/Master/texmf-dist/doc/latex/lapdf/line.tex new file mode 100644 index 00000000000..2fd0f67ceb8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/line.tex @@ -0,0 +1,45 @@ +\input preamble.tex + +\Defnum(\n,10) +\Defdim(\m,0) +\Defdim(\r,7) +\newdimen\a +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.25cm + +\begin{center} +{\Huge\bf{Line}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Whiledim{\m<360}{\Rad(\Np\m,\a) + \Cos(\Np\a,\x) \Mul(\x,7) + \Sin(\Np\a,\y) \Mul(\y,7) + \Nextcol(0,23) + \Line(0,0)(\Np\x,\Np\y) \Stroke + \Dadd(\m,7.5)} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{Lineto}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Moveto(\Np\r,0) + \Whilenum{\n<1445}{\Rad(\n,\a) + \Cos(\Np\a,\x) \Dmul(\x,\r) + \Sin(\Np\a,\y) \Dmul(\y,\r) + \Nextcol(0,23) + \Lineto(\Np\x,\Np\y) \Stroke + \Moveto(\Np\x,\Np\y) + \Add(\n,10) \Dsub(\r,0.05)} +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/polygon.pdf b/Master/texmf-dist/doc/latex/lapdf/polygon.pdf Binary files differnew file mode 100644 index 00000000000..b606f6e0f29 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/polygon.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/polygon.tex b/Master/texmf-dist/doc/latex/lapdf/polygon.tex new file mode 100644 index 00000000000..b0142bb7ebf --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/polygon.tex @@ -0,0 +1,28 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge\bf{Polygon}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Dgray + \Polygon(-9,4)(-4,9)(4,9)(9,4)(9,-4)(4,-9)(-4,-9)(-9,-4)(-9,4) \Stroke + \Red + \Polygon(-6.928,0)(-6.5,6.5)(0,6.928)(6.5,6.5)(6.928,0) + (6.5,-6.5)(0,-6.928)(-6.5,-6.5)(-6.928,0) \Stroke + \Green + \Polygon(-6.928,0)(-6,3.464)(-3.464,6)(0,6.928)(3.464,6)(6,3.464)(6.928,0) + (6,-3.464)(3.464,-6)(0,-6.928)(-3.464,-6)(-6,-3.464)(-6.928,0) \Stroke + \Blue + \Epolygon(3)(0,0)(6.928,0) \Stroke + \Cyan + \Epolygon(3)(0,0)(6.928,30) \Stroke + \Magenta + \Epolygon(3)(0,0)(6.928,60) \Stroke + \Yellow + \Epolygon(3)(0,0)(6.928,90) \Stroke +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/polynom.pdf b/Master/texmf-dist/doc/latex/lapdf/polynom.pdf Binary files differnew file mode 100644 index 00000000000..f82b2057f4f --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/polynom.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/polynom.tex b/Master/texmf-dist/doc/latex/lapdf/polynom.tex new file mode 100644 index 00000000000..6fcdb5a07a2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/polynom.tex @@ -0,0 +1,44 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.4cm + +\begin{center} +{\Huge\bf{Polynom, Derivatives \& Tangents}} +\bigskip + +\begin{lapdf}(12,12.5)(-6,-6) + \Red + \Dash(0) + \Polynom(-4.80,+3.95)(+0.2,+0.2,-2.4,+0.0) \Stroke + \Polynom(-4,3)(+0.2,+0.2,-2.4,+0.0) \Gfill(0.95) + \Blue + \Polynom(-4.080,+3.42)(+0.0,+0.6,+0.4,-2.4) \Stroke + \Green + \Dash(0) + \Polynom(-5.30,+4.65)(+0.0,+0.0,+1.2,+0.4) \Stroke + \Lingrid(10)(1,3)(-6,6)(-6,6) + \Setwidth(0.01) + \Black + \Dash(3) + \Line(-2.36,0)(-2.36,+4.15) \Stroke + \Line(-0.33,0)(-0.33,+0.84) \Stroke + \Line(+1.69,0)(+1.69,-2.52) \Stroke + \Dash(0) + \Tangent(-2.361)(-3.86,-0.86)(+0.2,+0.2,-2.4,+0) \Stroke + \Tangent(+1.694)(+0.19,+3.19)(+0.2,+0.2,-2.4,+0) \Stroke + \Point(1)(-0.33,0.844) + \Point(1)(-2.36,0) + \Point(1)(-0.33,0) + \Point(1)(+1.69,0) + \Text(-2.4,+4.3,bc){$E_1$} + \Text(+1.65,-2.7,tc){$E_2$} + \Text(-0.5,+0.85,rc){$I$} + \Text(+1.0,-3.8,l){$y=0,2\cdot x^3+0,2\cdot x^2-2,4\cdot x$} + \Text(+0.922,-4.6,l){$y'=0,6\cdot x^2+0,4\cdot x-2,4$} + \Text(+0.844,-5.4,l){$y''=1,2\cdot x+0,4$} +\end{lapdf} + +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/pplot.pdf b/Master/texmf-dist/doc/latex/lapdf/pplot.pdf Binary files differnew file mode 100644 index 00000000000..6be852aafce --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/pplot.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/pplot.tex b/Master/texmf-dist/doc/latex/lapdf/pplot.tex new file mode 100644 index 00000000000..b6d6ffaea5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/pplot.tex @@ -0,0 +1,89 @@ +\input preamble.tex + +\newdimen\a +\newdimen\b +\newdimen\c +\newdimen\r + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Polar Functions I}} +\bigskip + +\begin{lapdf}(10,11)(-5,-6) + \Polgrid(1,4)(4) + \Red + \def\Px(#1,#2){\Sin(#1,#2) \Dadd(#2,1) #2=2#2} + \Pplot(60)(0,2) \Stroke + \Cyan + \def\Px(#1,#2){\Sin(#1,#2) \Dsub(#2,1) #2=-2#2} + \Pplot(60)(0,2) \Stroke + \Green + \def\Px(#1,#2){\Cos(#1,#2) \Dadd(#2,1) #2=2#2} + \Pplot(60)(0,2) \Stroke + \Blue + \def\Px(#1,#2){\Cos(#1,#2) \Dsub(#2,1) #2=-2#2} + \Pplot(60)(0,2) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,10)(-5,-5) + \Polgrid(0,2)(5) + \Magenta + \def\Px(#1,#2){\Dset(#2,#1) \Mul(#2,4) \Div(#2,3) \Cos(\Np#2,#2) #2=5#2} + \Pplot(600)(0,6) \Stroke +\end{lapdf} + +\newpage + +{\Huge \bf{Polar Functions II}} +\bigskip + +\begin{lapdf}(10,11)(-5,-6) + \Polgrid(1,2)(5) + \Magenta + \def\Px(#1,#2){\Dset(#2,#1) #2=0.2#2} + \Pplot(300)(0,8) \Stroke + \Green + \def\Px(#1,#2){\Dset(#2,#1) #2=0.1835#2 \Exp(\Np#2,#2) \Div(#2,20)} + \Pplot(200)(0,8) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,10)(-5,-5) + \Polgrid(1,3)(5) + \Red + \def\Px(#1,#2){\Dset(\a,#1) \b=2\a \c=6\a \a=4\a + \Cos(\Np\a,#2) #2=4#2 \Sin(\Np\b,\b) \Sin(\Np\c,\c) \Sub(#2,\b) \Add(#2,\c)} + \Pplot(200)(0,2) \Stroke +\end{lapdf} + +\newpage + +{\Huge \bf{Polar Functions III}} +\bigskip + +\begin{lapdf}(10,12)(-5,-3) + \Lingrid(10)(0,2)(-5,5)(-2,8) + \Red + \def\Px(#1,#2){\Sin(#1,#2) \Dset(\a,#1) \a=2.5\a + \Sin(\Np\a,\a) \r=\a \Dmul(\r,\r) \Dmul(\a,\r) \Add(#2,\a) #2=4#2} + \Pplot(400)(0,4) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,10)(-5,-5) + \Lingrid(10)(0,2)(-5,5)(-5,5) + \Red + \def\Px(#1,#2){\Dset(#2,#1) \Cos(\Np#2,#2) #2=3#2 \Dadd(#2,1)} + \Pplot(100)(0,2) \Stroke + \Green + \def\Px(#1,#2){\Dset(#2,#1) \Sin(\Np#2,#2) #2=4#2 \Dadd(#2,0.5)} + \Pplot(100)(0,2) \Stroke + \Blue + \def\Px(#1,#2){\Dset(#2,#1) #2=0.1835#2 \Exp(\Np#2,#2) \Div(#2,20)} + \Pplot(200)(0,8) \Stroke +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/preamble.tex b/Master/texmf-dist/doc/latex/lapdf/preamble.tex new file mode 100644 index 00000000000..9d356c35ca6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/preamble.tex @@ -0,0 +1,14 @@ +\documentclass[a4paper,11pt]{article} +\usepackage[color]{lapdf} +\textheight25.12cm +\textwidth18.92cm +\oddsidemargin-1.5cm +\evensidemargin-1.5cm +\topmargin-0.5cm +\topskip0cm +\headheight0cm +\headsep0cm +\parskip0.5cm +\parindent0cm +\unitlength1cm + diff --git a/Master/texmf-dist/doc/latex/lapdf/pythagor.pdf b/Master/texmf-dist/doc/latex/lapdf/pythagor.pdf Binary files differnew file mode 100644 index 00000000000..e24db42a8ab --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/pythagor.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/pythagor.tex b/Master/texmf-dist/doc/latex/lapdf/pythagor.tex new file mode 100644 index 00000000000..053d4c51040 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/pythagor.tex @@ -0,0 +1,80 @@ +\input preamble.tex + +\def\Disk(#1,#2){\Circle(16)(#1,#2,0.03) \Gfill(0)} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.25cm + +\begin{center} +{\Huge\bf{Pythagoras I}} +\bigskip + +\begin{lapdf}(14.9,16.4)(-8.5,-7.8) + \Setwidth(0.01) + \Dash(1) + \Line(0,0)(0,3.6) \Stroke + \Dash(0) + \Arc(8)(+0.0,+3.6)(216.87,90)(0.4) + \Disk(+0.0,+3.4) + \Arc(8)(+0.0,+0.0)(90,90)(0.4) + \Disk(-0.18,+0.18) + \Varc(8)(-4.8,+0.0)(0,36.87)(1) + \Varc(8)(+2.7,+0.0)(180,-53.13)(1) + \Setwidth(0.02) + \Red + \Rectangle(-4.8,0)(6,6)(36.87) \Fill(1,0.9,0.9) + \Green + \Rectangle(2.7,0)(4.5,4.5)(36.87) \Fill(0.9,1,0.9) + \Blue + \Rectangle(2.7,0)(7.5,7.5)(180) \Fill(0.9,0.9,1) + \Text(+1.4,+2.1,c){$a$} + \Text(-2.6,+2.1,c){$b$} + \Text(-1.0,-0.3,c){$c$} + \Text(+0.8,+0.2,c){$p$} + \Text(-2.2,+0.2,c){$q$} + \Text(+0.2,+1.5,c){$h$} + \Text(+3.0,+3.1,c){$A_1$} + \Text(-4.5,+4.2,c){$A_2$} + \Text(-1.1,-3.7,c){$A_3=A_1+A_2$} + \Text(-4.2,+0.2,c){$\alpha$} + \Text(+2.1,+0.25,c){$\beta$} +\end{lapdf} + +\newpage + +{\Huge\bf{Pythagoras II}} +\bigskip + +\begin{lapdf}(12.5,11.8)(-7.5,-5.2) + \Setwidth(0.01) + \Dash(1) + \Line(0,0)(0,4.8) \Stroke + \Dash(0) + \Arc(8)(+0.0,+4.8)(216.87,90)(0.4) + \Disk(+0.0,+4.6) + \Arc(8)(+0.0,+0.0)(90,90)(0.4) + \Disk(-0.15,+0.15) + \Varc(8)(-6.4,+0.0)(0,36.87)(1.2) + \Varc(8)(+3.6,+0.0)(180,-53.13)(1.2) + \Setwidth(0.02) + \Red + \Sector(64)(-3.2,+2.4)(36.87,180)(4.0) \Fill(1,0.9,0.9) + \Green + \Sector(64)(+1.8,+2.4)(-53.13,180)(3.0) \Fill(0.9,1,0.9) + \Blue + \Sector(64)(-1.4,+0.0)(180,180)(5.0) \Fill(0.9,0.9,1) + \Text(+1.9,+2.7,c){$a$} + \Text(-3.4,+2.7,c){$b$} + \Text(-1.0,-0.3,c){$c$} + \Text(+1.2,+0.2,c){$p$} + \Text(-3.0,+0.2,c){$q$} + \Text(+0.2,+2.0,c){$h$} + \Text(+2.9,+3.1,c){$A_1$} + \Text(-4.7,+3.8,c){$A_2$} + \Text(-1.4,-2.3,c){$A_3=A_1+A_2$} + \Text(-5.7,+0.2,c){$\alpha$} + \Text(+2.9,+0.25,c){$\beta$} +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/qcircle.pdf b/Master/texmf-dist/doc/latex/lapdf/qcircle.pdf Binary files differnew file mode 100644 index 00000000000..d4a0bd023eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/qcircle.pdf 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} diff --git a/Master/texmf-dist/doc/latex/lapdf/quartic.pdf b/Master/texmf-dist/doc/latex/lapdf/quartic.pdf Binary files differnew file mode 100644 index 00000000000..d99630456c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/quartic.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/quartic.tex b/Master/texmf-dist/doc/latex/lapdf/quartic.tex new file mode 100644 index 00000000000..b51af6c3e21 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/quartic.tex @@ -0,0 +1,45 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Full Rational Quartic Bezier Curve}} +\bigskip + +\begin{lapdf}(18,17.5)(-9,-8) + \Setwidth(0.01) + \Dash(1) + \Polygon(-9,-6)(-8,+3)(+0,+8)(+8,+2)(+9,-6) \Stroke + \Setwidth(0.02) + \Dash(0) + \Red + \Rcurve(96)(-9,-6,+4)(-8,+3,+3)(+0,+8,+5)(8,+2,+3)(+9,-6,+4) \Stroke + \Blue + \Rcurve(96)(-9,-6,+4)(-8,+3,-3)(+0,+8,+5)(8,+2,-3)(+9,-6,+4) \Stroke + \Black + \Point(0)(-9,-6) + \Point(1)(-8,+3) + \Point(1)(+0,+8) + \Point(1)(+8,+2) + \Point(0)(+9,-6) + \Text(-9.2,-5.8,tr){$P_0$} + \Text(-8.2,+3.2,tr){$P_1$} + \Text(+0.0,+8.2,bc){$P_2$} + \Text(+8.2,+2.2,tl){$P_3$} + \Text(+9.2,-5.8,tl){$P_4$} +\end{lapdf} +\end{center} +\parskip0.2cm +$P_1$ and $P_3$ of the blue curve have negative weights, but both curves +share the same Bezier points and absolute weight values. Now we can see +the complete Bezier curve. The proof for this needs some insight in +projective geometry and it's rather involved, so I only give here the +general rule for drawing complete rational Bezier curves: Make every odd +weight negative and you'll get the complementary Bezier curve. + +You should notice that in this case the Bezier curve no longer lies in +the convex hull of it's control polygon, because his is only holds if all +weights are positive. It should also be mentioned that negative weights for +other points can cause numerical problems, because the denominator can +become zero. +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/rational.pdf b/Master/texmf-dist/doc/latex/lapdf/rational.pdf Binary files differnew file mode 100644 index 00000000000..afd574edcb5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rational.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/rational.tex b/Master/texmf-dist/doc/latex/lapdf/rational.tex new file mode 100644 index 00000000000..eae95a17645 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rational.tex @@ -0,0 +1,58 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Integral And Rational Bezier Curves}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Setwidth(0.01) + \Dash(1) + \Polygon(+0,+9)(+9,+9) + (+9,+3)(-9,-3)(+9,-9) + (+0,-9)(-9,-9)(+9,-3) + (-9,+3)(-9,+9)(+0,+9) \Stroke + \Setwidth(0.02) + \Dash(0) + \Red + \Curve(96)(+0,+9)(+9,+9)(+9,+3)(-9,-3)(+9,-9)(+0,-9) + \Curve(96)(+0,+9)(-9,+9)(-9,+3)(+9,-3)(-9,-9)(+0,-9) \Stroke + \Blue + \Rcurve(128)(+0,+9,1)(+9,+9,6)(+9,+3,1)(-9,-3,6)(+9,-9,6)(+0,-9,1) + \Rcurve(128)(+0,+9,1)(-9,+9,6)(-9,+3,1)(+9,-3,6)(-9,-9,6)(+0,-9,1) \Stroke + \Black + \Point(0)(+0,+9) + \Point(1)(+9,+9) + \Point(1)(+9,+3) + \Point(1)(-9,-3) + \Point(1)(+9,-9) + \Point(0)(+0,-9) + \Point(1)(-9,-9) + \Point(1)(+9,-3) + \Point(1)(-9,+3) + \Point(1)(-9,+9) + \Text(+0.0,+8.8,tc){$w=1$} + \Text(+8.8,+8.8,tr){$w=6$} + \Text(+8.8,+3.2,br){$w=1$} + \Text(-8.8,-3.0,lc){$w=6$} + \Text(+8.8,-8.8,br){$w=6$} + \Text(+0.0,-8.8,bc){$w=1$} + \Text(-8.8,-8.8,bl){$w=6$} + \Text(+8.8,-3.0,rc){$w=6$} + \Text(-8.8,+3.2,bl){$w=1$} + \Text(-8.8,+8.8,tl){$w=6$} +\end{lapdf} +\end{center} + +Both curves are degree five bezier curves and they share the same +control points. The red one consists of two integral curves and the +blue one consists of two rational curves with diffent weights, which +are shown at their control points. Integral Bezier curves can be thought +as rational curves with all weights set to one. + +As you can see, the curve is pulled towards the points, depending on +their weights. Thus you will have much more control over the curve +shape. Rational curves also allow to draw exact conics like ellipses, +circles, parabolas and hyperbolas. +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/rcircle.pdf b/Master/texmf-dist/doc/latex/lapdf/rcircle.pdf Binary files differnew file mode 100644 index 00000000000..5d7310c1790 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rcircle.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/rcircle.tex b/Master/texmf-dist/doc/latex/lapdf/rcircle.tex new file mode 100644 index 00000000000..a4e31599739 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rcircle.tex @@ -0,0 +1,341 @@ +\input preamble.tex + +\Defdim(\a,0) +\Defdim(\d,0) +\Defdim(\x,0) +\Defdim(\y,0) + +\def\Ncirc(#1){\Rad(#1,\a) + \Cos(\Np\a,\x) \Add(\x,\x) + \Sin(\Np\a,\y) \Add(\y,\y) + \Circle(64)(\Np\x,\Np\y,2) \Stroke} + +\def\ctitle#1{{\huge\bf{#1}}} + +\title{\Huge \bf{Drawing Circles \\ + with \\ + Rational Quadratic Bezier Curves}} +\author{Detlef Reimers, detlefreimers@gmx.de} +\date{\today} + +% --------------------------------------------------------------------------- +\begin{document} +\maketitle + +\begin{center} +\begin{lapdf}(8, 10)(-4,-5) + \Whiledim{\d<360}{\Nextcol(0,23) \Ncirc(\Np\d) \Dadd(\d,15)} +\end{lapdf} + +\ctitle{Description} +\end{center} +This document explains, how to calculate the bezier points for +complete circles. These can be drawn with the \texttt{Rcurve} +commmand from the \texttt{lapdf.sty}. If the weight of the point +$P_1$ is $w=\cos(\alpha)$, where $\alpha$ ist the angle between +$P_{0}P_{1}$ and $P_{1}P_{2}$, then the conic will be a circular +arc, if also both length $P_{0}P_{1}$ and $P_{1}P_{2}$ are equal. + +We have to smothly join several of these arcs together, to get +a full circle. Only in the case of two segments, we have have to +use one negative weight. In all other cases we only have positive +weights. In all of the following calculations and drawings we assume, +that the center of the circle lies at the origin. + +\pagebreak +\parskip0.3cm + +\begin{center} +\ctitle{General calculation scheme} + +\begin{lapdf}(14,13.5)(-7,-6.5) + \Dash(1) + \Setwidth(0.01) + \Polygon(+0.00,-5.00) + (+3.63,-5.00)(+4.76,-1.55) + (+5.88,+1.91)(+2.94,+4.05) + (+0.00,+6.18)(-2.94,+4.05) + (-5.88,+1.91)(-4.76,-1.55) + (-3.63,-5.00)(+0.00,-5.00) \Stroke + \Line(+0.00,+0.00)(+0.00,-5.00) \Stroke + \Line(+0.00,+0.00)(+3.63,-5.00) \Stroke + \Line(+0.00,+0.00)(+4.76,-1.55) \Stroke + \Line(+0.00,+0.00)(+5.88,+1.91) \Stroke + \Line(+0.00,+0.00)(+2.94,+4.05) \Stroke + \Line(+0.00,+0.00)(+0.00,+6.18) \Stroke + \Line(+0.00,+0.00)(-2.94,+4.05) \Stroke + \Line(+0.00,+0.00)(-5.88,+1.91) \Stroke + \Line(+0.00,+0.00)(-4.76,-1.55) \Stroke + \Line(+0.00,+0.00)(-3.63,-5.00) \Stroke + \Dash(0) + \Setwidth(0.02) + \Blue + \Circle(96)(0,0,6.18) \Stroke + \Red + \Circle(96)(0,0,5) \Stroke + \Black + \Rcurve(64)(+0.00,-1.30,1)(+0.42,-1.30,0.5)(0.76,-1.05,1) \Stroke + \Point(1)(+3.63,-5.00) + \Point(1)(+4.76,-1.55) + \Point(1)(+5.88,+1.91) + \Point(1)(+2.94,+4.05) + \Point(1)(+0.00,+6.18) + \Point(1)(-2.94,+4.05) + \Point(1)(-5.88,+1.91) + \Point(1)(-4.76,-1.55) + \Point(1)(-3.63,-5.00) + \Point(1)(+0.00,-5.00) + \Text(+3.63,-5.10,tl){$P_1$} + \Text(+4.86,-1.55,tl){$P_2$} + \Text(+5.98,+2.01,cl){$P_3$} + \Text(+3.04,+4.15,bl){$P_4$} + \Text(+0.00,+6.38,bc){$P_5$} + \Text(-3.04,+4.15,br){$P_6$} + \Text(-5.98,+2.01,cr){$P_7$} + \Text(-4.86,-1.55,tr){$P_8$} + \Text(-3.63,-5.10,tr){$P_9$} + \Text(+0.00,-5.10,tc){$P_0=P_{10}$} + \Text(0.10,-2.90,cl){$r$} + \Text(0.10,+3.10,cl){$R$} + \Text(0.25,-0.80,cc){$\alpha$} +\end{lapdf} +\end{center} +We always put $P_0$ at the bottom of the circle and all other points +follow counterclockwise. +This is the general procedure for circle construction with rational +quadratic bezier curves (see picture): +\begin{enumerate} +\item Set the radius $r$. +\item Set the number of bezier segments $n$. +\item Calculate $\alpha = \displaystyle {360^\circ \over 2n}$. +\item Calculate outer radius $R=\displaystyle {r \over \cos(\alpha)}$. +\item Calculate all even bezier points + $P_{2i} = \displaystyle {+r \cdot \sin(2i\cdot\alpha) + \choose -r \cdot \cos(2i\cdot\alpha)}$ for $i=0 \dots n$. +\item Calculate odd bezier points + $P_{2i+1} = \displaystyle {+R \cdot \sin((2i+1)\cdot\alpha) + \choose -R \cdot \cos((2i+1)\cdot\alpha)}$ for $i=0 \dots n-1$. +\end{enumerate} +You can control your calculations, if you check your endpoint $P_{2n}$. +This point is equal with $P_0$. All curves are drawn with the +{\tt Rmoveto()} and {\tt Rcurveto()} combination. + +\pagebreak + +\parskip1cm +\begin{center} +\ctitle{2 Segments} + +\begin{lapdf}(6,7.5)(-3,-3) + \Lingrid(5)(0,1)(-3,3)(-3,5) + \Dash(1) + \Setwidth(0.01) + \Polygon(+2.165,+1.25) + (+0.00,+5.0)(-2.165,+1.25) \Stroke + \Dash(0) + \Red + \Setwidth(0.02) + \Rmoveto(+2.165,+1.25,1) + \Rcurveto(64)(+0.00,+5.0,+0.5)(-2.165,+1.25,1) + \Rcurveto(64)(+0.00,+5.0,-0.5)(+2.165,+1.25,1) \Stroke + \Black + \Point(1)(+2.165,+1.25) + \Point(1)(+0.000,+5.00) + \Point(1)(-2.165,+1.25) +\end{lapdf} + +Circle with $2n+1=5$ points ($w_{2n}=1$ and $w_{2n+1} = \pm \cos(60^\circ) = \pm 0.5$). +\end{center} +\begin{center} +\ctitle{3 Segments} + +\begin{lapdf}(6,7.5)(-3,-3) + \Lingrid(5)(0,1)(-5,5)(-3,5) + \Dash(1) + \Setwidth(0.01) + \Polygon(+0.00,-2.50) + (+4.333,-2.50)(+2.165,+1.25) + (+0.000,+5.00)(-2.165,+1.25) + (-4.333,-2.50)(+0.000,-2.50) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rmoveto(+0.000,-2.50,1) + \Rcurveto(64)(+4.33,-2.50,0.5)(+2.165,+1.25,1) + \Rcurveto(64)(+0.00,+5.00,0.5)(-2.165,+1.25,1) + \Rcurveto(64)(-4.33,-2.50,0.5)(+0.000,-2.50,1) \Stroke + \Black + \Point(1)(+0.000,-2.50) + \Point(1)(+4.333,-2.50) + \Point(1)(+2.165,+1.25) + \Point(1)(+0.000,+5.00) + \Point(1)(-2.165,+1.25) + \Point(1)(-4.333,-2.50) +\end{lapdf} + +Circle with $2n+1=7$ points ($w_{2n}=1$ and $w_{2n+1} = \cos(60^\circ) = 0.5$). +\end{center} + +\pagebreak + +\begin{center} +\ctitle{4 Segments} + +\begin{lapdf}(6,6)(-3,-3) + \Lingrid(5)(0,1)(-3,3)(-3,3) + \Dash(1) + \Setwidth(0.01) + \Polygon(+2.50,+0.00) + (+2.50,+2.50)(+0.00,+2.50) + (-2.50,+2.50)(-2.50,+0.00) + (-2.50,-2.50)(+0.00,-2.50) + (+2.50,-2.50)(+2.50,+0.00) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rmoveto(+2.50,+0.00,1) + \Rcurveto(64)(+2.50,+2.50,0.707)(+0.00,+2.50,1) + \Rcurveto(64)(-2.50,+2.50,0.707)(-2.50,+0.00,1) + \Rcurveto(64)(-2.50,-2.50,0.707)(+0.00,-2.50,1) + \Rcurveto(64)(+2.50,-2.50,0.707)(+2.50,+0.00,1) \Stroke + \Black + \Point(1)(+2.50,+0.00) + \Point(1)(+2.50,+2.50) + \Point(1)(+0.00,+2.50) + \Point(1)(-2.50,+2.50) + \Point(1)(-2.50,+0.00) + \Point(1)(-2.50,-2.50) + \Point(1)(+0.00,-2.50) + \Point(1)(+2.50,-2.50) +\end{lapdf} + +Circle with $2n+1=9$ points ($w_{2n}=1$ and $w_{2n+1} = \cos(45^\circ) = 0.707$). +\end{center} +\begin{center} +\ctitle{5 Segments} + +\begin{lapdf}(6,6)(-3,-3) + \Lingrid(5)(0,1)(-3,3)(-3,3) + \Dash(1) + \Setwidth(0.01) + \Polygon(+0.00,-2.50) + (+1.815,-2.500)(+2.38,-0.775) + (+2.940,+0.905)(+1.47,+2.025) + (+0.000,+3.090)(-1.47,+2.025) + (-2.940,+0.905)(-2.38,-0.775) + (-1.815,-2.500)(+0.00,-2.500) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rmoveto(+0.00,-2.500,1) + \Rcurveto(64)(+1.815,-2.500,0.809)(+2.380,-0.775,1) + \Rcurveto(64)(+2.940,+0.905,0.809)(+1.470,+2.025,1) + \Rcurveto(64)(+0.000,+3.090,0.809)(-1.470,+2.025,1) + \Rcurveto(64)(-2.940,+0.905,0.809)(-2.380,-0.775,1) + \Rcurveto(64)(-1.815,-2.500,0.809)(+0.000,-2.500,1) \Stroke + \Black + \Point(1)(+1.815,-2.500) + \Point(1)(+2.380,-0.775) + \Point(1)(+2.940,+0.905) + \Point(1)(+1.470,+2.025) + \Point(1)(+0.000,+3.090) + \Point(1)(-1.470,+2.025) + \Point(1)(-2.940,+0.905) + \Point(1)(-2.380,-0.775) + \Point(1)(-1.815,-2.500) + \Point(1)(+0.000,-2.500) +\end{lapdf} + +Circle with $2n+1=11$ points ($w_{2n}=1$ and $w_{2n+1} = \cos(36^\circ) = 0.809$). +\end{center} + +\pagebreak + +\begin{center} +\ctitle{6 Segments} + +\begin{lapdf}(6,6)(-3,-3) + \Lingrid(5)(0,1)(-3,3)(-3,3) + \Dash(1) + \Setwidth(0.01) + \Polygon(+2.50,+0.00) + (+2.50,+1.445)(+1.25,+2.165) + (+0.00,+2.885)(-1.25,+2.165) + (-2.50,+1.445)(-2.50,+0.000) + (-2.50,-1.445)(-1.25,-2.165) + (+0.00,-2.885)(+1.25,-2.165) + (+2.50,-1.445)(+2.50,+0.000) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rmoveto(+2.50,+0.000,1) + \Rcurveto(64)(+2.50,+1.445,0.866)(+1.25,+2.165,1) + \Rcurveto(64)(+0.00,+2.885,0.866)(-1.25,+2.165,1) + \Rcurveto(64)(-2.50,+1.445,0.866)(-2.50,+0.000,1) + \Rcurveto(64)(-2.50,-1.445,0.866)(-1.25,-2.165,1) + \Rcurveto(64)(+0.00,-2.885,0.866)(+1.25,-2.165,1) + \Rcurveto(64)(+2.50,-1.445,0.866)(+2.50,+0.000,1) \Stroke + \Black + \Point(1)(+2.50,+0.000) + \Point(1)(+2.50,+1.445) + \Point(1)(+1.25,+2.165) + \Point(1)(+0.00,+2.885) + \Point(1)(-1.25,+2.165) + \Point(1)(-2.50,+1.445) + \Point(1)(-2.50,+0.000) + \Point(1)(-2.50,-1.445) + \Point(1)(-1.25,-2.165) + \Point(1)(+0.00,-2.885) + \Point(1)(+1.25,-2.165) + \Point(1)(+2.50,-1.445) +\end{lapdf} + +Circle with $2n+1=13$ points ($w_{2n}=1$ and $w_{2n+1} = \cos(30^\circ) = 0.866$). +\end{center} + +\begin{center} +\ctitle{7 Segments} + +\begin{lapdf}(6,6)(-3,-3) + \Lingrid(5)(0,1)(-3,3)(-3,3) + \Dash(1) + \Setwidth(0.01) + \Polygon(+0.00,-2.50) + (+1.205,-2.50)(+1.955,-1.560) + (+2.705,-0.62)(+2.440,+0.555) + (+2.170,+1.73)(+1.085,+2.255) + (+0.000,+2.78)(-1.085,+2.255) + (-2.170,+1.73)(-2.440,+0.555) + (-2.705,-0.62)(-1.955,-1.560) + (-1.205,-2.50)(+0.000,-2.500) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rmoveto(+0.000,-2.500,1) + \Rcurveto(64)(+1.205,-2.50,0.901)(+1.905,-1.560,1) + \Rcurveto(64)(+2.705,-0.62,0.901)(+2.440,+0.555,1) + \Rcurveto(64)(+2.170,+1.73,0.901)(+1.085,+2.255,1) + \Rcurveto(64)(+0.000,+2.78,0.901)(-1.085,+2.255,1) + \Rcurveto(64)(-2.170,+1.73,0.901)(-2.440,+0.555,1) + \Rcurveto(64)(-2.705,-0.62,0.901)(-1.905,-1.560,1) + \Rcurveto(64)(-1.205,-2.50,0.901)(+0.000,-2.500,1) \Stroke + \Black + \Point(1)(+0.000,-2.500) + \Point(1)(+1.205,-2.500) + \Point(1)(+1.905,-1.560) + \Point(1)(+2.705,-0.620) + \Point(1)(+2.440,+0.555) + \Point(1)(+2.170,+1.730) + \Point(1)(+1.085,+2.255) + \Point(1)(+0.000,+2.780) + \Point(1)(-1.085,+2.255) + \Point(1)(-2.170,+1.730) + \Point(1)(-2.440,+0.555) + \Point(1)(-2.705,-0.620) + \Point(1)(-1.905,-1.560) + \Point(1)(-1.205,-2.500) +\end{lapdf} + +Circle with $2n+1=15$ points ($w_{2n}=1$ and $w_{2n+1} = \cos(25.71^\circ) = 0.901$). +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/rcurve.pdf b/Master/texmf-dist/doc/latex/lapdf/rcurve.pdf Binary files differnew file mode 100644 index 00000000000..8bddf671221 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rcurve.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/rcurve.tex b/Master/texmf-dist/doc/latex/lapdf/rcurve.tex new file mode 100644 index 00000000000..f575b483393 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rcurve.tex @@ -0,0 +1,98 @@ +\input preamble.tex + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{I. Rational Quadratic Bezier Curves}} +\bigskip + +\begin{lapdf}(16,20)(-8,-10) + \Dgray + \Dash(1) + \Polygon(-8,0)(0,10)(8,0) \Stroke + \Dash(0) + \Red + \Rcurve(64)(-8,0,7)(0,10,1)(8,0,7) \Stroke + \Green + \Rcurve(64)(-8,0,6)(0,10,1)(8,0,6) \Stroke + \Blue + \Rcurve(64)(-8,0,5)(0,10,1)(8,0,5) \Stroke + \Cyan + \Rcurve(64)(-8,0,4)(0,10,1)(8,0,4) \Stroke + \Magenta + \Rcurve(64)(-8,0,3)(0,10,1)(8,0,3) \Stroke + \Yellow + \Rcurve(64)(-8,0,2)(0,10,1)(8,0,2) \Stroke + \Black + \Rcurve(64)(-8,0,1)(0,10,1)(8,0,1) \Stroke + \Red + \Rcurve(64)(-8,0,1)(0,10,2)(8,0,1) \Stroke + \Green + \Rcurve(64)(-8,0,1)(0,10,3)(8,0,1) \Stroke + \Blue + \Rcurve(64)(-8,0,1)(0,10,4)(8,0,1) \Stroke + \Cyan + \Rcurve(64)(-8,0,1)(0,10,5)(8,0,1) \Stroke + \Magenta + \Rcurve(64)(-8,0,1)(0,10,6)(8,0,1) \Stroke + \Yellow + \Rcurve(64)(-8,0,1)(0,10,7)(8,0,1) \Stroke + \Black + \Rcurve(64)(-8,0,1)(0,10,0)(8,0,1) \Stroke + \Red + \Rcurve(64)(-8,0,7)(0,10,-1)(8,0,7) \Stroke + \Green + \Rcurve(64)(-8,0,6)(0,10,-1)(8,0,6) \Stroke + \Blue + \Rcurve(64)(-8,0,5)(0,10,-1)(8,0,5) \Stroke + \Cyan + \Rcurve(64)(-8,0,4)(0,10,-1)(8,0,4) \Stroke + \Magenta + \Rcurve(64)(-8,0,3)(0,10,-1)(8,0,3) \Stroke + \Yellow + \Rcurve(64)(-8,0,2)(0,10,-1)(8,0,2) \Stroke + \Point(1)(-8,0) + \Point(1)(+0,10) + \Point(1)(+8,0) + \Text(-8.0,0.2,rb){$P_0$} + \Text(+0.2,+10.3,rb){$P_1$} + \Text(+8.0,0.2,lb){$P_2$} +\end{lapdf} +\end{center} +All curves share the same Bezier points, but they differ in the weights of +the points. The black curve is a parabola {$w = 1$}. Above of this all +curves are hyperbolas with increasing weigts, below of this are elliptic curves +with decreasing weights. The line has a weight of {$w = 0$}. After this +the weights are negative increasing. The curves are the complementare +elliptical arcs to the positive counterparts. + +\newpage +\unitlength1.16cm + +\begin{center} +{\Huge \bf{II. Conic Curves}} +\bigskip + +\begin{lapdf}(16,16)(0,0) + \Dgray + \Rcurve(64)(4,10.333,2)(0,3.4,1)(8,3.4,2) + \Rcurve(80)(4,10.333,2)(0,3.4,-1)(8,3.4,2) \Stroke + \Red + \Rcurve(64)(4,9.7,2)(0,4.7,1)(8,4.7,2) + \Rcurve(80)(4,9.7,2)(0,4.7,-1)(8,4.7,2) \Stroke + \Green + \Rcurve(64)(9.7,4,2)(4.7,0,1)(4.7,8,2) + \Rcurve(80)(9.7,4,2)(4.7,0,-1)(4.7,8,2) \Stroke + \Blue + \Rcurve(64)(16,16,1)(8,8,5)(16,0,1) \Stroke + \Cyan + \Rcurve(64)(0,16,1)(8,8,5)(0,0,1) \Stroke + \Magenta + \Rcurve(64)(0,16,1)(8,0,1)(16,16,1) \Stroke + \Yellow + \Rcurve(64)(0,0,1)(8,16,1)(16,0,1) \Stroke +\end{lapdf} + +\large Circle, Ellipse, Parabola, Hyperbola +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/recttria.pdf b/Master/texmf-dist/doc/latex/lapdf/recttria.pdf Binary files differnew file mode 100644 index 00000000000..23113c546da --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/recttria.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/recttria.tex b/Master/texmf-dist/doc/latex/lapdf/recttria.tex new file mode 100644 index 00000000000..9d96bd6360c --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/recttria.tex @@ -0,0 +1,29 @@ +\input preamble.tex + +\Defnum(\a,0) + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.2cm + +\begin{center} +{\Huge \bf{Rectangle}} +\bigskip + +\begin{lapdf}(15,15)(-7.5,-7.5) + \Whilenum{\a<360}{% + \Stepcol(0,23,2) \Rectangle(0,0)(4.5,6)(\a) \Stroke \Add(\a,15)} +\end{lapdf} + +\newpage + +{\Huge \bf{Triangle}} +\bigskip + +\begin{lapdf}(15,15)(-7.5,-7.5) + \Resetcol + \Whilenum{\a<360}{% + \Stepcol(0,23,2) \Triangle(0,0)(0,4.5)(6,4.5)(\a) \Stroke \Add(\a,15)} +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/roundtri.pdf b/Master/texmf-dist/doc/latex/lapdf/roundtri.pdf Binary files differnew file mode 100644 index 00000000000..97b009e5743 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/roundtri.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/roundtri.tex b/Master/texmf-dist/doc/latex/lapdf/roundtri.tex new file mode 100644 index 00000000000..9d38ee35f09 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/roundtri.tex @@ -0,0 +1,37 @@ +% --------------------------------------------------------------------------- +% Rounded Triangles: x=a*exp(cos(t)), y =a*exp(sin(t)) +% --------------------------------------------------------------------------- +\input preamble.tex + +\Defdim(\a,1) +\newdimen\x +\newdimen\y + +\def\Roundtriangle(#1,#2){ + \def\Tx(##1,##2){\Cos(##1,\x) \Pow(2,\Np\x,##2) \Dmul(##2,\a) + ##2=#1##2} + \def\Ty(##1,##2){\Sin(##1,\y) \Pow(2,\Np\y,##2) \Dmul(##2,\a) + ##2=#2##2} + \Tplot(100)(0,6.2832) \Stroke} + +% --------------------------------------------------------------------------- +\begin{document} + +\begin{center} +{\Huge\bf{Rounded Triangles}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Lingrid(10)(1,2)(-9,9)(-9,9) + \Whiledim{\a<5}{ + \Stepcol(0,23,2) + \Roundtriangle(+1,+1) + \Roundtriangle(-1,+1) + \Roundtriangle(-1,-1) + \Roundtriangle(+1,-1) + \Dadd(\a,0.5)} +\end{lapdf} + +$x=a \cdot 2^{\cos t}$ \qquad $y=a \cdot 2^{\sin t}$ +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/rparams.pdf b/Master/texmf-dist/doc/latex/lapdf/rparams.pdf Binary files differnew file mode 100644 index 00000000000..3a8402c04c2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rparams.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/rparams.tex b/Master/texmf-dist/doc/latex/lapdf/rparams.tex new file mode 100644 index 00000000000..210926d9425 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/rparams.tex @@ -0,0 +1,68 @@ +\input preamble.tex + +\def\fr{\displaystyle\frac} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.125cm + +\begin{center} +{\Huge \bf{Ellipse Parameters}} +\bigskip + +\begin{lapdf}(16,16)(-8,-11) + \Lingrid(10)(1,1)(-8,8)(-11,5) + \Setwidth(0.01) + \Dash(1) + \Polygon(-7.2,-3.2)(0,4)(7.2,-3.2)(-7.2,-3.2)(0,-10.4)(7.2,-3.2) \Stroke + \Polygon(5.33,-1.33)(-5.33,-1.33)(0,-6.67)(5.33,-1.33) \Stroke + \Polygon(4.5,-0.5)(-4.5,-0.5)(0,-5)(4.5,-0.5) \Stroke + \Dash(0) + \Setwidth(0.02) + \Red + \Rcurve(128)(-4,0,3)(0,4,2)(4,0,3) \Stroke + \Rcurve(128)(-4,0,3)(0,4,-2)(4,0,3) \Stroke + \Green + \Rcurve(96)(-4,0,2)(0,4,1)(4,0,2) \Stroke + \Rcurve(96)(-4,0,2)(0,4,-1)(4,0,2) \Stroke + \Blue + \Rcurve(64)(-4,0,3)(0,4,1)(4,0,3) \Stroke + \Rcurve(64)(-4,0,3)(0,4,-1)(4,0,3) \Stroke + \Point(1)(-4,0) + \Point(1)(0,4) + \Point(1)(4,0) + \Point(1)(7.2,-3.2) + \Point(1)(4,-6.4) + \Point(1)(0,-10.4) + \Point(1)(-4,-6.4) + \Point(1)(-7.2,-3.2) + \Point(1)(-5.33,-1.33) + \Point(1)(-4,-2.67) + \Point(1)(0,-6.67) + \Point(1)(4,-2.67) + \Point(1)(5.33,-1.33) + \Point(1)(-4.5,-0.5) + \Point(1)(-4,-1) + \Point(1)(0,-5) + \Point(1)(4,-1) + \Point(1)(4.5,-0.5) + \Point(0)(0,-3.2) + \Point(0)(0,-1.33) + \Point(0)(0,-0.5) +\end{lapdf} +{\large $w=2/3$, $w=1/2$, $w=1/3$} +\end{center} +\parskip0.2cm +We know the center $M=(x_m,y_m)$ and the values of $a$ and $b$. We want +to calculate the curve points $P_0$, $P_1$ and $P_2$ and the weight +$w$ to draw the ellipse. With $r=\sqrt{a^2+b^2}$ we get: +\begin{equation} +P_0={{x_m-\fr{a^2}{r}}\choose{y_m+\fr{b^2}{r}}} \quad +P_1={{xm}\choose{ym+r}} \quad +P_2={{x_m+\fr{a^2}{r}}\choose{y_m+\fr{b^2}{r}}} \quad +w_0=1 \quad +w_1=\pm\fr{b}{r} \quad +\end{equation} +With these weights we can draw the ellipse with two segments. One segment +uses the positive and the other the negative weight $w_1$. +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/superell.pdf b/Master/texmf-dist/doc/latex/lapdf/superell.pdf Binary files differnew file mode 100644 index 00000000000..6b273f42ea1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/superell.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/superell.tex b/Master/texmf-dist/doc/latex/lapdf/superell.tex new file mode 100644 index 00000000000..304cb02ebaf --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/superell.tex @@ -0,0 +1,49 @@ +% --------------------------------------------------------------------------- +% The superellipse curve is defined by the equations: +% x(t) = a*sig(cos(t))*|cos(t)|^n y(t) = b*sig(sin(t))*|sin(t)|^n. +% --------------------------------------------------------------------------- +\input preamble.tex + +\newcount\s +\newcount\n +\Defdim(\a,9) +\Defdim(\b,9) +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +% We express the exponent n as a fraction N/D. If we simply used \Pow(x,n) +% instead of the two functions \Root(x,D) and then \Pot(x,N), we would get +% a numerical overflow of a dimension register. +% --------------------------------------------------------------------------- +\gdef\Superell(#1,#2){ + \def\Tx(##1,##2){ + \Dset(\x,##1) \Cos(\Np\x,\x) \Dsig(\x,\s) \Dabs(\x) + \Root(\Np\x,#2,\x) \Pot(\Np\x,#1,##2) \Dmul(##2,\a) \Mul(##2,\s)} + \def\Ty(##1,##2){ + \Dset(\y,##1) \Sin(\Np\y,\y) \Dsig(\y,\s) \Dabs(\y) + \Root(\Np\y,#2,\y) \Pot(\Np\y,#1,##2) \Dmul(##2,\b) \Mul(##2,\s)} + \Stepcol(0,23,3) \Tplot(200)(-3.1416,3.1416) \Stroke} + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{The Superellipse}} +\bigskip + +\begin{lapdf}(18,18)(-9,-9) + \Lingrid(10)(1,0)(-9,9)(-9,9) + \Set(\n,16) + \Whilenum{\n>1}{\Superell(\n,2) + \ifnum\n>6 \Sub(\n,2) \else \Sub(\n,1) \fi} + \Superell(2,3) + \Set(\n,5) + \Whilenum{\n<10}{\Superell(2,\n) + \ifnum\n<6 \Add(\n,1) \else \Add(\n,2) \fi} + \Superell(0,1) +\end{lapdf} + +$x(t)=a \cdot sig(\cos(t)) \cdot |\cos(t)|^n$ \qquad +$x(t)=b \cdot sig(\sin(t)) \cdot |\sin(t)|^n$ +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/tplot.pdf b/Master/texmf-dist/doc/latex/lapdf/tplot.pdf Binary files differnew file mode 100644 index 00000000000..42d831cf4e6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/tplot.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/tplot.tex b/Master/texmf-dist/doc/latex/lapdf/tplot.tex new file mode 100644 index 00000000000..ad907cefc35 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/tplot.tex @@ -0,0 +1,133 @@ +\input preamble.tex + +\newdimen\a +\newdimen\b +\newdimen\c +\newdimen\t +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +\begin{document} +\begin{center} +{\Huge \bf{Parametric I}} +\bigskip + +\begin{lapdf}(10,11)(-5,-6) + \Lingrid(10)(0,3)(-5,5)(-5,5) + \Red + \def\Tx(#1,#2){\Sin(#1,#2) #2=3#2} + \def\Ty(#1,#2){\Cos(#1,#2) #2=5#2} + \Tplot(100)(0,6.2832) \Stroke + \Green + \def\Tx(#1,#2){\Sin(#1,#2) #2=5#2} + \Tplot(100)(0,6.2832) \Stroke + \Blue + \def\Ty(#1,#2){\Cos(#1,#2) #2=3#2} + \Tplot(100)(0,6.2832) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,10)(-5,-5) + \Lingrid(10)(0,3)(-5,5)(-5,5) + \Red + \def\Tx(#1,#2){\Dset(\x,#1) \Dmul(\x,\x) #2=\x} + \def\Ty(#1,#2){\Dset(\t,#1) \y=\t \Dmul(\y,\y) \Dsub(\y,3) \Dmul(\y,\t) #2=\y} + \Tplot(50)(-2.26,2.26) \Stroke + \Blue + \def\Tx(#1,#2){\Sin(#1,#2) #2=5#2} + \def\Ty(#1,#2){\Dset(\t,#1) \Mul(\t,2) \Sin(\Np\t,#2) #2=5#2} + \Tplot(100)(0,6.2832) \Stroke +\end{lapdf} + +\newpage + +{\Huge \bf{Parametric II}} +\bigskip + +\begin{lapdf}(10,11)(-5,-6) + \Lingrid(10)(0,3)(-5,5)(-5,5) + \Red + \def\Tx(#1,#2){\Dset(\t,#1) \Cos(\Np\t,\x) \Div(\x,5) \Dmul(\x,\t) #2=\x} + \def\Ty(#1,#2){\Dset(\t,#1) \Sin(\Np\t,\y) \Div(\y,5) \Dmul(\y,\t) #2=\y} + \Tplot(300)(0,25.13) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,10)(-5,-5) + \Lingrid(10)(0,3)(-5,5)(-5,5) + \Blue + \def\Tx(#1,#2){\Dset(\x,#1) \Mul(\x,3) \Cos(\Np\x,#2) #2=5#2} + \def\Ty(#1,#2){\Dset(\y,#1) \Mul(\y,5) \Sin(\Np\y,#2) #2=5#2} + \Tplot(300)(0,6.2832) \Stroke +\end{lapdf} + +\newpage + +{\Huge \bf{Parametric III}} +\bigskip + +\begin{lapdf}(16,16)(-8,-8) + \Lingrid(10)(1,3)(-7,7)(-7,7) + \Red + \def\Tx(#1,#2){\Cos(#1,\x) \Dadd(\x,1) \Sin(#1,#2) \Dmul(#2,\x) #2=-5#2} + \def\Ty(#1,#2){\Sin(#1,\y) \Dadd(\y,1) \Cos(#1,#2) \Dmul(#2,\y) #2=-5#2} + \Tplot(200)(0,6.2832) \Stroke + \Dash(1) + \Blue + \Line(-7,-7)(7,7) \Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,6)(-5,-3) + \Lingrid(10)(0,2)(-5,5)(-3,3) + \Red + \def\Tx(#1,#2){\Cos(#1,#2) #2=5#2} + \def\Ty(#1,#2){\Tx(#1,#2) \Sin(#1,\x) \Dmul(#2,\x)} + \Tplot(250)(0,6.2832) \Stroke + \Blue + \def\Tx(#1,#2){\Cos(#1,#2) \Sin(#1,\x) \Dmul(\x,\x) \Dadd(\x,1) \Ddiv(#2,\x) #2=5#2} + \def\Ty(#1,#2){\Tx(#1,#2) \Sin(#1,\x) \Dmul(#2,\x)} + \Tplot(250)(0,6.2832) \Stroke +\end{lapdf} + +\newpage + +{\Huge \bf{Parametric IV}} +\bigskip + +\begin{lapdf}(10,11)(-5,-6) + \Lingrid(10)(0,1)(-5,5)(-5,5) + \def\Tx(#1,#2){\Dset(\x,#1) \a=3\x \b=7\x \c=17\x \Cos(\Np\a,#2) + \Cos(\Np\b,\b) \Div(\b,2) \Sin(\Np\c,\c) \Div(\c,3) \Add(#2,\b) \Add(#2,\c) #2=3#2} + \def\Ty(#1,#2){\Dset(\x,#1) \a=3\x \b=7\x \c=17\x \Sin(\Np\a,#2) + \Sin(\Np\b,\b) \Div(\b,2) \Cos(\Np\c,\c) \Div(\c,3) \Add(#2,\b) \Add(#2,\c) #2=3#2} + \Red + \Tplot(150)(0.0000,1.5708)\Stroke + \Green + \Tplot(150)(1.5708,3.1416)\Stroke + \Blue + \Tplot(150)(3.1416,4.7124)\Stroke + \Cyan + \Tplot(150)(4.7124,6.2832)\Stroke +\end{lapdf} +\bigskip + +\begin{lapdf}(10,11)(-5,-5) + \Lingrid(10)(0,1)(-5,5)(-5,5) + \def\Tx(#1,#2){\Dset(\x,#1) \a=\x \b=7\x \c=17\x \Cos(\Np\a,#2) + \Cos(\Np\b,\b) \Div(\b,2) \Sin(\Np\c,\c) \Div(\c,3) \Add(#2,\b) \Add(#2,\c) #2=3#2} + \def\Ty(#1,#2){\Dset(\x,#1) \a=\x \b=7\x \c=17\x \Sin(\Np\a,#2) + \Sin(\Np\b,\b) \Div(\b,2) \Cos(\Np\c,\c) \Div(\c,3) \Add(#2,\b) \Add(#2,\c) #2=3#2} + \Red + \Tplot(150)(0.0000,1.5708) \Stroke + \Green + \Tplot(150)(1.5708,3.1416) \Stroke + \Blue + \Tplot(150)(3.1416,4.7124) \Stroke + \Cyan + \Tplot(150)(4.7124,6.2832) \Stroke +\end{lapdf} + +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/trochoid.pdf b/Master/texmf-dist/doc/latex/lapdf/trochoid.pdf Binary files differnew file mode 100644 index 00000000000..bd444375459 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/trochoid.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/trochoid.tex b/Master/texmf-dist/doc/latex/lapdf/trochoid.tex new file mode 100644 index 00000000000..b76b527b4fe --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/trochoid.tex @@ -0,0 +1,78 @@ +\input preamble.tex + +\Defnum(\n,0) +\Defdim(\m,-2.5) +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +% 1. Trochoids: In case of a=b the graph is a cycloid. +% x(t)=a*t-b*sint +% y(t)=a-b*cost +% --------------------------------------------------------------------------- +\def\Trochoid(#1,#2){ +\def\Tx(##1,##2){\Dset(##2,##1) ##2=#1##2 \Sin(##1,\y) \y=#2\y \Sub(##2,\y)} +\def\Ty(##1,##2){\Dset(##2,#1) \Cos(##1,\y) \y=#2\y \Sub(##2,\y)} +\Tplot(200)(-6.2832,6.2832)} + +% --------------------------------------------------------------------------- +% 2. Epitrochoid: +% x(t)=a*cos(t)-b*cos(a/2*t) +% y(t)=a*sin(t)-b*sin(a/2*t) +% --------------------------------------------------------------------------- +\def\Epitrochoid(#1,#2){\Dset(\x,#1) \x=0.5\x + \def\Tx(##1,##2){\Cos(##1,##2) ##2=#1##2 \y=##1\x \Cos(\Np\y,\y) \y=#2\y \Sub(##2,\y) ##2=0.5##2} + \def\Ty(##1,##2){\Sin(##1,##2) ##2=#1##2 \y=##1\x \Sin(\Np\y,\y) \y=#2\y \Sub(##2,\y) ##2=0.5##2} + \Tplot(360)(0,12.5664)} + +% --------------------------------------------------------------------------- +% 3. Hypotrochoid: +% x(t)=a*cos(t)+b*cos(a/2*t) +% y(t)=a*sin(t)-b*sin(a/2*t) +% --------------------------------------------------------------------------- +\def\Hypotrochoid(#1,#2){\Dset(\x,#1) \x=0.5\x + \def\Tx(##1,##2){\Cos(##1,##2) ##2=#1##2 \y=##1\x \Cos(\Np\y,\y) \y=#2\y \Add(##2,\y) ##2=0.5##2} + \def\Ty(##1,##2){\Sin(##1,##2) ##2=#1##2 \y=##1\x \Sin(\Np\y,\y) \y=#2\y \Sub(##2,\y) ##2=0.5##2} + \Tplot(360)(0,12.5664)} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.25cm + +\begin{center} +{\Huge \bf{I. Trochoids}} +\bigskip + +\begin{lapdf}(14,7)(-7,-2) + \Lingrid(10)(0,2)(-7,7)(-2,4) + \Whiledim{\m<3}{\Stepcol(0,23,4) \Trochoid(1,\Np\m) \Stroke \Dadd(\m,0.5)} +\end{lapdf} + +$x(t)=a \cdot t - b\sin(t)$ \qquad$y(t)=a-b\cos(t)$ + +\newpage + +{\Huge\bf{II. Epitrochoids}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Polgrid(0,2)(7) + \Whilenum{\n<6}{\Stepcol(0,23,4) \Epitrochoid(8,\n) \Stroke \Add(\n,1)} +\end{lapdf} + +$x(t)=a\cos(t)-b\cos(a/2 \cdot t)$ \qquad $y(t)=a\sin(t)-b\sin(a/2 \cdot t)$ + +\newpage + +{\Huge\bf{III. Hypotrochoids}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Resetcol + \Polgrid(0,2)(7) + \Whilenum{\n<6}{\Stepcol(0,23,4) \Hypotrochoid(8,\n) \Stroke \Add(\n,1)} +\end{lapdf} + +$x(t)=a\cos(t)+b\cos(a/2 \cdot t)$ \qquad $y(t)=a\sin(t)-b\sin(a/2 \cdot t)$ +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/turtle.pdf b/Master/texmf-dist/doc/latex/lapdf/turtle.pdf Binary files differnew file mode 100644 index 00000000000..f5c62b5b74d --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/turtle.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/turtle.tex b/Master/texmf-dist/doc/latex/lapdf/turtle.tex new file mode 100644 index 00000000000..fb3ad5cdf8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/turtle.tex @@ -0,0 +1,90 @@ +% --------------------------------------------------------------------------- +% Draws turtle graphics in pdfTeX with Lapdf. The procedures are taken +% from Abelson's introductory book for object logo on the Macintosh. +% --------------------------------------------------------------------------- +\input preamble.tex + +\newcount\i +\newcount\pen +\newdimen\a +\newdimen\b +\newdimen\t +\newdimen\dir +\newdimen\ax +\newdimen\tx +\newdimen\ty +\newdimen\ux +\newdimen\uy + +% --------------------------------------------------------------------------- +% This is a simple Lapdf implementation of turtle graphics. The commands +% are: Initturtle, Home, Penup, Pendown, Forward, Back, Right, Left. +% --------------------------------------------------------------------------- +\def\Home{\Moveto(0,0)} +\def\Penup{\pen=0} +\def\Pendown{\pen=1} + +\def\Initturtle{\Home \col=-1 \Dset(\dir,0) \Setwidth(0.02) \Pendown} + +\def\Forward(#1){\Dset(\ax,#1) \Rad(\Np\dir,\ty) + \Sin(\Np\ty,\tx) \Dmul(\tx,\ax) \Add(\ux,\tx) + \Cos(\Np\ty,\tx) \Dmul(\tx,\ax) \Add(\uy,\tx) + \ifnum\pen=0 \Moveto(\Np\ux,\Np\uy) \else \Lineto(\Np\ux,\Np\uy) \fi} + +\def\Back(#1){\Dset(\ax,#1) \Rad(\Np\dir,\ty) + \Sin(\Np\ty,\tx) \Dmul(\tx,\ax) \Sub(\ux,\tx) + \Cos(\Np\ty,\tx) \Dmul(\tx,\ax) \Add(\uy,\tx) + \ifnum\pen=0 \Moveto(\Np\ux,\Np\uy) \else \Lineto(\Np\ux,\Np\uy) \fi} + +\def\Right(#1){\Dset(\ax,#1) \Add(\dir,\ax) {\Dmod(\dir,360)}} +\def\Left(#1){\Dset(\ax,#1) \Sub(\dir,\ax) {\Dmod(\dir,360)}} + +% --------------------------------------------------------------------------- +% These are our own special drawing macros. +% --------------------------------------------------------------------------- +\def\Arcleft(#1,#2){\i=0 \Dset(\t,#1) \Dmul(\t,0.017453pt) + \Whilenum{\i<#2}{\Forward(\Np\t) \Left(1) \Add(\i,1)}} + +\def\Arcright(#1,#2){\i=0 \Dset(\t,#1) \Dmul(\t,0.017453pt) + \Whilenum{\i<#2}{\Forward(\Np\t) \Right(1) \Add(\i,1)}} + +\def\Fullcirc(#1){{\Arcright(#1,360)} \Stroke} + +\def\Square(#1){\i=0 + \Whilenum{\i<4}{\Forward(#1) \Right(90) \Add(\i,1)} \Stroke \Home} + +\def\Rosette(#1,#2){\i=0 \Dset(\t,360) \Div(\t,#2) + \Whilenum{\i<#2}{\Nextcol(0,23) {\Square(#1)} \Right(\Np\t) \Add(\i,1)}} + +\def\Petal(#1){\Arcright(#1,60) \Right(120) \Arcright(#1,60) + \Right(120) \Stroke \Home} + +\def\Flower(#1){\i=0 + \Whilenum{\i<6}{\Stepcol(0,23,4) {\Petal(#1)} \Right(60) \Add(\i,1)}} + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.25cm + +\begin{center} +{\Huge\bf{Turtle Graphics with \Lapdf}} +\bigskip + +\begin{lapdf}(9,9)(-4.5,-4.5) + \Initturtle + \Rosette(3,24) + \Initturtle + \Penup + \Forward(4.243) + \Right(90) + \Pendown + \Dgray + \Fullcirc(4.243) +\end{lapdf} + +\begin{lapdf}(9,9)(-4.5,-4.5) + \Initturtle + \Flower(5) +\end{lapdf} +\end{center} +\end{document} diff --git a/Master/texmf-dist/doc/latex/lapdf/vector.pdf b/Master/texmf-dist/doc/latex/lapdf/vector.pdf Binary files differnew file mode 100644 index 00000000000..a02add56203 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/vector.pdf diff --git a/Master/texmf-dist/doc/latex/lapdf/vector.tex b/Master/texmf-dist/doc/latex/lapdf/vector.tex new file mode 100644 index 00000000000..bd8867c11a9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/lapdf/vector.tex @@ -0,0 +1,46 @@ +\input preamble.tex + +\Defnum(\n,10) +\Defdim(\m,0) +\Defdim(\r,7) +\newdimen\a +\newdimen\x +\newdimen\y + +% --------------------------------------------------------------------------- +\begin{document} +\unitlength1.25cm + +\begin{center} +{\Huge\bf{Vect}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Whiledim{\m<360}{% + \Rad(\Np\m,\a) + \Cos(\Np\a,\x) \Mul(\x,7) + \Sin(\Np\a,\y) \Mul(\y,7) + \Nextcol(0,23) + \Vect(0,0)(\Np\x,\Np\y) + \Dadd(\m,7.5)} +\end{lapdf} +\end{center} + +\newpage + +\begin{center} +{\Huge\bf{Vecto}} +\bigskip + +\begin{lapdf}(14,14)(-7,-7) + \Moveto(\Np\r,0) + \Whilenum{\n<1445}{% + \Rad(\n,\a) + \Cos(\Np\a,\x) \Dmul(\x,\r) + \Sin(\Np\a,\y) \Dmul(\y,\r) + \Nextcol(0,23) + \Vecto(\Np\x,\Np\y) + \Add(\n,10) \Dsub(\r,0.05)} +\end{lapdf} +\end{center} +\end{document} |