von godi » Mi 27. Mär 2019, 10:01
Hallo,
ich versuche gerade mit tikz um Achsen eines Koordinatensystems Pfeile zu zeichnen damit die Rotation dargestellt wird.
Da ich in diesem Koordinatensystem eine 2D-Zeichnung 3-Dimensional darstellen will verwende ich tikz-3dplot.
Beispiel:
\documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{arrows.meta}
\begin{document}
\tdplotsetmaincoords{45}{15}
\begin{tikzpicture} [tdplot_main_coords, thick, scale = 5]
% Coordinate system:
\draw[<->] (-0.5,0,0) node[below]{$-x$} -- (0.6,0,0) node[below]{$x$};
\draw[<->] (0,-0.5,0) node[left]{$-y$} -- (0,0.7,0) node[left]{$y$};
\draw[<->] (0,0,-0.5) node[left]{$-z$} -- (0,0,0.7) node[left]{$z$};
% yaw, pitch, roll
\tdplotdrawarc[->]{(0,0,0.55)}{0.03}{30}{330}{above, xshift = -2mm, yshift = -1mm}{yaw}
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.55)}{0.03}{140}{440}{above, xshift = 3mm, yshift = -0mm, anchor=west}{pitch}
\tdplotsetthetaplanecoords{-90}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.5)}{0.03}{140}{440}{anchor=west}{roll}
\end{tikzpicture}
% Latexpfeil soll für das ganze Dokument gültig sein
\tikzset{>=Latex}
\begin{tikzpicture} [tdplot_main_coords, thick, scale = 5]
% Coordinate system:
\draw[<->] (-0.5,0,0) node[below]{$-x$} -- (0.6,0,0) node[below]{$x$};
\draw[<->] (0,-0.5,0) node[left]{$-y$} -- (0,0.7,0) node[left]{$y$};
\draw[<->] (0,0,-0.5) node[left]{$-z$} -- (0,0,0.7) node[left]{$z$};
% yaw, pitch, roll
\tdplotdrawarc[->]{(0,0,0.55)}{0.03}{30}{330}{above, xshift = -2mm, yshift = -1mm}{yaw}
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.55)}{0.03}{140}{440}{above, xshift = 3mm, yshift = -0mm, anchor=west}{pitch}
\tdplotsetthetaplanecoords{-90}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.5)}{0.03}{140}{440}{anchor=west}{roll}
\end{tikzpicture}
\end{document}
Ich würde gerne in meinem ganzen Dokument eine andere Pfeilart verwenden, deshalb habe ich \tikzset{>=Latex} gewählt. Nun habe ich das Problem, dass die Positionierung bei der Rotationsanzeige nicht mehr passt.
Wie kann ich den Rotations-Pfeil richtig positionieren?
godi
Hallo,
ich versuche gerade mit tikz um Achsen eines Koordinatensystems Pfeile zu zeichnen damit die Rotation dargestellt wird.
Da ich in diesem Koordinatensystem eine 2D-Zeichnung 3-Dimensional darstellen will verwende ich tikz-3dplot.
Beispiel:
[code]
\documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{arrows.meta}
\begin{document}
\tdplotsetmaincoords{45}{15}
\begin{tikzpicture} [tdplot_main_coords, thick, scale = 5]
% Coordinate system:
\draw[<->] (-0.5,0,0) node[below]{$-x$} -- (0.6,0,0) node[below]{$x$};
\draw[<->] (0,-0.5,0) node[left]{$-y$} -- (0,0.7,0) node[left]{$y$};
\draw[<->] (0,0,-0.5) node[left]{$-z$} -- (0,0,0.7) node[left]{$z$};
% yaw, pitch, roll
\tdplotdrawarc[->]{(0,0,0.55)}{0.03}{30}{330}{above, xshift = -2mm, yshift = -1mm}{yaw}
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.55)}{0.03}{140}{440}{above, xshift = 3mm, yshift = -0mm, anchor=west}{pitch}
\tdplotsetthetaplanecoords{-90}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.5)}{0.03}{140}{440}{anchor=west}{roll}
\end{tikzpicture}
% Latexpfeil soll für das ganze Dokument gültig sein
\tikzset{>=Latex}
\begin{tikzpicture} [tdplot_main_coords, thick, scale = 5]
% Coordinate system:
\draw[<->] (-0.5,0,0) node[below]{$-x$} -- (0.6,0,0) node[below]{$x$};
\draw[<->] (0,-0.5,0) node[left]{$-y$} -- (0,0.7,0) node[left]{$y$};
\draw[<->] (0,0,-0.5) node[left]{$-z$} -- (0,0,0.7) node[left]{$z$};
% yaw, pitch, roll
\tdplotdrawarc[->]{(0,0,0.55)}{0.03}{30}{330}{above, xshift = -2mm, yshift = -1mm}{yaw}
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.55)}{0.03}{140}{440}{above, xshift = 3mm, yshift = -0mm, anchor=west}{pitch}
\tdplotsetthetaplanecoords{-90}
\tdplotdrawarc[tdplot_rotated_coords,->]{(0,0,0.5)}{0.03}{140}{440}{anchor=west}{roll}
\end{tikzpicture}
\end{document}
[/code]
Ich würde gerne in meinem ganzen Dokument eine andere Pfeilart verwenden, deshalb habe ich \tikzset{>=Latex} gewählt. Nun habe ich das Problem, dass die Positionierung bei der Rotationsanzeige nicht mehr passt.
Wie kann ich den Rotations-Pfeil richtig positionieren?
godi