I am trying to visualise some analytical geometry arguments. For that reason I need to cover part of a sphere, basically the half of the sphere where the thick blue line belongs (see below), but not cover the other half. By cover I mean paint it with a colour. Here is my code so far:
\documentclass[crop,tikz]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{tikz-3dplot}
\usepackage{amsmath}
\usepackage{amssymb}
\usepgfplotslibrary{fillbetween}
\def \plotwidth {510.0pt}
\definecolor{color4}{RGB}{5,113,176}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.markings}
\pgfplotsset{compat=1.12}
\pgfplotsset{ticks=none}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view/h=45,
axis equal,
axis lines=center,
]
\addplot3[color4, samples=50, domain=1.5*pi:2.5*pi, line width=0.2pt, z=1/sqrt(2)] ({sin(deg(x))/sqrt(2)}, {cos(deg(x))/sqrt(2)}, {1/sqrt(2)});
\addplot3[color4, samples=50, domain=-0.5*pi:0.5*pi, line width=0.2pt, z=-1/sqrt(2)] ({sin(deg(x))/sqrt(2)}, {cos(deg(x))/sqrt(2)}, {-1/sqrt(2)});
\addplot3[color4, samples=50, y domain=pi:2*pi, line width=0.2pt, smooth, x=1/sqrt(2)] ({1/sqrt(2)}, {sin(deg(y))/sqrt(2)}, {cos(deg(y))/sqrt(2)});
\addplot3[color4, samples=50, y domain=pi:2*pi, line width=0.2pt, smooth, x=-1/sqrt(2)] ({-1/sqrt(2)}, {sin(deg(y))/sqrt(2)}, {cos(deg(y))/sqrt(2)});
\addplot3[color4, samples=50, y domain=pi:2*pi, thick, smooth, x=0] (0, {sin(deg(y))}, {cos(deg(y))});
\addplot3[surf, opacity=0.1, samples=21, domain=-1:1, y domain=0:2*pi, z buffer=sort] ({sqrt(1-x^2) * cos(deg(y))}, {sqrt( 1-x^2 ) * sin(deg(y))}, x);
\end{axis}
\end{tikzpicture}
\end{document}
Any advice is welcome!


