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 creation: April, 23rd, 2022.% Date of last modification: April, 23rd, 2022.% Author: Efraín Soto Apolinar.% https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/% Terms of use:% According to TikZ.net% https://creativecommons.org/licenses/by-nc-sa/4.0/%\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);
Click to download: intersection-sphere-cone.tex • intersection-sphere-cone.pdf
Open in Overleaf: intersection-sphere-cone.tex
See more on the author page of Efraín Soto Apolinar.