diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex | 92 |
1 files changed, 82 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex index 27ba94e4cf4..95a3bc7b7fb 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-transformations.tex @@ -36,7 +36,7 @@ coordinate like $(1,2)$ before a point on the screen is chosen: inside the picture. \item The backend driver (like |dvips| or |pdftex|) adds transformation - commands such the coordinate is shifted to the correct position in + commands such that the coordinate is shifted to the correct position in \TeX's page coordinate system. \item \textsc{pdf} (or PostScript) apply the canvas transformation @@ -58,7 +58,7 @@ The $xy$-coordinate system and the coordinate transformation matrix the canvas transformation matrix, but you have to use commands of the core layer directly to do so and you ``better know what you are doing'' when you do this. The moment you start modifying the -canvas matrix, \pgfname\ immediately looses track of all +canvas matrix, \pgfname\ immediately loses track of all coordinates and shapes, anchors, and bounding box computations will no longer work. @@ -87,7 +87,7 @@ options: \begin{key}{/tikz/x=\meta{value} (initially 1cm)} If \meta{value} is a dimension, the $x$-vector of - \pgfname's $xyz$-coordinate system is setup to point + \pgfname's $xyz$-coordinate system is set up to point \meta{value} to the right, that is, to $(\meta{value},0pt)$. \begin{codeexample}[] @@ -135,7 +135,7 @@ options: \end{key} \begin{key}{/tikz/z=\meta{value} (initially \normalfont$-3.85$mm)} - Works like the |y=| option, but now a dimension is means the point + Works like the |y=| option, but now a dimension is the point $(\meta{value},\meta{value})$. \begin{codeexample}[] @@ -162,7 +162,7 @@ options: The next step is to apply the current \emph{coordinate transformation matrix} to the coordinate. For example, the coordinate transformation matrix might currently be set such that it adds a -certain constant to the $x$ value. Also, it might be setup such that +certain constant to the $x$ value. Also, it might be set up such that it, say, exchanges the $x$ and $y$ value. In general, any ``standard'' transformation like translation, rotation, slanting, or scaling or any combination thereof is possible. (Internally, \pgfname\ @@ -267,7 +267,7 @@ singular (if you do not know what singular matrices are, you are blessed). \begin{key}{/tikz/scale=\meta{factor}} Multiplies all coordinates by the given \meta{factor}. The \meta{factor} should not be excessively large in absolute terms or - very near to zero. + very close to zero. \begin{codeexample}[] \begin{tikzpicture} \draw[help lines] (0,0) grid (3,2); @@ -279,7 +279,7 @@ singular (if you do not know what singular matrices are, you are blessed). \end{key} \begin{key}{/tikz/scale around={\ttfamily\char`\{}\meta{factor}|:|\meta{coordinate}{\ttfamily\char`\}}} - Scales the coordinate system by \meta{factor}, put with the ``origin + Scales the coordinate system by \meta{factor}, with the ``origin of scaling'' centered on \meta{coordinate} rather than the origin. \begin{codeexample}[] \begin{tikzpicture} @@ -360,6 +360,78 @@ singular (if you do not know what singular matrices are, you are blessed). \end{key} +\begin{key}{/tikz/rotate around x=\meta{angle}} + + This key sets the $x$, $y$ and $z$ vectors of the \pgfname\ + $xyz$-coordinate system so that they + are rotated by \meta{angle} around the axis corresponding + to the $x$-vector. + The rotation is applied so that when looking towards the origin + along this axis, positive angles result in an anticlockwise rotation. + +\begin{codeexample}[] +\begin{tikzpicture}[>=stealth] + \draw [->] (0,0,0) -- (2,0,0) node [at end, right] {$x$}; + \draw [->] (0,0,0) -- (0,2,0) node [at end, left] {$y$}; + \draw [->] (0,0,0) -- (0,0,2) node [at end, left] {$z$}; + + \draw [red, rotate around x=0] (0,0,0) -- (1,1,0) -- (1,0,0); + \draw [green, rotate around x=45] (0,0,0) -- (1,1,0) -- (1,0,0); + \draw [blue, rotate around x=90] (0,0,0) -- (1,1,0) -- (1,0,0); +\end{tikzpicture} +\end{codeexample} + +\end{key} + + +\begin{key}{/tikz/rotate around y=\meta{angle}} + + This key sets the $x$, $y$ and $z$ vectors of the \pgfname\ + $xyz$-coordinate system so that they + are rotated by \meta{angle} around the axis corresponding + to the $y$-vector. + The rotation is applied so that when looking towards the origin + along this axis, positive angles result in an anticlockwise rotation. + +\begin{codeexample}[] +\begin{tikzpicture}[>=stealth] + \draw [->] (0,0,0) -- (2,0,0) node [at end, right] {$x$}; + \draw [->] (0,0,0) -- (0,2,0) node [at end, left] {$y$}; + \draw [->] (0,0,0) -- (0,0,2) node [at end, left] {$z$}; + + \draw [red, rotate around y=0] (0,0,0) -- (1,1,0) -- (1,0,0); + \draw [green, rotate around y=-45] (0,0,0) -- (1,1,0) -- (1,0,0); + \draw [blue, rotate around y=-90] (0,0,0) -- (1,1,0) -- (1,0,0); +\end{tikzpicture} +\end{codeexample} + +\end{key} + + +\begin{key}{/tikz/rotate around z=\meta{angle}} + + This key sets the $x$, $y$ and $z$ vectors of the \pgfname\ + $xyz$-coordinate system so that they + are rotated by \meta{angle} around the axis corresponding + to the $z$-vector. + The rotation is applied so that when looking towards the origin + along this axis, positive angles result in an anticlockwise rotation. + +\begin{codeexample}[] +\begin{tikzpicture}[>=stealth] + \draw [->] (0,0,0) -- (2,0,0) node [at end, right] {$x$}; + \draw [->] (0,0,0) -- (0,2,0) node [at end, left] {$y$}; + \draw [->] (0,0,0) -- (0,0,2) node [at end, left] {$z$}; + + \draw [red, rotate around z=0] (0,0) -- (1,1) -- (1,0); + \draw [green, rotate around z=45] (0,0) -- (1,1) -- (1,0); + \draw [blue, rotate around z=90] (0,0) -- (1,1) -- (1,0); +\end{tikzpicture} +\end{codeexample} + +\end{key} + + \begin{key}{/tikz/cm={\ttfamily\char`\{}\meta{$a$}|,|\meta{$b$}|,|\meta{$c$}|,|\meta{$d$}|,|\meta{coordinate}{\ttfamily\char`\}}} applies the following transformation to all coordinates: Let $(x,y)$ be the coordinate to be transformed and let \meta{coordinate} @@ -406,13 +478,13 @@ circumstances you do \emph{not} want line widths to change in a picture as this creates visual inconsistency. Just as important, when -you use canvas transformations \emph{\pgfname\ looses track of +you use canvas transformations \emph{\pgfname\ loses track of positions of nodes and of picture sizes} since it does not take the effect of canvas transformations into account when it computes -coordinates of nodes (you not, however, rely on this; it may change in +coordinates of nodes (do not, however, rely on this; it may change in the future). -Finally, not that a canvas transformation always applies to a path as +Finally, note that a canvas transformation always applies to a path as a whole, it is not possible (as for coordinate transformations) to use different transformations in different parts of a path. |