%Draw with radius
\pgfmathparse{3}\let\R\pgfmathresult;
\pgfmathparse{1.1*\R}\let\RR\pgfmathresult;

%Origin
\coordinate (O) at (0,0);

%Points P and Q on unit circle, defined by the angle
\pgfmathparse{0.5*(\ThetaP+\ThetaQ)} \let\ThetaM\pgfmathresult;
\pgfmathparse{\ThetaP-\ThetaQ} \let\dTheta\pgfmathresult;

\coordinate (P) at (\ThetaP:\R);
\coordinate (Q) at (\ThetaQ:\R);
\coordinate (R) at (\ThetaM:\R);


%Midpoint
\coordinate (M) at ($(P)!0.5!(Q)$);

%Coordinates of P and Q
\pgfmathparse{\R*cos(\ThetaP)}\let\px\pgfmathresult;
\pgfmathparse{\R*sin(\ThetaP)}\let\py\pgfmathresult;

\pgfmathparse{\R*cos(\ThetaQ)}\let\qx\pgfmathresult;
\pgfmathparse{\R*sin(\ThetaQ)}\let\qy\pgfmathresult;


\pgfmathparse{(\qx-\px)*(\qx-\px)+(\py-\qy)*(\py-\qy)}\let\L\pgfmathresult;
\pgfmathparse{1/sqrt(\L)}\let\L\pgfmathresult;

%Normal and directional vectors for PQ
\coordinate (N) at ($\L*(\qy-\py,\px-\qx)$);
\coordinate (V) at ($\L*(\qx-\px,\qy-\py)$);

%Normals in P and Q
\coordinate (NP) at ($(-\py,\px)$);
\coordinate (NQ) at ($(-\qy,\qx)$);


%Dot product and determinant
\pgfmathparse{ \px*\qx+\py*\qy}\let\PdotQ\pgfmathresult;
\pgfmathparse{-\px*\qy+\py*\qx}\let\PdetQ\pgfmathresult;

%Parameters on tangent
%\pgfmathparse{(1-cos(\dTheta))/sin(\dTheta)}\let\RF\pgfmathresult;
\pgfmathparse{tan(0.5*\dTheta)}\let\RF\pgfmathresult;

%Two ways to calc Focus
%FP and FQ should coincide
\coordinate (FP) at ($(P)-\RF*(NP)$);
\coordinate (FQ) at ($(Q)+\RF*(NQ)$);

\pgfmathparse{-0.2}\let\ttangent\pgfmathresult;
