我想在球体表面画一个正确的三角形。但我不知道如何正确绘制曲线。此外,我不想开始计算正弦和余弦。三角形的一个点必须位于北极。
有人能帮助我吗?非常感谢!
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick,->] (0,0,0) -- (0,3,0) node[anchor=north west]{$z$};
\shade[ball color = gray!40, opacity = 0.4] (0,0) circle (2cm);
\draw (0,0) circle (2cm);
\draw (-2,0) arc (180:360:2 and 0.6);
\draw[dashed] (2,0) arc (0:180:2 and 0.6);
\fill[fill=black] (0,0) circle (1pt);
\end{tikzpicture}
\end{document}
答案1
改编自土拨鼠这个友好生物的好答案https://tex.stackexchange.com/a/471670/191410
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d}
\begin{document}
\tdplotsetmaincoords{90}{-30}
\begin{tikzpicture}[tdplot_main_coords]
\pgfmathsetmacro{\Radius}{4}
\pgfmathsetmacro{\radius}{3.6}
\draw[tdplot_screen_coords] (0,0) circle (\Radius);
\begin{scope}
\draw plot[variable=\x,domain=-20:20] (xyz spherical cs:radius=\Radius,latitude=20,longitude=\x)
-- plot[variable=\x,domain=20:90] (xyz spherical cs:radius=\Radius,latitude=\x,longitude=20)
-- plot[variable=\x,domain=90:20] (xyz spherical cs:radius=\Radius,latitude=\x,longitude=-20);
\end{scope}
\draw[thick,->] (0,0,0) -- (0,0,5);
\draw[tdplot_screen_coords,dashed] (0,0) ellipse (4 and 0.5);
\node[anchor=north east] at (xyz spherical cs:radius=\Radius,latitude=20,longitude=-20) {A};
\node[anchor=north west] at (xyz spherical cs:radius=\Radius,latitude=20,longitude=20) {B};
\node[anchor=south east] at (xyz spherical cs:radius=\Radius,latitude=90,longitude=-20) {N};
\node[anchor=west] at (xyz spherical cs:radius=0,latitude=0,longitude=0) {0};
\end{tikzpicture}
\end{document}
或者
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{110}{-30}
\begin{tikzpicture}[tdplot_main_coords]
\pgfmathsetmacro{\Radius}{4}
\draw[tdplot_screen_coords] (0,0) circle (\Radius);
\begin{scope}
\draw plot[variable=\x,domain=-20:20] (xyz spherical cs:radius=\Radius,latitude=20,longitude=\x)
-- plot[variable=\x,domain=20:90] (xyz spherical cs:radius=\Radius,latitude=\x,longitude=20)
-- plot[variable=\x,domain=90:20] (xyz spherical cs:radius=\Radius,latitude=\x,longitude=-20);
\end{scope}
\draw[thick,dashed] (0,0,0) -- (0,0,\Radius);
\draw[thick,->] (0,0,\Radius) -- (0,0,5);
\draw[dashed] plot[variable=\x,domain=90-\tdplotmainphi:270-\tdplotmainphi]
(xyz spherical cs:radius=\Radius,latitude=0,longitude=\x);
\draw plot[variable=\x,domain=90-\tdplotmainphi:-90-\tdplotmainphi]
(xyz spherical cs:radius=\Radius,latitude=0,longitude=\x);
\node[anchor=north east] at (xyz spherical cs:radius=\Radius,latitude=20,longitude=-20) {A};
\node[anchor=north west] at (xyz spherical cs:radius=\Radius,latitude=20,longitude=20) {B};
\node[anchor=south east] at (xyz spherical cs:radius=\Radius,latitude=90,longitude=-20) {N};
\node[anchor=west] at (xyz spherical cs:radius=0,latitude=0,longitude=0) {0};
\end{tikzpicture}
\end{document}