
Wie ist die xslant
Koordinatentransformationsoperation tikz
mathematisch definiert?
Lassen Sie beispielsweise A = (x_0, y_0)
und xslant = k
. Was ist der mathematische Ausdruck für die transformierte Koordinate B = (x_1, y_1)
?
Ich möchte verstehen, wie das manuelle PGF-Beispiel funktioniert:
\begin{tikzpicture}
\draw[help lines] (0,0) grid (3,2);
\draw (0,0) -- (1,1) -- (1,0);
\draw[xslant=2,blue] (0,0) -- (1,1) -- (1,0);
\draw[xslant=-1,red] (0,0) -- (1,1) -- (1,0);
\end{tikzpicture}
Antwort1
Wie Mark Wibrow in seinem Kommentar sagt : xslant=k
Ersetzen x
durch x+k*y
.
Es ist also eine Abkürzung zu cm={1,0,k,1,(0,0)}
.
\begin{tikzpicture}[myxslant/.style={cm={1,0,#1,1,(0,0)}}]
\draw[help lines] (0,0) grid (3,2);
\draw (0,0) -- (1,1) -- (1,0);
\draw[myxslant=2,blue] (0,0) -- (1,1) -- (1,0);
\draw[myxslant=-1,red] (0,0) -- (1,1) -- (1,0);
\end{tikzpicture}
NOTIZ :Da ist einFehler in der Dokumentationvon cm
(PGF 2.0, 2.1 und 3.0): Die Matrix ist die Transponierte dessen, was sie behauptet.