%EC%97%90%EC%84%9C%EB%8A%94%20%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
에 따르면tikz-3dplot 문서, tdplotsetrotatedcoords
오일러 각도 회전 모음에 따라 기능을 회전해야 합니다.
설명:
tdplot_rotated_coords
사용자가 지정한 오일러 각도(α,β,γ)를 기준으로 현재 주 좌표계 내에서 회전된 좌표계에 대한 좌표 변환을 제공하는 스타일을 생성합니다 . 회전은 오일러 회전의 z(α)y(β)z(γ) 규칙을 사용합니다. 여기서 시스템은 z축을 중심으로 γ만큼 회전한 다음 (세계) y축을 중심으로 β, 그리고 (세계) 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}
결과: