數學上的 xslant

數學上的 xslant

數學上如何定義xslant座標變換運算tikz

例如,讓A = (x_0, y_0)xslant = k。變換後的座標的數學表達式是什麼B = (x_1, y_1)

我想了解 pgf 手冊範例是如何運作的:

\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}

答案1

正如 Mark Wibrow 在他的評論中所說,xslant=k替換xx+k*y.
所以它是一個捷徑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}

筆記 :有一個文件中的錯誤( cmPGF 2.0、2.1 和 3.0):矩陣是其所聲明內容的轉置。

相關內容