tdplotsetrotatedcoords 函數適用於軸,但不適用於繪製的弧(圓)

tdplotsetrotatedcoords 函數適用於軸,但不適用於繪製的弧(圓)

根據tikz-3dplot 文檔tdplotsetrotatedcoords應依照歐拉角旋轉套件旋轉特徵:

描述:

tdplot_rotated_coords根據使用者指定的歐拉角(α,β,γ)產生為目前主座標系內的旋轉座標系提供座標變換的樣式。旋轉使用歐拉旋轉的 z(α)y(β)z(γ) 約定,其中系統繞 z 軸旋轉 γ,然後繞(世界)y 軸旋轉 β,然後繞 (世界)z 軸。

句法:

\tdplotsetrotatedcoords{α}{β}{γ}

微量元素:

\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

看來我必須將圓圈畫成'範圍',但對於軸來說並非如此:

微量元素:

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

結果:

結果

相關內容