\begin{tikzpicture}[scale=1.0]

% Constants

	\def\r{2.5cm} % Radius

% Define the clip region

	\tkzInit[xmin=-6,xmax=0.5,ymin=-1,ymax=3]
	\tkzClip

% Define points

	\path (-5.0, 0.0) coordinate (O)  % Viewpoint and ray origin
		  (-4.0, 0.5) coordinate (P)  % The ray goes through this point
		  ( 0.0, 0.0) coordinate (C)  % Sphere center
		  (-0.5, 0.0) coordinate (N); % Point for to draw nadir

	\tkzPoint*(-6.0, 0.0){Pi}
	\tkzPoint*(-5.6,-0.6){Pj}
	\tkzPoint*(-5.0, 1.0){Pk}

% Intersect ray with sphere

	\tkzInterLCR(O,P)(C,\r){I}{J} % I = intersection point, J = not used

% Calculate vector points

	\tkzVectorNormalised(O,P){Ov}
	\tkzVectorNormalised(C,O){Cv} % Nadir
	\tkzVectorNormalised(O,C){Ov2} % Nadir

	% Sphere normal
	\tkzGetVectxy(C,I){v} % Get the vector from C to I into (\vx,\vy)
	\tkzGetPointxy(I){p} % Get the point int (\px,\py)
	\pgfmathparse{\px + \vx}\let\rx\pgfmathresult % Add vector to I
	\pgfmathparse{\py + \vy}\let\ry\pgfmathresult
	\path (\rx, \ry) coordinate (Iv2);
	\tkzVectorNormalised(I,Iv2){Iv}

% Draw points

	\tkzDrawPoint[pos=below right](O)
	\tkzDrawPoint[pos=below right](C)
	\tkzDrawPoint[pos=above](I)

% Draw angles

	\tkzMarkAngle[dist=0.13,size=0.45,labelsize={},label={\alpha}](I/O/Pk)
	\tkzMarkAngle[dist=0.25,labelsize={},label={\omega}](I/O/C)
	\tkzMarkAngle[dist=0.24,labelsize={},label={\gamma}](I/C/O)

% Draw vectors

	\tkzDrawVector(O/Pi)
	\tkzDrawVector(O/Pj)
	\tkzDrawVector(O/Pk)

	\tkzDrawPoint[name=$\unit{i}$,pos=above right,size=0](Pi)
	\tkzDrawPoint[name=$\unit{j}$,pos=left,size=0](Pj)
	\tkzDrawPoint[name=$\unit{k}$,pos=above,size=0](Pk)

	\tkzDrawVector(O/Ov)
	\tkzDrawVector(O/Ov2)
	\tkzDrawVector(C/Cv)
	\tkzDrawVector(I/Iv)

	% Vector labels
	\tkzDrawPoint[name=$\unit{r}$,pos=above left,size=0](Ov)
	\tkzDrawPoint[name=$\unit{n}$,pos=below,size=0](Ov2)
	\tkzDrawPoint[name=$-\unit{n}$,pos=below,size=0](Cv)
	\tkzDrawPoint[name=$\unit{s}$,pos=above,size=0](Iv)

% Draw dashed lines

	\tkzSegment[style=dashed](Ov/I)

	\tkzSegment[style=dashed](C/I)
	%\tkzSegment[style=dashed,label=$r$,time=0.60](C/I)

	\tkzSegment[style=dashed](Cv/Ov2)
	%\tkzSegmentMark[label=$d$,poslabel=-18pt,time=0.2](Cv/Ov2)
	%\tkzSegment[style=dashed,label=$d$,poslabel=-13pt,time=0.55](Cv/Ov2)

% Draw sphere

	\tkzCircleR(C,\r)

\end{tikzpicture}
