tdplotsetrotatedcoords 関数は軸では機能しますが、描画された円弧 (円) では機能しません。

tdplotsetrotatedcoords 関数は軸では機能しますが、描画された円弧 (円) では機能しません。

によるとtikz-3dplot ドキュメントは、tdplotsetrotatedcoordsオイラー角の回転に従ってフィーチャを回転する必要があります。

説明:

ユーザーが指定したオイラー角 (α、β、γ) に基づいて、現在のメイン座標フレーム内の回転座標フレームの座標変換を提供するスタイルを生成しますtdplot_rotated_coords。回転では、オイラー回転の z(α)y(β)z(γ) 規則が使用されます。この規則では、システムは z 軸を中心に γ 回転し、次に (ワールド) y 軸を中心に β 回転し、最後に (ワールド) z 軸を中心に α 回転します。

構文:

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

次のように表示されます。

結果の図面

ただし、赤い円は常に、元の回転されていない緑の円と同じ xy 平面上にあります。

x'y'平面に回転すると予想しました。

それをきちんと実現するにはどうすればいいでしょうか?
その\tdplotsetrotatedcoords機能は動作していないようです。

答え1

円の描画を「範囲' ですが、軸の場合はそうではありません。

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}

結果:

結果

関連情報