
Eu tenho dois quadros de coordenadas que possuem um deslocamento e uma rotação entre eles.
Usando o exemplo a seguir, tentei visualizá-lo:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}[thick]
\draw[-latex] (0,0) -- (4,0) node[right, text width=5em] {$X$};
\draw[-latex] (0,0) -- (0,4) node[right, text width=5em] {$Y$};
\begin{scope}[rotate=0,draw=red]
\draw[->] (3,2) -- (7,2) node[right, text width=5em] {$X'$};
\draw[->] (3,2) -- (3,6) node[right, text width=5em] {$Y'$};
\end{scope}
\draw[->, postaction={decorate, decoration={text along path, text align={center},text={${\overrightarrow{R}}{\;}$}}}] (0,0) -- (3,2) node[right, text width=5em] () {};
\end{tikzpicture}
\end{document}
uma vez que eu mude
\begin{scope}[rotate=0,draw=red]
para
\begin{scope}[rotate=20,draw=red]
Como eu poderia colocar a origem do meu quadro de coordenadas X'Y' na posição (3,2) no meu sistema de coordenadas XY?
Além disso, gostaria de colocar $\overrightarrow{R}$ um pouco mais alto. Como eu poderia colocá-lo acima do vetor?
Responder1
Girar, está usando por padrão o ponto (0,0): Veja aqui a seta laranja que é a seta R girada em 20 graus:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}[thick]
\draw[-latex] (0,0) -- (4,0) node[right, text width=5em] {$X$};
\draw[-latex] (0,0) -- (0,4) node[right, text width=5em] {$Y$};
\begin{scope}[rotate=20,draw=red]
\draw[->] (3,2) -- (7,2) node[right, text width=5em] {$X'$};
\draw[->] (3,2) -- (3,6) node[right, text width=5em] {$Y'$};
\end{scope}
\begin{scope}
\draw[->,orange,rotate=20] (0,0)--(3,2);
\end{scope}
\draw[->, postaction={decorate, decoration={text along path, text align={center},text={${\overrightarrow{R}}{\;}$}}}] (0,0) -- (3,2) node[right, text width=5em] () {};
\end{tikzpicture}
\end{document}
Então você tem que alterar o ponto padrão (o centro da classificação) e isso pode ser feito com o comando: rotate around
como:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}[thick]
\draw[-latex] (0,0) -- (4,0) node[right, text width=5em] {$X$};
\draw[-latex] (0,0) -- (0,4) node[right, text width=5em] {$Y$};
\begin{scope}[rotate around={20:(3,2)},draw=red]
\draw[->] (3,2) -- (7,2) node[right, text width=5em] {$X'$};
\draw[->] (3,2) -- (3,6) node[right, text width=5em] {$Y'$};
\end{scope}
\draw[->, postaction={decorate, decoration={text along path, text align={center},text={${\overrightarrow{R}}{\;}$}}}] (0,0) -- (3,2) node[right, text width=5em] () {};
\end{tikzpicture}
\end{document}