add tag
Anonymous 1123
Next Spherical Wedge is [Spherical Sector](
https://mathworld.wolfram.com/SphericalSector.html)
![ScreenHunter 56.png](/image?hash=903de6f4c4cbb5b56647706ce6722bbb04d8c540f9ae8bc08bdfb1e485d0795f)

How to draw it?
Top Answer
marmot
I do not think that it will be fun to make this work for all possible view angles, but for those similar to your screen shot it is not too difficult.
```
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{calc,decorations.pathreplacing,3dtools}%https://github.com/marmotghost/tikz-3dtools
\begin{document}
\pgfdeclarelayer{background} 
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}
\begin{tikzpicture}[declare function={R=2;},line cap=round,line join=round,
	sphere/.style={ball color=blue,3d/screen coords,fill opacity=0.8,
		insert path={(0,0) circle[radius=R]}}]
 \begin{scope}[3d/install view={phi=110,psi=0,theta=75}]
  \path  (0,0,0) coordinate (O) (0,0,1) coordinate (P) (0,0,1.5) coordinate (Q);
  \tikzset{3d/circle construction/.code={
  \draw[stored path/reset coordinate index,
  	3d/hidden/.style={store path=bg#1},
  	3d/visible/.append style={on layer=foreground}]   	
	pic{3d/circle on sphere={R=2,P={(#1)}}};	
  \pgfmathtruncatemacro{\Nhid}{tikztdindexoflastcoordinate}
  \ifnum\Nhid>0
   \path[stored path/first coordinate of=bg#1] coordinate (bg#10)
	 [stored path/last coordinate of=bg#1] coordinate (bg#11);
  \fi	
  \draw[stored path/reset coordinate index,
  	3d/hidden/.append style={on layer=background},
  	3d/visible/.style={store path=fg#1}]		
	pic{3d/circle on sphere={R=2,P={(#1)}}};	
  \pgfmathtruncatemacro{\Nvis}{tikztdindexoflastcoordinate}	
  \ifnum\Nvis>0
   \path[stored path/first coordinate of=fg#1] coordinate (fg#10)
	 [stored path/last coordinate of=fg#1] coordinate (fg#11);
  \fi}}	
  \tikzset{3d/circle construction/.list={Q,P}}
  \pgfmathtruncatemacro{\itest}{(\Nhid>0?1:0)+(\Nvis>0?2:0)}
  \begin{scope}[3d/screen coords]
   \clip[overlay,on layer=background,even odd clip] 
    [stored path/restore path=bgQ] -- ++ (0,R) -| cycle 
	[generous outside path];
   \clip[overlay,even odd clip] 
    [stored path/restore path=fgQ] -- ++ (0,R) -| cycle 
	[generous outside path];
   \clip[overlay,on layer=foreground,,even odd clip] 
    [stored path/restore path=fgQ] -- ++ (0,R) -| cycle 
	[generous outside path];
   \ifcase\itest
	% no path
   \or
	% only hidden
	\begin{scope}[on layer=background]
	 \clip[stored path/restore path=bgP];
	 \path[sphere,ball color=gray];
	\end{scope}
   \or
	% only visible
	\begin{scope}[on layer=foreground]
	 \clip[stored path/restore path=fgP];
	 \path[sphere];
	\end{scope} 
   \or
    \begin{scope}[on layer=background]
	 \clip let \p1=(bgP0),\p2=(bgP1),\n1={Mod(atan2(\y1,\x1),360)},
	 	\n2={Mod(atan2(\y2,\x2),360)}
	  in (bgP0) [stored path/append path=bgP] -- (bgP1)
	  arc[start angle=\n2,end angle=\n1,radius=R] -- cycle;
	 \path[sphere,ball color=gray]; 
	\end{scope}
    \begin{scope}[on layer=foreground]
	 \clip let \p1=(fgP0),\p2=(fgP1),\n1={Mod(atan2(\y1,\x1),360)},
	 	\n2={Mod(atan2(\y2,\x2),360)}
	  in (fgP0) [stored path/append path=fgP] -- (fgP1)
	  arc[start angle=\n2,end angle=\n1,radius=R] -- cycle;
	 \path[sphere]; 
	\end{scope}
   \fi
  \end{scope}
  \pgfmathsetmacro{\myh}{tddistance("(O)","(P)")}
  \pgfmathsetmacro{\myr}{sqrt(R*R-\myh*\myh)}
  \path (P) pic{3d/shaded cone={r=\myr,h=-\myh}};
  \draw[3d/visible,3d/screen coords] circle[radius=R];
 \end{scope} 
\end{tikzpicture}
\end{document}
```
![Screen Shot 2021-03-28 at 7.25.44 AM.png](/image?hash=ae4d86b67691b545072f098986e5490ab4988ce07c85c2f9598231714e929098)

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.