Die Funktion tdplotsetrotatedcoords funktioniert auf Achsen, aber nicht auf gezeichneten Bögen (Kreisen).

Die Funktion tdplotsetrotatedcoords funktioniert auf Achsen, aber nicht auf gezeichneten Bögen (Kreisen).

Entsprechendtikz-3dplot-Dokumentation, tdplotsetrotatedcoordssollten Features gemäß der Reihe der Euler-Winkelrotationen rotieren:

Beschreibung:

Generiert den Stil tdplot_rotated_coords, der die Koordinatentransformation für rotierte Koordinatensysteme innerhalb des aktuellen Hauptkoordinatensystems bereitstellt, basierend auf benutzerdefinierten Euler-Winkeln (α, β, γ). Rotationen verwenden die z(α)y(β)z(γ)-Konvention von Euler-Rotationen, wobei das System um γ um die z-Achse, dann um β um die (Welt-)y-Achse und dann um α um die (Welt-)z-Achse rotiert wird.

Syntax:

\tdplotsetrotatedcoords{α}{β}{γ}

MWE:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz-3dplot}
%%%%%%%%
\begin{document}

\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords]

\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};

\tdplotdrawarc[green]{(O)}{.8\radius}{0}{360}{}{}

\tdplotsetrotatedcoords{10}{30}{70}
\tdplotdrawarc[red]{(O)}{\radius}{0}{360}{}{}

\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(.7,0,0) node[anchor=north]{$x’$};
\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(0,.7,0) node[anchor=west]{$y’$};
\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(0,0,.7) node[anchor=south]{$z’$};
\end{tikzpicture}

\end{document}

wird wie folgt wiedergegeben:

Resultierende Zeichnung

Der rote Kreis befindet sich jedoch immer auf derselben xy-Ebene wie der ursprüngliche, ungedrehte grüne Kreis.

Ich habe erwartet, dass es in die x'y'-Ebene gedreht wird.

Wie kann ich das richtig machen?
Die \tdplotsetrotatedcoordsFunktion scheint nicht zu funktionieren.

Antwort1

Es scheint, ich muss die Kreiszeichnung in ein ' einschließen.Umfang', aber für die Achsen ist das nicht der Fall:

MWE:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz-3dplot}
%%%%%%%%
\begin{document}
\begin{tikzpicture}[tdplot_main_coords]
\tdplotsetmaincoords{70}{110}
\draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};

\tdplotdrawarc[green]{(O)}{.8\radius}{0}{360}{}{}
\tdplotsetrotatedcoords{10}{30}{70}
% Scope enclosing here:
\begin{scope}[tdplot_rotated_coords]
  \tdplotdrawarc[red]{(O)}{\radius}{0}{360}{}{}
\end{scope}

\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(.7,0,0) node[anchor=north]{$x’$};
\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(0,.7,0) node[anchor=west]{$y’$};
\draw[thick,color=blue,tdplot_rotated_coords,->] (0,0,0) --(0,0,.7) node[anchor=south]{$z’$};
\end{tikzpicture}
\end{document}

Ergebnis:

Ergebnis

verwandte Informationen