tikz-3dplot을 사용하여 z축을 중심으로 두 개의 디스크가 회전합니까?

tikz-3dplot을 사용하여 z축을 중심으로 두 개의 디스크가 회전합니까?

저는 tikz-3dplot 초보자입니다. 이 그림을 그리고 싶습니다. 여기에 이미지 설명을 입력하세요

나는 주어진 설명을 사용했다.존 코밀로,

\documentclass[tikz]{standalone}
\usepackage{tikz,tikz-3dplot}
\usetikzlibrary{patterns}% comme shading pour remplir une surface
\begin{document}

%\pgfmathsetmacro{\iAngle}{0}
\tdplotsetmaincoords{70}{110}
\foreach \iAngle in {1,10,...,360}
{
\begin{tikzpicture}[scale=5,tdplot_main_coords]
\coordinate (O) at (0,0,0);
\draw[thick,->] (O) -- (1.5,0,0) node[anchor=north]{$x$};
\draw[thick,->] (O) -- (0,1,0) node[anchor=west]{$y$};
\draw[thick,->] (O) -- (0,0,1) node[anchor=south]{$z$};
\draw[thick, opacity=0.3]
  (0,0,0) -- (1.5,0,0) -- (1.5,1,0) -- (0,1,0) -- cycle;
\fill[pattern=dots,opacity=0.5]
  (0,0,0) -- (1.5,0,0) -- (1.5,1,0) -- (0,1,0) -- cycle; 

  \fill[red,thick] (0,0,0.3) circle (0.3pt) node[left] {$O_1$};

\tdplotsetrotatedcoords{\iAngle}{0}{0}
\begin{scope}[tdplot_rotated_coords]
\draw[red,thick, ->]
 (0.6,0,0.3) -- (1.5,0,0.3) node[above] {$x_1$};
\draw[red,thick, ->]
 (0,0,0.3) -- (0,1,0.3) node[above] {$y_1$};
 \draw[thick, dashed, opacity=1]
  (0,0,0) -- (1.5,0,0);
   \fill[blue,thick] (0.6,0,0.3) circle (0.3pt) node[above] {$A_1$};
    \fill[blue,thick] (1.2,0,0.3) circle (0.3pt) node[above] {$A_2$};
    \draw[pattern=north west lines, pattern color=blue, opacity=0.5 ] (0.6,0,0.3) circle (0.7); 
     \draw[pattern=north west lines, pattern color=green, opacity=0.5 ] (1.2,0,0.3) circle (0.7);
      \draw[thick, dashed, opacity=1]
  (0,0,0.3) -- (0.6,0,0.3);
  \draw[thick, line, opacity=1]
  (0.6,0,0.3) -- (1.2,0,0.3);
\end{scope}
\end{tikzpicture}
}
\end{document}

다음 그림을 얻었지만 완전하지 않습니다.

여기에 이미지 설명을 입력하세요

애니메이션의 주요 좌표를 어떻게 수정할 수 있나요?

디스크와 관련된 단위 벡터를 추가하는 방법은 무엇입니까?

어떤 각도에서 재미있는 모습을 볼 수 있나요?

이 일을 달성하기 위해 누구든지 나를 도와줄 수 있나요?

답변1

잘못된 line인수를 제거하고 그림이 점프하지 않도록 경계 상자를 만들었으며 가장 중요하게는 원을 회전 축과 직각으로 만들었습니다.

\documentclass[tikz]{standalone}
\usepackage{tikz,tikz-3dplot}
\usetikzlibrary{patterns}% comme shading pour remplir une surface
\begin{document}

\pgfmathsetmacro{\RelativeSpeed}{0.3}
\tdplotsetmaincoords{70}{110}
\foreach \iAngle in {1,5,...,360}
{
\begin{tikzpicture}[scale=5,tdplot_main_coords]
\useasboundingbox[tdplot_screen_coords] (-1.8,-1) rectangle (1.4,1.4);
\coordinate (O) at (0,0,0);
\draw[thick,->] (O) -- (1.5,0,0) node[anchor=north]{$x$};
\draw[thick,->] (O) -- (0,1,0) node[anchor=west]{$y$};
\draw[thick,->] (O) -- (0,0,1) node[anchor=south]{$z$};
\draw[thick, opacity=0.3]
  (0,0,0) -- (1.5,0,0) -- (1.5,1,0) -- (0,1,0) -- cycle;
\fill[pattern=dots,opacity=0.5]
  (0,0,0) -- (1.5,0,0) -- (1.5,1,0) -- (0,1,0) -- cycle; 

  \fill[red,thick] (0,0,0.3) circle (0.3pt) node[left] {$O_1$};

\tdplotsetrotatedcoords{\iAngle}{00}{0}
\begin{scope}[tdplot_rotated_coords]
\draw[red,thick, ->]
 (0.6,0,0.3) -- (1.5,0,0.3) node[above] {$x_1$};
\draw[red,thick, ->]
 (0,0,0.3) -- (0,1,0.3) node[above] {$y_1$};
 \draw[thick, dashed, opacity=1]
  (0,0,0) -- (1.5,0,0);
   \coordinate[label=above:$A_1$] (A1) at (0.6,0,0.3);
   \coordinate[label=above:$A_2$] (A2) at (1.2,0,0.3);
   \fill[blue,thick] (A1) circle (0.3pt);
   \fill[blue,thick] (A2) circle (0.3pt);
\end{scope}
\tdplotsetrotatedcoords{\iAngle}{90}{0}
\begin{scope}[tdplot_rotated_coords]
    \draw[pattern=north west lines, pattern color=blue, opacity=0.5 ] (A1) circle (0.7); 
    \draw[pattern=north west lines, pattern color=green, opacity=0.5 ] (A2) circle (0.7);
    \pgfmathsetmacro{\jAngle}{\RelativeSpeed*\iAngle}
    \draw[-latex,blue] (A1) -- ++({-0.7*cos(\jAngle)},{0.7*sin(\jAngle)},0)node[right]{$y_1'$}; 
    \draw[-latex,blue] (A1) -- ++({0.7*sin(\jAngle)},{0.7*cos(\jAngle)},0)node[right]{$x_1'$};  
    \draw[-latex,green] (A2) -- ++(-0.7,0,0)node[right]{$y_2'$};    
    \draw[-latex,green] (A2) -- ++(0,0.7,0)node[right]{$x_2'$}; 
\end{scope}
\tdplotsetrotatedcoords{\iAngle}{00}{0}
\begin{scope}[tdplot_rotated_coords]
      \draw[thick, dashed, opacity=1]
  (0,0,0.3) -- (0.6,0,0.3);
  \draw[thick, -, opacity=1]
  (0.6,0,0.3) -- (1.2,0,0.3);
\end{scope}
\end{tikzpicture}
}
\end{document}

업데이트: 귀하의 요청이 해결되었기를 바랍니다. 이 버전에서는 파란색 프레임이 큰 프레임 회전 속도의 30%로 회전합니다. 상대 속도는 매개변수에 의해 설정됩니다 \RelativeSpeed. 동일한 방법을 사용하여 녹색 프레임을 회전하거나 다른 속도로 회전할 수 있습니다. 실제로 코드를 작성하는 것은 다소 간단하지만 PDF를 애니메이션 gif로 변환하는 데 어려움을 겪고 있습니다. (왜 그렇게 복잡합니까? 왜 그렇게 오래 걸리나요?) 따라서 저는 이 작업을 수행하는 보다 효율적인 방법을 배우고 싶습니다.

여기에 이미지 설명을 입력하세요

관련 정보