答案1
这可能是初始点。您可以使用 3d 坐标并在这些坐标中绘制函数。这允许您显示球体的一部分并在球面坐标中绘制各种曲线。
\documentclass[tikz,border=2mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.markings,fpu}
\begin{document}
\tdplotsetmaincoords{140}{0}
\begin{tikzpicture}[tdplot_main_coords,
line cap=round,line join=round,
>=stealth,
smooth,variable=\t,
declare function={R=10;% radius
phimin=30;phimax=60;% longitude range
thetamin=20;thetamax=60;% latitude range
}]
\begin{scope}
\clip plot[domain=phimin:phimax] (xyz spherical cs:radius=R,latitude=thetamin,longitude=\t)
-- plot[domain=thetamin:thetamax] (xyz spherical cs:radius=R,latitude=\t,longitude=phimax)
-- plot[domain=phimax:phimin] (xyz spherical cs:radius=R,latitude=thetamax,longitude=\t)
-- plot[domain=thetamax:thetamin] (xyz spherical cs:radius=R,latitude=\t,longitude=phimin)
-- cycle;
\path[tdplot_screen_coords,ball color=gray] circle[radius=R];
\foreach \X in {1,...,10}
{\pgfmathsetmacro{\mythetamin}{thetamin+phimin+\X*(thetamax-thetamin)/6}
\ifnum\X=5\relax
\draw[/pgf/fpu/install only={reciprocal},blue,postaction={decorate,decoration={markings,
mark=at position 0.485 with {\draw[blue,->,solid,thick] (0pt,0pt) -- (1cm,0pt) node[below]{$\vec v$};}}}] plot[domain=phimin:phimax] (xyz spherical cs:radius=R,latitude=\mythetamin-\t,longitude=\t);
\else
\draw[blue] plot[domain=phimin:phimax] (xyz spherical cs:radius=R,latitude=\mythetamin-\t,longitude=\t);
\fi
}
\end{scope}
\draw[/pgf/fpu/install only={reciprocal},
red,dashed,postaction={decorate,decoration={markings,
mark=at position 0.47 with {\draw[red,->,solid,thick] (0pt,0pt) -- (1cm,0pt) node[below]{$\mathrm{d}\vec\ell$};}}}] plot[domain=phimin:phimax] (xyz spherical cs:radius=R,latitude={0.5*thetamin+0.5*thetamax},longitude={\t});
\end{tikzpicture}
\end{document}
是的,学习 LaTeX 语法需要付出努力,但是如果您希望能够独立生成这样的图形,您可以等到 AI 可以生成干净的代码,或者学习自己做。