我感兴趣的是绘制一个朝向或远离单位八分圆表面上的单个点的矢量场。如果可能的话,我想限制这种情况不会发生在某些路径跨越的区域内。我编写了以下代码,可生成如下所示的图像。此外,我还突出显示了我想要的内容。
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{arrows.meta}
\begin{document}
\tdplotsetmaincoords{65}{120}
\begin{tikzpicture}[
scale=2.5, tdplot_main_coords,
Arrow/.style={-{Latex[scale=.7]}},
]
% Draw axes
\draw[->] (0,0,0) -- (1.2,0,0) node[inner sep=0pt, below left] (r2) {$r_2$};
\draw[->] (0,0,0) -- (0,1.2,0) node[inner sep=0pt, below right] (r1) {$r_1$};
\draw[->] (0,0,0) -- (0,0,1.2) node[inner sep=0pt, above] (r3) {$r_3$};
% quarter circle on xy plane
\draw[dashed] (1,0,0) arc (0:90:1); % -- (0,0,0) -- cycle;
% quarter circle on xz plane
\tdplotsetthetaplanecoords{0}
\draw[dashed, tdplot_rotated_coords] (1,0,0) arc (0:90:1); % -- (0,0,0) -- cycle;
% quarter circle on yz plane
\tdplotsetthetaplanecoords{90}
\draw[dashed, tdplot_rotated_coords] (1,0,0) arc (0:90:1); % -- (0,0,0) -- cycle;
\node (A1) at (0.7,0.7,0.1) {};
\node (A2) at (0.7,0.1,0.7) {};
\node (A3) at (0.1,0.7,0.7) {};
% Draw triangle on surface with corners A1...A3
\draw[blue] (A1.center) edge[bend left] (A2.center);
\draw[blue] (A2.center) edge[bend left] (A3.center);
\draw[blue] (A3.center) edge[bend left] (A1.center);
\end{tikzpicture}
\end{document}
这就是我目前所拥有的。
这就是我想要的。
如果可能的话,我希望尽可能保持简单,但我知道 3D 坐标会带来一些更复杂的计算。如果还有一个外部库可以使这更容易,我也会非常乐意了解它。