I am trying to do something similar to this picture. I used the following Example and question to start. Here is my code
\documentclass[11pt]{standalone}
\usepackage{tikz,amsmath}
\usepackage{tikz-3dplot}
\usetikzlibrary{shapes,positioning}
\usetikzlibrary{calc,fadings,decorations.pathreplacing,backgrounds}
\usepackage{pgfplots}
\begin{document}
%% helper macros
\newcommand\pgfmathsinandcos[3]{%
\pgfmathsetmacro#1{sin(#3)}%
\pgfmathsetmacro#2{cos(#3)}%
}
\newcommand\LongitudePlane[3][current plane]{%
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % azimuth
\tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\LatitudePlane[3][current plane]{%
\pgfmathsinandcos\sinEl\cosEl{#2} % elevation
\pgfmathsinandcos\sint\cost{#3} % latitude
\pgfmathsetmacro\yshift{\cosEl*\sint}
\tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}}
}
\newcommand\DrawLongitudeCircle[2][1]{
\LongitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
% angle of "visibility"
\pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
\draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);
}
\newcommand\DrawLatitudeCircle[2][1]{
\LatitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
\pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
% angle of "visibility"
\pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
\draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1);
}
\newcommand\DrawLatitudeCircleHalf[2][1]{
\LatitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
\pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
% angle of "visibility"
\pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
\filldraw[current plane] (0,0,0)--(\angVis-45:1) arc (\angVis-45:\angVis-110:1) -- (0,0,0)
}
\newcommand\LongitudePlaneHalf[2][current plane]{%
\pgfmathsinandcos\sinEl\cosEl{\angEl} % elevation
\pgfmathsinandcos\sint\cost{#2} % azimuth
\tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\newcommand\DrawLongitudeCircleHalf[2][1]{
\LongitudePlane{\angEl}{#2}
\tikzset{current plane/.prefix style={scale=#1}}
% angle of "visibility"
\pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
\draw[current plane] (\angVis:1) arc (\angVis:\angVis+127:1);
}
%% document-wide tikz options and styles
\tikzset{%
>=latex, % option for nice arrows
inner sep=0pt,%
outer sep=2pt,%
mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,
fill=black,circle}%
}
\begin{tikzpicture}%[tdplot_main_coords] % "THE GLOBE" showcase
\def\R{2.5} % sphere radius
\def\angEl{35} % elevation angle
\def\angleLongitudeP{-110} % longitude of point P
\def\angleLongitudeQ{-45} % longitude of point Q
\def\angleLatitudeQ{30} % latitude Q ; 0 latitude of P
\def\angleLongitudeA{-20} % longitude of point A
\LongitudePlaneHalf[PLongitudePlane]{\angleLongitudeP}
\LongitudePlaneHalf[QLongitudePlane]{\angleLongitudeQ}
\LongitudePlaneHalf[ALongitudePlane]{\angleLongitudeA}
\draw[] (0,0) circle (\R);
\foreach \t in {-80,-60,...,80} { \DrawLatitudeCircle[\R]{\t} }
\foreach \t in {-5,-35,...,-175} { \DrawLongitudeCircle[\R]{\t} }
% \begin{pgfonlayer}{background}
% \node {\includegraphics[scale=0.0708]{images/Earth.png}};
% \end{pgfonlayer}
\pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole
%%%%%%%%%%%%%%%
\coordinate[] (O) at (0,0,0);
\coordinate[] (N) at (0,\H);
\coordinate[] (S) at (0,-\H);
\path[PLongitudePlane] (0:\R) coordinate (P);
\path[QLongitudePlane] (0:\R) coordinate (B);
\color{blue!20!white};
\DrawLatitudeCircleHalf[\R]{0};
\color{red};
\DrawLongitudeCircleHalf[\R]{70};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{tikzpicture}
\end{document}
In my result, the red line goes over the "north pole." I need to fill the segment with colors, but can't even do the boundaries.