\usepackage{amsmath, amssymb}
\usepackage{geometry}
\usepackage{ifthen}
\usepackage{ifxetex,ifluatex}

\usepackage{graphicx}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetkzobj{all}

\usepackage{pgfplots}
%\pgfplotsset{compat=1.10}
\pgfkeys{/pgf/declare function={arccosh(\x) = ln(\x + sqrt(\x^2-1));}}
\tikzset{->-/.style={decoration={
            markings,
            mark=at position #1 with {\arrow{>}}},postaction={decorate}}}

\tikzset{
arrowMe/.style={postaction=decorate,
      decoration={markings, mark=at position .8 with {\arrow[thick]{#1}}
      } }}
      
      \newcommand{\hypsegment}[4]{
            \tkzDefPointBy[inversion = center #3 through #4](#1)
            \tkzGetPoint{p*}
            \tkzCircumCenter(#1,#2,p*)\tkzGetPoint{c}
            \tkzDrawArc[color=black](c,#1)(#2)
      }
      
      \newcommand{\hyperpbisector}[4]{
            \tkzDefPointBy[inversion = center #3 through #4](#1)
            \tkzGetPoint{p*}
            \tkzCircumCenter(#1,#2,p*)\tkzGetPoint{c}
            \tkzTangent[at=#2](c)\tkzGetPoint{hp}
            \tkzInterLL(#2,hp)(#3,#1) \tkzGetPoint{cp}
            \tkzDefPointBy[inversion = center #3 through #4](#2)
            \tkzGetPoint{q*}
            \tkzTangent[at=#1](c)\tkzGetPoint{hq}
            \tkzInterLL(#1,hq)(#3,#2) \tkzGetPoint{cq}
            \tkzInterCC(cq,#1)(cp,#2) \tkzGetPoints{u}{v}
            \tkzClipCircle(#3,#4)
            \tkzDrawCircle[color=red,orthogonal through=u and v](#3,#4)    
      }
      
      \newcommand{\typeIIcline}[4][]{%%% the type II cline of (#2) and (#3) through (#4)
            \tkzCircumCenter(#2,#3,#4)\tkzGetPoint{o}
            \tkzDefLine[perpendicular=through #4,K=1](o,#4)\tkzGetPoint{w};
            \tkzInterLL(#4,w)(#2,#3)\tkzGetPoint{c}
            \tkzDrawCircle[#1](c,#4)
      }
      
      
      \newcommand{\arcThroughThreePoints}[4][]{%%%the arc from #2 to #4 through #3
            \tkzCircumCenter(#2,#3,#4)\tkzGetPoint{c}
            \tkzDrawArc[#1](c,#2)(#4)
      }