Intersection of Sphere and Cone

Edit and compile if you like:

\documentclass{article}
%
% File name: intersection-sphere-cone.tex
% Description:
% A solid bounded by the following surfaces
% z = 0
% z = \sqrt{x^{2} + y^{2}}
% x^{2} + y^{2} + z^{2} = 1
% is generated. I.e., the intersection of half a sphere and a cone.
%
% Date of last modification: April, 23rd, 2022.
% Author: Efraín Soto Apolinar.
% https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/
% According to TikZ.net
%
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{math}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{1pt}
%
\begin{document}
%
\tdplotsetmaincoords{60}{130}
\begin{tikzpicture}[tdplot_main_coords,scale=1.75]
\tikzmath{function f(\x) {return \x;};}
\pgfmathsetmacro{\zini}{0.5*sqrt(2.0)}
\pgfmathsetmacro{\step}{0.01}
\pgfmathsetmacro{\zsig}{\zini+\step}
\pgfmathsetmacro{\nextz}{\zini+0.5*\step}
\pgfmathsetmacro{\sig}{2.0*\step}
\pgfmathsetmacro{\tini}{0.5*pi}
\pgfmathsetmacro{\tfin}{1.85*pi}
\pgfmathsetmacro{\tend}{2.5*pi}
%%% Coordinate axis
\draw[thick,->] (0,0,0) -- (1.5,0,0) node [below left] {\footnotesize$x$};
\draw[dashed,->] (0,0,0) -- (-1.5,0,0);
\draw[thick,->] (0,0,0) -- (0,1.5,0) node [right] {\footnotesize$y$};
\draw[dashed,->] (0,0,0) -- (0,-1.5,0);
% The region of integration
\draw[gray,thick,fill=yellow,opacity=0.25] plot[domain=0:6.2832,smooth,variable=\t] ({cos(\t r)},{sin(\t r)},{0.0});
% Firts part of the sphere (under the cone)
\foreach \altura in {\step,\sig,...,\zini}{
}
% Now, the cone (the part under the intersection)
\foreach \altura in {\step,\sig,...,\zini}{
}
% z axis (first part)
\draw[thick] (0,0,0) -- (0,0,1.0);
% The cone (level curves: z is constant)
\foreach \altura in {\zini,\zsig,...,1.0}{
}
% unit sphere (for z constant)
\foreach \altura in {\zini,\nextz,...,1.0}{
}
%	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+
%	+	+	+	+				Part of the front			+	+	+	+
%	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+
% The cone (part under the intersection)
\foreach \altura in {\step,\sig,...,\zini}{
}
% Unit sphere (for z constant)
\foreach \altura in {\zini,\nextz,...,1.0}{
}
% Part of the sphere under the cone
\foreach \altura in {\step,\sig,...,\zini}{
}
% The cone (for z constant)
\foreach \altura in {\zini,\zsig,...,1.0}{
\draw[thick,->] (0,0,1.0) -- (0,0,1.5) node [above] {\footnotesize$z$};