![在球形八分圆的表面上绘制矢量场,但不在特定区域内](https://linux22.com/image/473606/%E5%9C%A8%E7%90%83%E5%BD%A2%E5%85%AB%E5%88%86%E5%9C%86%E7%9A%84%E8%A1%A8%E9%9D%A2%E4%B8%8A%E7%BB%98%E5%88%B6%E7%9F%A2%E9%87%8F%E5%9C%BA%EF%BC%8C%E4%BD%86%E4%B8%8D%E5%9C%A8%E7%89%B9%E5%AE%9A%E5%8C%BA%E5%9F%9F%E5%86%85.png)
我感兴趣的是绘制一个朝向或远离单位八分圆表面上的单个点的矢量场。如果可能的话,我想限制这种情况不会发生在某些路径跨越的区域内。我编写了以下代码,可生成如下所示的图像。此外,我还突出显示了我想要的内容。
\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 坐标会带来一些更复杂的计算。如果还有一个外部库可以使这更容易,我也会非常乐意了解它。