
이와 비슷한 Tikz로 이미지를 만들려고 합니다.
그리고 저는 부분적으로 코드를 기반으로 이 코드를 작성했습니다.이 스레드~처럼
\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\newcommand{\xangle}{7}
\newcommand{\yangle}{137.5}
\newcommand{\zangle}{90}
\newcommand{\xlength}{1}
\newcommand{\ylength}{0.5}
\newcommand{\zlength}{1}
\pgfmathsetmacro{\xx}{\xlength*cos(\xangle)}
\pgfmathsetmacro{\xy}{\xlength*sin(\xangle)}
\pgfmathsetmacro{\yx}{\ylength*cos(\yangle)}
\pgfmathsetmacro{\yy}{\ylength*sin(\yangle)}
\pgfmathsetmacro{\zx}{\zlength*cos(\zangle)}
\pgfmathsetmacro{\zy}{\zlength*sin(\zangle)}
\begin{tikzpicture}
[ x={(\xx cm,\xy cm)},
y={(\yx cm,\yy cm)},
z={(\zx cm,\zy cm)},
]
\draw[dashed] (0,0,0) circle (4.5);
\draw[blue!80!black,->] (240:4.5) -- (240:5.5);
\node[blue!80!black] at (240:5.8) {y};
\draw[green!80!black,->] (240:4.5) -- ++(0,0,1);
\node[green!80!black] at ($(240:4.5)+(0,0,1.2)$) {z};
\draw[red!80!black,->] (240:4.5) -- ++ (240+90:1);
\node[red!80!black] at ($(240:4.5)+(240+90:1.3)$) {x};
\fill[black!50!gray,draw=black!50!black] (240:4.5) circle (0.05cm);
\foreach \d in {0,60,120,180,240,300}
{
\draw[thick, black,->] (\d:4.5) -- ++(1,1,1);
}
\end{tikzpicture}
\end{document}
그러나 나는 같은 방향을 가리키는 모든 벡터를 얻습니다. 첫 번째 그림과 유사하게 수정하려면 어떻게 해야 합니까? 그리고 첫 번째 그림에서처럼 \alpha와 \beta 각도를 어떻게 더할 수 있나요?
답변1
당신이 사용할 수있는tikz-3dplot
. 회전된 좌표로 전환할 수 있습니다. 내 의견은 당신이 정말로 병렬 전송을 원한다는 것입니다.회전스크린샷에서와 같이 벡터입니다. 접선의 평행 이동이 훨씬 쉬울 것입니다. xy 평면만 사용하면 됩니다. (이것이 당신이 원하는 것인지 알려주세요.)
평행 이송될 벡터의 회전 각도는 "기능" alpha
및 에 저장됩니다 beta
. 시야각뿐만 아니라 마음대로 조정할 수 있습니다.
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{00}%<- set view angles
\begin{tikzpicture}[>=stealth,line cap=round,
tdplot_main_coords,%<- install 3d view
declare function={R=4;alpha=-40;beta=-50;}%<- radius of the circle and angles
]
\begin{scope}[canvas is xy plane at z=0]
\draw[semithick] (0,0) circle[radius=R];
\draw[thick,->,blue] (-1.5,-R) -- ++ (3,0) node[right]{$t$};
\draw (1,-R) arc[start angle=0,end angle=alpha,radius=1];
\path foreach \X in {0,...,5}
{(-90+\X*60:R) coordinate (p\X)}; % points along the circle
\end{scope}
% rotated plane at p0
\tdplotsetrotatedcoords{alpha}{0}{0}
\begin{scope}[tdplot_rotated_coords,canvas is xz plane at y=0,shift={(p0)}]
\draw (0,0) rectangle ++ ((90+beta:{1/abs(cos(alpha))}) (1,0) node[right]{$\alpha$};
\draw[thick,->,red] (-90+beta:{1/abs(cos(alpha))})
-- ++ (90+beta:{2/abs(cos(alpha))});
\draw[->] (0,-1) -- (0,1) node[above]{$z$};
\draw (0,0.5) arc[start angle=90,end angle=90+beta,radius=0.5]
node[midway,above right] {$\beta$};
\end{scope}
% other planes
\foreach \X in {1,...,5}
{\tdplotsetrotatedcoords{alpha}{0}{\X*60}
\begin{scope}[tdplot_rotated_coords,canvas is xz plane at y=0,shift={(p\X)}]
\draw[thick,->,red] (-90+beta:{1/abs(cos(alpha))})
-- ++ (90+beta:{2/abs(cos(alpha))});
\end{scope}}
\end{tikzpicture}
\end{document}