
%Convex parameters for drawing lines
\pgfmathparse{1} \let\p\pgfmathresult;
\pgfmathparse{-0.5} \let\t\pgfmathresult;
\pgfmathparse{1-\t} \let\tt\pgfmathresult;
\pgfmathparse{1.8} \let\size\pgfmathresult;
\pgfmathparse{2.5} \let\AB\pgfmathresult;

\pgfmathparse{180/pi} \let\radtodeg\pgfmathresult;

\pgfmathparse{pi/2-pi/8} \let\Alpha\pgfmathresult;
\pgfmathparse{pi/2+pi/5} \let\Beta\pgfmathresult;
\pgfmathparse{\size*cos(\radtodeg*\Alpha)} \let\xa\pgfmathresult;
\pgfmathparse{\size*sin(\radtodeg*\Alpha)} \let\ya\pgfmathresult;

\pgfmathparse{\size*cos(\radtodeg*\Beta)} \let\xb\pgfmathresult;
\pgfmathparse{\size*sin(\radtodeg*\Beta)} \let\yb\pgfmathresult;

%Define nodes
\coordinate (A) at (0,0);
\coordinate (B) at ($(\AB,0)$);

%Draw nodes
\filldraw  (A) circle  (\p pt) node [anchor=south west] {$A$};
\filldraw  (B) circle  (\p pt) node [anchor=south west] {$B$};

%Points on lines r_i
\coordinate (R2) at ($(A)+(\xa,\ya)$);
\coordinate (Rk) at ($(A)+(\xb,\yb)$);

%Points on lines s_i
\coordinate (S2) at ($(B)+(\xa,\ya)$);
\coordinate (Sk) at ($(B)+(\xb,\yb)$);


\draw [thick]
   ($(A)!\t!(B)$)
   node [left] {$r_1$}
   --
   ($(A)!\tt!(B)$);
   %($\t*(A)+\tt*(B)$)
   %--
   %($\tt*(A)+\t*(B)$);

\draw 
   (R2)
   node [above] {$r_2$}
   --
   ($\tt*(A)+\t*(R2)$);
\draw 
   (Rk)
   node [above] {$r_m$}
   --
   ($\tt*(A)+\t*(Rk)$);



\draw 
   (S2)
   node [above] {$s_2$}
   --
   ($\tt*(B)+\t*(S2)$);
\draw 
   (Sk)
   node [above] {$s_m$}
   --
   ($\tt*(B)+\t*(Sk)$);
