tikz에서 두 회전의 구성

tikz에서 두 회전의 구성

목표

사용tikz-3dplot, 나는 그림을 그리고 싶다대권이는 고정된 시점(즉, 시점 방향을 설명하는 벡터에 수직인 평면)에서 볼 때 반경 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}
\pgfmathsetmacro{\rvec}{1}
\pgfmathsetmacro{\thetavec}{54}
\pgfmathsetmacro{\phivec}{54}
\pgfmathsetmacro{\view}{135}

\tdplotsetmaincoords{75}{\view}

\definecolor{darkgreen}{rgb}{0.1,0.9,0.1}

\begin{tikzpicture}[scale=5,tdplot_main_coords]
\coordinate (O) at (0,0,0);
% Axes
\draw[thick,->] (O) -- (2.0,0,0) node[anchor=north east]{$X$};
\draw[thick,->] (O) -- (0,2.0,0) node[anchor=north west]{$Y$};
\draw[thick,->] (O) -- (0,0,1.4) node[anchor=south]{$Z$};

% Great circle in the OXZ plane
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords]{(O)}{\rvec}{0}{180}{}{}
\tdplotdrawarc[tdplot_rotated_coords,loosely dashed,gray]{(O)}{\rvec}
{180}{360}{}{}

% Great circle in the OYZ plane
\tdplotsetthetaplanecoords{90}
\tdplotdrawarc[tdplot_rotated_coords]{(O)}{\rvec}{0}{180}{}{}
\tdplotdrawarc[tdplot_rotated_coords,losely dashed,gray]{(O)}{\rvec}
{180}{360}{}{}

% Great circle in the OXY plane
\tdplotdrawarc[blue]{(O)}{\rvec}{-55}{125}{}{}
\tdplotdrawarc[loosely dashed,blue]{(O)}{\rvec}{125}{305}{}{}

%% Testing great circles
% Rotated Great circle around Z-axis, this is the first wanted rotation
% to bring it in the original, non rotated "O-Y_ori-Z" plane.
\tdplotsetthetaplanecoords{\view}
\tdplotdrawarc[tdplot_rotated_coords,cyan]{(O)}{\rvec}{0}{360}{}{}

% Rotated big circle around Y-axis, this second rotation should be applied
% just after the previous one, i.e. on the great circle colored in cyan.
% How to do that ?
\tdplotsetrotatedthetaplanecoords{15}
\tdplotdrawarc[tdplot_rotated_coords,darkgreen]{(O)}{\rvec}{0}{360}{}{}

\end{tikzpicture}
\end{document}

현재 코드의 결과:

결과 도면

내가 원하는 것은 부품에서 첫 번째, 두 번째 회전(순서대로)의 구성 결과를 얻는 것이지만 Testingtikz에 이를 어떻게 설명해야 할지 모르겠습니다.

답변1

이것을 추가하면 tikzpicture설명된 문제가 해결됩니다.

\tdplotsetrotatedcoords{\azimuth-90}{75}{0}
\begin{scope}[tdplot_rotated_coords]
  \tdplotdrawarc[red]{(O)}{\radius}{0}{360}{}{}
\end{scope}

더 나은 시각적 효과를 위해 75도 대신 55도의 극각에 대한 결과 원(빨간색)은 다음과 같습니다.

결과_55

다음 기능 을 사용하면 마법이 나타납니다 \tdplotsetrotatedcoords.

tdplotsetrotatedcoords 함수 정의

원천:tikz-3dplot 패키지 작성자: Jeff Hein, 2010년 1월 24일

관련 정보