diff options
Diffstat (limited to 'graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex')
-rw-r--r-- | graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex | 110 |
1 files changed, 64 insertions, 46 deletions
diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex index 3788e0c9a4..b0f0f2906d 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex @@ -11,28 +11,30 @@ \section{Transformations: Mirroring} \label{pgflibrary:transformations} -\begin{pgflibrary}{transformations.mirror} +\begin{purepgflibrary}{ext.transformations.mirror} This library adds mirror transformations to PGF. -\end{pgflibrary} +\end{purepgflibrary} Two approaches to mirror transformation exist: \begin{enumerate} -\item Using the ``Spiegelmatrix`` (see section~\ref{pgflibrary:transformations:spiegelungsmatrix}). +\item Using the reflection matrix (see left column). - This depends on |\pgfpointnormalised| which involves the sine and the cosine functions of PGFmath. + This depends on |\pgfpointnormalised|\indexCommandO\pgfpointnormalised which involves + the sine\indexMathFunctionO{sin} and the cosine\indexMathFunctionO{cos} functions of PGFmath. -\item Using built-in transformations (see section~\ref{pgflibrary:transformations:builtin}). +\item Using built-in transformations (see right column). - This depends on |\pgfmathanglebetween| which involves the arctangent (|atan2|) function of PGFmath. + This depends on |\pgfmathanglebetween|\indexCommandO\pgfmathanglebetween which involves the arctangent (|atan2|\indexMathFunctionO{atan2}) function of PGFmath. \end{enumerate} Which one is better? I don't know. Choose one you're comfortable with. -\subsection{Using the ``Spiegelungsmatrix''} -\label{pgflibrary:transformations:spiegelungsmatrix} +\begin{paracol}{2} -The following commands use the ``Spiegelungsmatrix'' that sets the transformation matrix following +\subsection{Using the reflection matrix} + +The following commands use the reflection matrix that sets the transformation matrix following \begin{equation*} A = \frac{1}{\Vert\vec l\Vert^2} \begin{bmatrix} l_x^2-l_y^2 & 2l_xl_y \\ @@ -40,6 +42,18 @@ The following commands use the ``Spiegelungsmatrix'' that sets the transformatio \end{bmatrix}. \end{equation*} +\switchcolumn% > + +\stepcounter{subsection} +\subsection{Using built-in transformations} + +The following commands use a combination of shifting, rotating, $-1$ scaling, +rotating back and shifting back to reach the mirror transformation. + +The commands are named the same as on the left side, +only the |m| in |mirror| is capitalized. + +\switchcolumn*% < \begin{command}{\pgftransformxmirror\marg{value}} Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. @@ -57,87 +71,90 @@ The following commands use the ``Spiegelungsmatrix'' that sets the transformatio \end{codeexample} \end{command} -\begin{command}{\pgftransformymirror\marg{value}} - Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. -\end{command} +\switchcolumn% > + +\begin{command}{\pgftransformxMirror\marg{value}} + Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. -\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}} - Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. - \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\draw[dashed] (0, -1) -- (2, 0); -\pgftransformmirror{\pgfpointxy{0}{-1}}{\pgfpointxy{2}{0}} +\draw[dashed] (1.5, -.25) -- (1.5, 1.25); +\pgftransformxMirror{1.5} \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \end{tikzpicture} \end{codeexample} \end{command} -\begin{command}{\pgfqtransformmirror\marg{point A}} - Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. +\switchcolumn*% < + +\begin{command}{\pgftransformymirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} +\begin{command}{\pgftransformmirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-.25, -.25) grid (2.25, 1.25); +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\draw[dashed] (0, 0) -- (2, 1); -\pgfqtransformmirror{\pgfpointxy{2}{1}} +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformmirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \end{tikzpicture} \end{codeexample} \end{command} +\switchcolumn% > -\subsection{Using built-in transformations} -\label{pgflibrary:transformations:builtin} - -The following commands use a combination of shifting, rotating, $-1$ scaling, rotating back and shifting back to reach the mirror transformation. - -The commands are named the same as above, only the |m| in |mirror| is capitalized. - - -\begin{command}{\pgftransformxMirror\marg{value}} - Sets up a transformation that mirrors along a vertical line that goes through point $(\text{\meta{value}}, 0)$. +\begin{command}{\pgftransformyMirror\marg{value}} + Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. +\end{command} +\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}} + Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. + \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\draw[dashed] (1.5, -.25) -- (1.5, 1.25); -\pgftransformxMirror{1.5} +\draw[dashed] (0, -1) -- (2, 0); +\pgftransformMirror{\pgfpointxy{0}{-1}} + {\pgfpointxy{2}{ 0}} \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \end{tikzpicture} \end{codeexample} \end{command} -\begin{command}{\pgftransformyMirror\marg{value}} - Sets up a transformation that mirrors along a horizontal line that goes through point $(0, \text{\meta{value})}$. -\end{command} +\switchcolumn*% < + +\begin{command}{\pgfqtransformmirror\marg{point A}} + Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. -\begin{command}{\pgftransformMirror\marg{point A}\marg{point B}} - Sets up a transformation that mirrors along the line that goes through \meta{point A} and \meta{point B}. - \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-.25, -2.25) grid (2.5, 1.25); +\draw[help lines] (-.25, -.25) grid (2.25, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); -\draw[dashed] (0, -1) -- (2, 0); -\pgftransformMirror{\pgfpointxy{0}{-1}}{\pgfpointxy{2}{0}} +\draw[dashed] (0, 0) -- (2, 1); +\pgfqtransformmirror{\pgfpointxy{2}{1}} \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \end{tikzpicture} \end{codeexample} \end{command} +\switchcolumn + \begin{command}{\pgfqtransformMirror\marg{point A}} Sets up a transformation that mirrors along the line that goes through the origin and \meta{point A}. @@ -154,4 +171,5 @@ The commands are named the same as above, only the |m| in |mirror| is capitalize \end{codeexample} \end{command} -\endinput
\ No newline at end of file +\end{paracol} +\endinput |