在球面八分圓表面上繪製向量場,但不在特定區域中繪製向量場

在球面八分圓表面上繪製向量場,但不在特定區域中繪製向量場

我感興趣的是繪製一個類似向量的場,朝向或遠離單位八分圓表面上的單點。如果可能的話,我想限制這種情況不會發生在某些路徑跨越的區域內。我有以下程式碼可以產生如下所示的圖像。我還強調了我想要什麼。

\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 座標會帶來一些更複雜的計算。如果還有一個外部函式庫可以讓這件事變得更加容易,我也非常樂意了解它。

相關內容