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}

结果:

结果

相关内容