This is a function of limited scope:
```
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3dtools}% https://github.com/marmotghost/tikz-3dtools
\makeatletter
\tikzset{3d/point on sphere/.code={\tikzset{3d/.cd,#1,
/tikz/insert path={
({\pgfkeysvalueof{/tikz/3d/R}*cos(\pgfkeysvalueof{/tikz/3d/longitude})*cos(\pgfkeysvalueof{/tikz/3d/latitude})},
{\pgfkeysvalueof{/tikz/3d/R}*sin(\pgfkeysvalueof{/tikz/3d/longitude})*cos(\pgfkeysvalueof{/tikz/3d/latitude})},
{\pgfkeysvalueof{/tikz/3d/R}*sin(\pgfkeysvalueof{/tikz/3d/latitude})})}}},
3d/latitude/.initial=0,3d/longitude/.initial=0,
3d/arcs/O/.initial={(0,0,0)},
3d/arcs/n/.initial={(0,0,1)},
3d/arcs/A/.initial={(1,0,0)},
3d/arcs/B/.initial={(0,1,0)},
pics/3d/great circle arc/.style={code={%
\tikzset{3d/arcs/.cd,#1}%
\def\pv##1{\pgfkeysvalueof{/tikz/3d/arcs/##1}}%
\pgfmathsetmacro{\pgfutil@tmpa}{tddistance("\pgfkeysvalueof{/tikz/3d/arcs/A}","\pgfkeysvalueof{/tikz/3d/arcs/O}")}%
\pgfmathsetmacro{\pgfutil@tmpb}{tddistance("\pgfkeysvalueof{/tikz/3d/arcs/B}","\pgfkeysvalueof{/tikz/3d/arcs/O}")}%
\pgfmathtruncatemacro{\pgfutil@tmpi}{abs(\pgfutil@tmpa-\pgfutil@tmpb)<0.01?1:0}%
\ifnum\pgfutil@tmpi=0\relax
\PackageWarning{3dtools}{The points \pv{A} and \pv{B} do not sit on the
same sphere around \pv{O}.}%
\else
\pgfmathsetmacro{\pgfutil@tmpA}{TD("\pgfkeysvalueof{/tikz/3d/arcs/A}")}%
\pgfmathsetmacro{\pgfutil@tmpB}{TD("\pgfkeysvalueof{/tikz/3d/arcs/B}")}%
\pgfmathsetmacro{\pgfutil@tmpO}{TD("\pgfkeysvalueof{/tikz/3d/arcs/O}")}%
\pgfmathtruncatemacro{\pgfutil@tmpV}{sign(screendepth(\pgfutil@tmpA)-screendepth(\pgfutil@tmpO))}%
\pgfmathtruncatemacro{\pgfutil@tmpW}{sign(screendepth(\pgfutil@tmpB)-screendepth(\pgfutil@tmpO))}%
\pgfmathsetmacro{\pgfutil@tmpr}{sqrt(\pgfutil@tmpa*\pgfutil@tmpb)}%
\pgfmathsetmacro{\pgfutil@tmpc}{Mod(360+acos(TD("\pv{A}-\pv{O}o\pv{B}-\pv{O}")/\pgfutil@tmpa/\pgfutil@tmpb),360)}%
\tikzset{3d/define orthonormal dreibein={A={\pv{O}},B={\pv{A}},C={\pv{B}}}}
\begin{scope}[x/.expanded={\pgfkeysvalueof{/tikz/3d/aux keys/ex}},
y/.expanded={\pgfkeysvalueof{/tikz/3d/aux keys/ey}},
z/.expanded={\pgfkeysvalueof{/tikz/3d/aux keys/ez}}]
\pgfmathsetmacro{\pgfutil@tmpt}{Mod(360+atan2(-1*nscreenx,nscreeny),360)}%
\pgfmathtruncatemacro{\pgfutil@tmpi}{(\pgfutil@tmpt>0&&\pgfutil@tmpt<\pgfutil@tmpc)+(\pgfutil@tmpt+180>0&&\pgfutil@tmpt+180<\pgfutil@tmpc)}
\typeout{angle=\pgfutil@tmpc,radius=\pgfutil@tmpr,O=\pv{O},
tcrit=\pgfutil@tmpt,V=\pgfutil@tmpV,W=\pgfutil@tmpW,i=\pgfutil@tmpi}
\ifcase\pgfutil@tmpi
\ifnum\pgfutil@tmpV<0
\path[3d/hidden] (0:\pgfutil@tmpa) arc[start angle=0,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\else
\path[3d/visible] (0:\pgfutil@tmpa) arc[start angle=0,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\fi
\or
\ifnum\pgfutil@tmpV<0
\path[3d/hidden] (0:\pgfutil@tmpa)
arc[start angle=0,end angle=\pgfutil@tmpt,radius=\pgfutil@tmpa];
\path[3d/visible] (\pgfutil@tmpt:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\else
\path[3d/visible] (0:\pgfutil@tmpa)
arc[start angle=0,end angle=\pgfutil@tmpt,radius=\pgfutil@tmpa];
\path[3d/hidden] (\pgfutil@tmpt:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\fi
\or
\ifnum\pgfutil@tmpV<0
\path[3d/hidden] (0:\pgfutil@tmpa)
arc[start angle=0,end angle=\pgfutil@tmpt,radius=\pgfutil@tmpa];
\path[3d/visible] (\pgfutil@tmpt:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt,end angle=\pgfutil@tmpt+180,radius=\pgfutil@tmpa];
\path[3d/hidden] (\pgfutil@tmpt+180:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt+180,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\else
\path[3d/visible] (0:\pgfutil@tmpa)
arc[start angle=0,end angle=\pgfutil@tmpt,radius=\pgfutil@tmpa];
\path[3d/hidden] (\pgfutil@tmpt:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt,end angle=\pgfutil@tmpt+180,radius=\pgfutil@tmpa];
\path[3d/visible] (\pgfutil@tmpt+180:\pgfutil@tmpa)
arc[start angle=\pgfutil@tmpt+180,end angle=\pgfutil@tmpc,radius=\pgfutil@tmpa];
\fi
\fi
\end{scope}
\fi
}}}
\makeatother
\begin{document}
\begin{tikzpicture}[3d/install view={phi=0,theta=70},line join = round, line cap = round,
declare function={R=3;}]
\path (0,0,0) coordinate (O)
[3d/point on sphere={R=R,longitude=30,latitude=20}] coordinate (A)
[3d/point on sphere={R=R,longitude=-120,latitude=50}] coordinate (B);
\path pic{3d/great circle arc={A={(A)},B={(B)},O={(O)}}};
\draw[3d/visible,3d/screen coords] (O) circle[radius=R];
\end{tikzpicture}
\end{document}
```