%%
%% This is file `xpicture.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xpicture.dtx  (with options: `xpicture,defaults')
%% ********************************************************************
%% The xpicture package
%% Copyright (C) 2010, 2011, 2012 by Robert Fuster <rfuster@mat.upv.es>
%% All rights reserved
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% ********************************************************************
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}


\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xpicture}[2012/12/17 v.1.2a picture environment extensions]
\newif\ifdraft\draftfalse
\DeclareOption{draft}{\drafttrue}
\DeclareOption*{%
   \PassOptionsToPackage{\CurrentOption}{curve2e}
    \PassOptionsToPackage{\CurrentOption}{xcolor}}
\ProcessOptions
\newif\ifpolar\polarfalse
\newif\ifrputstar\rputstarfalse
\newif\ifdegrees\degreesfalse
\newif\iftics\ticstrue
\newif\iflabels\labelstrue
\newif\ifgrid\gridfalse
\newif\ifticslabelsgrid\ticslabelsgridfalse
\newif\ifinzeroaxes\inzeroaxestrue
\newif\ifbg\bgfalse
\RequirePackage{curve2e}
\RequirePackage{xcolor}
\RequirePackage{calculus}
\def\xpct@Warnbadpos{%
      \PackageWarning{xpicture}%
        {Argument in \noexpand\defaultPut command must be either
        'c' or 'r'\MessageBreak
         I will no change the default position for
         \noexpand\Put commands}}
\def\xpct@Infopos#1{%
      \PackageInfo{xpicture}%
        {Default position for \noexpand\Put commands changed to #1}}
\def\xpct@WarnIncSys(#1,#2)(#3,#4){%
      \PackageWarning{xpicture}{%
           Incompatible linear system!\MessageBreak
           Tangent lines are parallel}}
\def\xpct@ErrHypCons{%
       \PackageError{xpicture}{%
        Inconsistent parameters in \noexpand\Hyperbola command}{%
        The first and second parameters in a \noexpand\Hyperbola
        command\MessageBreak
        must be, respectively, lesser than the third and
        the fourth ones.}}
\def\xpct@Infocfg{\PackageInfo{xpicture}{%
          Loading local configuration file xpicture.cfg}}
\def\xpct@Infonocfg{\PackageInfo{xpicture}{%
          Local configuration file xpicture.cfg does not exists}}
\newcounter{xpct@counta}
\newcounter{xpct@countb}
\newcounter{xpct@step}
\newcounter{multiput}
\newdimen\xpct@bxw
\newdimen\xpct@bxh
\def\xpct@maxnum{16383.99998}
\def\makenotics{\ticsfalse}
\def\maketics{\ticstrue}
\def\makenolabels{\labelsfalse}
\def\makelabels{\labelstrue}
\def\makenogrid{\gridfalse}
\def\makegrid{\gridtrue}
\def\externalaxes{\inzeroaxesfalse}
\def\internalaxes{\inzeroaxestrue}
\newdimen\axesthickness
\def\xpct@axeslabelattrib{\axeslabelsize%
       \pictcolor{\axeslabelcolor}%
       \mathversion{\axeslabelmathversion}}
\newdimen\ticsthickness
\newdimen\ticssize
\newdimen\secundaryticssize
\newdimen\gridthickness
\newdimen\secundarygridthickness
\def\pictcolor{\@killglue\color}
\def\standardreferencesystem{\referencesystem(0,0)(1,0)(0,1)}
\def\referencesystem(#1,#2)(#3,#4)(#5,#6){%
       \COPY{#1}\xpct@xorigin
       \COPY{#2}\xpct@yorigin
       \COPY{#3}\xpct@xI
       \COPY{#4}\xpct@yI
       \COPY{#5}\xpct@xII
       \COPY{#6}\xpct@yII}
\def\changereferencesystem(#1)(#2)(#3){%
       \refsysPoint(#1)(\xpct@newx,\xpct@newy)
       \refsysVector(#2)(\xpct@newux,\xpct@newuy)
       \refsysVector(#3)(\xpct@newvx,\xpct@newvy)
       \referencesystem(\xpct@newx,\xpct@newy)(\xpct@newux,\xpct@newuy)%
       (\xpct@newvx,\xpct@newvy)}
\def\translateorigin(#1){\changereferencesystem(#1)(1,0)(0,1)}
\def\rotateaxes#1{%
       \ifdegrees\DEGREESCOS{#1}\xpct@cosine\DEGREESSIN{#1}\xpct@sine
       \else\COS{#1}\xpct@cosine\SIN{#1}\xpct@sine\fi
       \changereferencesystem%
          (0,0)(\xpct@cosine,\xpct@sine)(-\xpct@sine,\xpct@cosine)}
\def\symmetrize#1{%
       \MULTIPLY{2}{#1}{\xpct@sym}
       \ifdegrees
          \DEGREESCOS{\xpct@sym}\xpct@cosine\DEGREESSIN{\xpct@sym}\xpct@sine
       \else
          \COS{\xpct@sym}\xpct@cosine\SIN{\xpct@sym}\xpct@sine\fi
       \changereferencesystem%
          (0,0)(\xpct@cosine,\xpct@sine)(\xpct@sine,-\xpct@cosine)}
\def\refsysxyVector(#1)(#2,#3){%
       \MATRIXVECTORPRODUCT%
          (\xpct@xI,\xpct@xII;\xpct@yI,\xpct@yII)(#1)(#2,#3)}
\def\refsysxyPoint(#1)(#2,#3){%
       \MATRIXVECTORPRODUCT(\xpct@xI,\xpct@xII;\xpct@yI,\xpct@yII)(#1)(#2,#3)
       \VECTORADD(#2,#3)(\xpct@xorigin,\xpct@yorigin)(#2,#3)}
\def\refsyspVector(#1,#2)(#3,#4){%
      \polarcoor(#1,#2)(\xpct@polarx,\xpct@polary)
      \refsysxyVector(\xpct@polarx,\xpct@polary)(#3,#4)}
\def\refsyspPoint(#1,#2)(#3,#4){%
      \polarcoor(#1,#2)(\xpct@polarx,\xpct@polary)
      \refsysxyPoint(\xpct@polarx,\xpct@polary)(#3,#4)}
\def\cartesianreference{%
       \def\refsysVector{\refsysxyVector}%
       \def\refsysPoint{\refsysxyPoint}\polarfalse}
\def\polarreference{%
       \def\refsysVector{\refsyspVector}%
       \def\refsysPoint{\refsyspPoint}\polartrue}
\def\polarcoor(#1,#2)(#3,#4){%
       \ifdegrees\DEGREESCOS{#2}{\xpct@Px}\DEGREESSIN{#2}{\xpct@Py}
       \else\COS{#2}{\xpct@Px}\SIN{#2}{\xpct@Py}\fi
       \MULTIPLY{\xpct@Px}{#1}{#3}
       \MULTIPLY{\xpct@Py}{#1}{#4}}
\def\degreesangles{\degreestrue}
\def\radiansangles{\degreesfalse}
\def\Picture{\@ifnextchar[{\xpct@@Picture}{\xpct@Picture}}
\def\xpct@Picture(#1,#2)(#3,#4){%
       \refsysxyPoint(#1,#2)(\xpct@xzero,\xpct@yzero)
       \refsysxyPoint(#3,#4)(\xpct@xone,\xpct@yone)
       \refsysxyPoint(#1,#4)(\xpct@xtwo,\xpct@ytwo)
       \refsysxyPoint(#3,#2)(\xpct@xthree,\xpct@ythree)
       \MIN{\xpct@xzero}{\xpct@xone}{\xpct@xmin}
       \MIN{\xpct@xmin}{\xpct@xtwo}{\xpct@xmin}
       \MIN{\xpct@xmin}{\xpct@xthree}{\xpct@xmin}
       \MIN{\xpct@yzero}{\xpct@yone}{\xpct@ymin}
       \MIN{\xpct@ymin}{\xpct@ytwo}{\xpct@ymin}
       \MIN{\xpct@ymin}{\xpct@ythree}{\xpct@ymin}
       \MAX{\xpct@xzero}{\xpct@xone}{\xpct@xmax}
       \MAX{\xpct@xmax}{\xpct@xtwo}{\xpct@xmax}
       \MAX{\xpct@xmax}{\xpct@xthree}{\xpct@xmax}
       \MAX{\xpct@yzero}{\xpct@yone}{\xpct@ymax}
       \MAX{\xpct@ymax}{\xpct@ytwo}{\xpct@ymax}
       \MAX{\xpct@ymax}{\xpct@ythree}{\xpct@ymax}
       \SUBTRACT{\xpct@xmax}{\xpct@xmin}{\xpct@pictwidth}
       \SUBTRACT{\xpct@ymax}{\xpct@ymin}{\xpct@pictheight}
          \begin{picture}(\xpct@pictwidth,\xpct@pictheight)(%
             \xpct@xmin,\xpct@ymin)
          \highestlabel{\normalfont\normalsize$1$}
          \ifdraft
            \colorlet{backgroundcolor}{lightgray}
            \xpct@backgrd
            \put(\xpct@xmin,\xpct@ymin){\line(1,0){\xpct@pictwidth}}
            \put(\xpct@xmin,\xpct@ymin){\line(0,1){\xpct@pictheight}}
            \put(\xpct@xmin,\xpct@ymax){\line(1,0){\xpct@pictwidth}}
            \put(\xpct@xmax,\xpct@ymin){\line(0,1){\xpct@pictheight}}
            \VECTORADD(\xpct@xmax,\xpct@ymax)(\xpct@xmin,\xpct@ymin)(%
            \xpct@xmed,\xpct@ymed)
            \SCALARVECTORPRODUCT{0.5}(\xpct@xmed,\xpct@ymed)(%
            \xpct@xmed,\xpct@ymed)
            \put(\xpct@xmed,\xpct@ymed){\makebox(0,0){\scshape xpicture}}
         \else
            \ifbg\xpct@backgrd\fi
         \fi}
\def\xpct@@Picture[#1](#2,#3)(#4,#5){%
         \colorlet{backgroundcolor}{#1}%
         \bgtrue\xpct@Picture(#2,#3)(#4,#5)}
\def\xpct@backgrd{\begingroup
                \pictcolor{backgroundcolor}
                \moveto(\xpct@xzero,\xpct@yzero)
                \lineto(\xpct@xthree,\xpct@ythree)
                \lineto(\xpct@xone,\xpct@yone)
                \lineto(\xpct@xtwo,\xpct@ytwo)
                \closepath\fillpath
            \endgroup}
\def\endPicture{\end{picture}}
\newenvironment{xpicture}{\begin{Picture}}{\end{Picture}}
\def\cPut#1(#2,#3)#4{%
       \COPY{0}{\xpct@CorRput}
       \xpct@PUT{#1}(#2,#3){#4}}
\def\rPut{\@ifstar
             \xpct@rPutstar%
             \xpct@rPut%
             }
\def\Put{\@ifstar
            \xpct@Putstar%
            \xpct@Put%
        }
\def\defaultPut#1{\def\xpct@tempa{#1}\def\xpct@tempb{r}
       \ifx\xpct@tempa\xpct@tempb
          \xpct@Infopos#1
          \def\xpct@defaultPut{\rPut}
       \else
          \xpct@Infopos#1
          \def\xpct@tempc{c}
          \ifx\xpct@tempa\xpct@tempc
             \def\xpct@defaultPut{\cPut}
          \else
             \xpct@Warnbadpos
       \fi\fi}
\def\highestlabel#1{\settoheight{\xpct@bxh}{#1}%
       \LENGTHDIVIDE{\xpct@bxh}{\unitlength}{\xpct@rputmxhg}}
\def\xpct@rPutstar{\rputstartrue\COPY{1}{\xpct@CorRput}\xpct@PUT}
\def\xpct@rPut{\rputstarfalse\COPY{1}{\xpct@CorRput}\xpct@PUT}
\def\xpct@Putstar{\@ifnextchar[{\xpct@@Putstar}{\xpct@@Put}}
\def\xpct@Put{\@ifnextchar[{\xpct@@@Put}{\xpct@@Put}}
\def\xpct@@Put(#1){\refsysPoint(#1)(\xpct@abscoorx,\xpct@abscoory)
       \put(\xpct@abscoorx,\xpct@abscoory)}
\def\xpct@@Putstar[#1](#2)#3{\xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR}
       \if\xpct@CorR c
          \cPut{#1}(#2){#3}
       \else
          \rPut*{#1}(#2){#3}
       \fi}
\def\xpct@@@Put[#1](#2)#3{\xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR}
       \if\xpct@CorR c
          \cPut{#1}(#2){#3}
       \else
          \if\xpct@CorR r
             \rPut{#1}(#2){#3}
          \else
             \xpct@defaultPut{#1}(#2){#3}
       \fi\fi}
\def\xpct@PUT#1(#2,#3)#4{%
       \xpct@alphaput{#1}{\xpct@CorRput}
       \refsysxyVector(\xpct@xPictsep,\xpct@yPictsep)(\xpct@Posx,\xpct@Posy)
       \refsysPoint(#2,#3)(\xpct@posx,\xpct@posy)
       \xpct@alphamove{#4}{\xpct@CorRput}
       \VECTORADD(\xpct@posx,\xpct@posy)(\xpct@Posx,\xpct@Posy)(%
          \xpct@Posx,\xpct@Posy)
       \put(\xpct@Posx,\xpct@Posy){#4}}
\def\xpct@alphaput#1#2{\def\xpct@tempa{#1}\def\xpct@tempb{c}%
       \ifx\xpct@tempa\xpct@tempb
          \COPY{0}{\xpct@xPictsep}\COPY{0}{\xpct@yPictsep}
       \else
          \xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR}
          \ifnum #2=0
             \DEGREESCOS{\xpct@putpos}{\xpct@cosine}
             \DEGREESSIN{\xpct@putpos}{\xpct@sine}
          \else
             \qCOS{\xpct@putpos}{\xpct@cosine}
             \qSIN{\xpct@putpos}{\xpct@sine}
          \fi
          \MULTIPLY{\Pictlabelsep}{\xpct@cosine}{\xpct@xPictsep}
          \MULTIPLY{\Pictlabelsep}{\xpct@sine}{\xpct@yPictsep}
       \fi}
\def\xpct@alphamove#1#2{%
       \xpct@halfbox{#1}{\xpct@amplada}{\xpct@altura}
       \ifx\xpct@tempa\xpct@tempb
       \else
          \ifnum #2=0
             \UNITVECTOR(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir)
          \else
             \qUNITVECTOR(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir)
             \ifrputstar
                \ifdim\xpct@ydir\p@=-1\p@
                   \DIVIDE{\xpct@rputmxhg}{2}{\xpct@altura}
                \fi
             \fi
             \fi
             \MULTIPLY{\xpct@ydir}{\xpct@altura}{\xpct@ydir}
             \MULTIPLY{\xpct@xdir}{\xpct@amplada}{\xpct@xdir}
             \VECTORADD(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir)%
                       (\xpct@Posx,\xpct@Posy)
       \fi
       \VECTORSUB(\xpct@Posx,\xpct@Posy)(\xpct@amplada,\xpct@altura)(%
          \xpct@Posx,\xpct@Posy)}
\def\xpct@convtoang#1#2#3{%
     \def\xpct@tempc{#1}
     \def\xpct@tempd{r}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{r}\else
     \def\xpct@tempd{tr}\ifx\xpct@tempc\xpct@tempd\COPY{45}{#2}\def#3{r}\else
     \def\xpct@tempd{t}\ifx\xpct@tempc\xpct@tempd\COPY{90}{#2}\def#3{r}\else
     \def\xpct@tempd{tl}\ifx\xpct@tempc\xpct@tempd\COPY{135}{#2}\def#3{r}\else
     \def\xpct@tempd{l}\ifx\xpct@tempc\xpct@tempd\COPY{180}{#2}\def#3{r}
     \else
     \def\xpct@tempd{bl}\ifx\xpct@tempc\xpct@tempd\COPY{-135}{#2}
     \def#3{r}\else
     \def\xpct@tempd{b}\ifx\xpct@tempc\xpct@tempd\COPY{-90}{#2}
     \def#3{r}\else
     \def\xpct@tempd{br}\ifx\xpct@tempc\xpct@tempd\COPY{-45}{#2}
     \def#3{r}\else
     \def\xpct@tempd{rtr}\ifx\xpct@tempc\xpct@tempd\COPY{22.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{ttr}\ifx\xpct@tempc\xpct@tempd\COPY{67.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{ttl}\ifx\xpct@tempc\xpct@tempd\COPY{112.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{ltl}\ifx\xpct@tempc\xpct@tempd\COPY{157.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{lbl}\ifx\xpct@tempc\xpct@tempd\COPY{-157.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{bbl}\ifx\xpct@tempc\xpct@tempd\COPY{-112.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{bbr}\ifx\xpct@tempc\xpct@tempd\COPY{-67.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{rbr}\ifx\xpct@tempc\xpct@tempd\COPY{-22.5}{#2}
     \def#3{r}\else
     \def\xpct@tempd{E}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{c}\else
     \def\xpct@tempd{NE}\ifx\xpct@tempc\xpct@tempd\COPY{45}{#2}\def#3{c}\else
     \def\xpct@tempd{N}\ifx\xpct@tempc\xpct@tempd\COPY{90}{#2}\def#3{c}\else
     \def\xpct@tempd{NW}\ifx\xpct@tempc\xpct@tempd\COPY{135}{#2}\def#3{c}\else
     \def\xpct@tempd{W}\ifx\xpct@tempc\xpct@tempd\COPY{180}{#2}\def#3{c}\else
     \def\xpct@tempd{SW}\ifx\xpct@tempc\xpct@tempd\COPY{-135}{#2}
     \def#3{c}\else
     \def\xpct@tempd{S}\ifx\xpct@tempc\xpct@tempd\COPY{-90}{#2}\def#3{c}\else
     \def\xpct@tempd{SE}\ifx\xpct@tempc\xpct@tempd\COPY{-45}{#2}\def#3{c}\else
     \def\xpct@tempd{ENE}\ifx\xpct@tempc\xpct@tempd\COPY{22.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{NNE}\ifx\xpct@tempc\xpct@tempd\COPY{67.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{NNW}\ifx\xpct@tempc\xpct@tempd\COPY{112.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{WNW}\ifx\xpct@tempc\xpct@tempd\COPY{157.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{WSW}\ifx\xpct@tempc\xpct@tempd\COPY{-157.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{SSW}\ifx\xpct@tempc\xpct@tempd\COPY{-112.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{SSE}\ifx\xpct@tempc\xpct@tempd\COPY{-67.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{ESE}\ifx\xpct@tempc\xpct@tempd\COPY{-22.5}{#2}
     \def#3{c}\else
     \def\xpct@tempd{c}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{c}\else
     \COPY{#1}{#2}\def#3{a}
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
}
\def\xpct@halfbox#1#2#3{%
        \settowidth\xpct@bxw{#1}%
        \settoheight\xpct@bxh{#1}%
        \LENGTHDIVIDE{\xpct@bxw}{\unitlength}{#2}
        \LENGTHDIVIDE{\xpct@bxh}{\unitlength}{#3}
        \MULTIPLY{0.5}{#2}{#2}
        \MULTIPLY{0.5}{#3}{#3}}
\def\qCOS#1#2{%
    \ifdim #1\p@<-135\p@
         \ADD{360}{#1}{\xpct@angles}\qCOS{\xpct@angles}{#2}
    \else
       \ifdim #1\p@>225\p@ \SUBTRACT{#1}{360}{\xpct@angles}
                           \qCOS{\xpct@angles}{#2}
       \else
          \ifdim #1\p@<-45\p@ \DEGREESCOT{#1}{#2}\MULTIPLY{-1}{#2}{#2}
          \else
             \ifdim #1\p@<45\p@ \COPY{1}{#2}
             \else
                \ifdim #1\p@<135\p@ \DEGREESCOT{#1}{#2}
                \else
                   \COPY{-1}{#2}
                \fi
             \fi
          \fi
       \fi
    \fi
}
\def\qSIN#1#2{%
    \ifdim #1\p@<-135\p@
         \ADD{360}{#1}{\xpct@angles}\qSIN{\xpct@angles}{#2}
    \else
       \ifdim #1\p@>225\p@ \SUBTRACT{#1}{360}{\xpct@angles}
                           \qSIN{\xpct@angles}{#2}
       \else
          \ifdim #1\p@<-45\p@ \COPY{-1}{#2}
          \else
             \ifdim #1\p@<45\p@ \DEGREESTAN{#1}{#2}
             \else
                \ifdim #1\p@<135\p@ \COPY{1}{#2}
                \else
                   \DEGREESTAN{#1}{#2}\MULTIPLY{-1}{#2}{#2}
                \fi
             \fi
          \fi
       \fi
    \fi
}
\def\qUNITVECTOR(#1,#2)(#3,#4){%
          \VECTORCOPY(#1,#2)(#3,#4)
          \ABSVALUE{#4}{\xpct@Ydir}
          \ifdim \xpct@Ydir\p@ < 0.00005\p@
          \COPY{\xpct@maxnum}{\xpct@tan}
          \else
             \DIVIDE{#3}{#4}{\xpct@tan}
          \fi
          \ifdim #3\p@ > 0\p@
             \ifdim #4\p@ > 0\p@
                \ifdim #3\p@ > #4\p@
                   \COPY{1}{#3}\DIVIDE{#4}{\xpct@tan}{#4}
                \else
                   \COPY{1}{#4}\COPY{\xpct@tan}{#3}
                \fi
                \else
                   \ifdim #3\p@ > -#4\p@
                      \COPY{1}{#3}\DIVIDE{-#4}{\xpct@tan}{#4}
                   \else
                      \COPY{-1}{#4}\MULTIPLY{-1}{\xpct@tan}{#3}
                   \fi
                \fi
             \else
                \ifdim #4\p@ > 0\p@
                   \ifdim -#3\p@ > #4\p@
                      \COPY{-1}{#3}\DIVIDE{-#4}{\xpct@tan}{#4}
                   \else
                      \COPY{1}{#4}\COPY{\xpct@tan}{#3}
                   \fi
                \else
                   \ifdim #3\p@ > #4\p@
                      \COPY{-1}{#4}\COPY{-\xpct@tan}{#3}
                   \else
                      \COPY{-1}{#3}\DIVIDE{#4}{\xpct@tan}{#4}
                   \fi
                \fi
             \fi
}
\def\multicPut#1{\def\xpct@mPut{\cPut{#1}}\xpct@@mPut}
\def\multirPut{\@ifstar
       \xpct@multirPutstar%
       \xpct@multirPut%
       }
\def\multiPut{\@ifstar
       \xpct@multiPutstar%
       \xpct@multiPut%
       }
\def\xpct@multirPutstar#1{\def\xpct@mPut{\rPut*{#1}}\xpct@@mPut}
\def\xpct@multirPut#1{\def\xpct@mPut{\rPut{#1}}\xpct@@mPut}
\def\xpct@multiPut{\@ifnextchar[{\xpct@@@multiPut}{\xpct@@multiPut}}
\def\xpct@multiPutstar{\@ifnextchar[{\xpct@@@multiPutstar}{\xpct@@multiPutstar}}
\def\xpct@@multiPut{\def\xpct@mPut{\Put}\xpct@@mPut}
\def\xpct@@multiPutstar{\def\xpct@mPut{\Put*}\xpct@@mPut}
\def\xpct@@@multiPut[#1]{\def\xpct@mPut{\Put[#1]}\xpct@@mPut}
\def\xpct@@@multiPutstar[#1]{\def\xpct@mPut{\Put*[#1]}\xpct@@mPut}
\def\xpct@@mPut(#1,#2)(#3,#4)#5#6{%
       \COPY{#1}\xpct@@abscoorx\COPY{#2}\xpct@@abscoory
       \setcounter{multiput}{0}%
       \@whilenum\value{multiput}<#5 \do
          {\xpct@mPut(\xpct@@abscoorx,\xpct@@abscoory){#6}
           \ADD{#3}\xpct@@abscoorx\xpct@@abscoorx
           \ADD{#4}\xpct@@abscoory\xpct@@abscoory
           \stepcounter{multiput}}}
\def\multicPlot#1#2(#3){\cPut{#1}(#3){#2}\@ifnextchar({\multicPlot{#1}{#2}}{}}
\def\multirPlot{\@ifstar
       \xpct@multirPlotstar%
       \xpct@multirPlot%
       }
\def\multiPlot{\@ifstar
             \xpct@multiPlotstar%
             \xpct@multiPlot%
             }
\def\xpct@multirPlotstar#1#2(#3){\rPut*{#1}(#3){#2}
       \@ifnextchar({\xpct@multirPlotstar{#1}{#2}}{}}
\def\xpct@multirPlot#1#2(#3){\rPut{#1}(#3){#2}
       \@ifnextchar({\xpct@multirPlot{#1}{#2}}{}}
\def\xpct@multiPlotstar{%
   \@ifnextchar[{\xpct@@@multiPlotstar}{\xpct@@multiPlotstar}}
\def\xpct@multiPlot{\@ifnextchar[{\xpct@@@multiPlot}{\xpct@@multiPlot}}
\def\xpct@@multiPlot#1(#2){\Put(#2){#1}\@ifnextchar({\xpct@@multiPlot{#1}}{}}
\def\xpct@@@multiPlot[#1]#2(#3){\Put[#1](#3){#2}
       \@ifnextchar({\xpct@@@multiPlot[#1]{#2}}{}}
\def\xpct@@multiPlotstar#1(#2){\Put*(#2){#1}
       \@ifnextchar({\xpct@@multiPlotstar{#1}}{}}
\def\xpct@@@multiPlotstar[#1]#2(#3){\Put*[#1](#3){#2}
       \@ifnextchar({\xpct@@@multiPlotstar[#1]{#2}}{}}
\def\xLINE(#1)(#2){%
         \refsysPoint(#1)(\xpct@xzero,\xpct@yzero)
         \refsysPoint(#2)(\xpct@xone,\xpct@yone)
         \xpct@strline(\xpct@xzero,\xpct@yzero)(\xpct@xone,\xpct@yone)}
\let\strline\xLINE
\def\xpct@strline{\@killglue\@ifundefined{segment}{\LINE}{\segment}}
\def\xVECTOR(#1)(#2){%
       \refsysPoint(#1)(\xpct@xzero,\xpct@yzero)
       \refsysPoint(#2)(\xpct@xone,\xpct@yone)
       \VECTOR(\xpct@xzero,\xpct@yzero)(\xpct@xone,\xpct@yone)}
\def\xtrivVECTOR(#1)(#2){%
       \refsysPoint(#1)(\xpct@xzeropoint,\xpct@yzeropoint)
       \refsysPoint(#2)(\xpct@xonepoint,\xpct@yonepoint)
       \xpct@xtrivVECTOR(\xpct@xzeropoint,\xpct@yzeropoint)(%
                         \xpct@xonepoint,\xpct@yonepoint)}
\def\arrowsize#1#2{\COPY{#1}{\xpct@xarrowlen}
                   \COPY{#2}{\xpct@yarrowlen}}
\def\xpct@xtrivVECTOR(#1)(#2){%
         \xpct@strline(#1)(#2)
         \VECTORSUB(#2)(#1)(\xpct@xarrow,\xpct@yarrow)
         \VECTORNORM(\xpct@xarrow,\xpct@yarrow){\xpct@xarrowunit}
         \DIVIDE{\xpct@xarrow}{\xpct@xarrowunit}{\xpct@xarrow}
         \DIVIDE{\xpct@yarrow}{\xpct@xarrowunit}{\xpct@yarrow}
         \xpct@arrow(#2){\xpct@xarrow}{\xpct@yarrow}}
\def\xpct@arrow(#1)#2#3{\begingroup%
             \referencesystem(#1)(#2,#3)(-#3,#2)
             \Put(0,0){\setlength{\unitlength}{1pt}%
                \begin{Picture}(0,0)(0,0)\cartesianreference
                         \xLINE(-\xpct@xarrowlen,\xpct@yarrowlen)(0,0)
                         \xLINE(0,0)(-\xpct@xarrowlen,-\xpct@yarrowlen)
                \end{Picture}}\endgroup}
\def\zerovector(#1){%
   \UNITVECTOR(#1)(\xpct@dirx,\xpct@diry)
   \SCALARVECTORPRODUCT{0.01}(\xpct@dirx,\xpct@diry)(\xpct@dirx,\xpct@diry)
    \xVECTOR(0,0)(\xpct@dirx,\xpct@diry)}
\def\zerotrivvector(#1){%
   \UNITVECTOR(#1)(\xpct@dirx,\xpct@diry)
   \SCALARVECTORPRODUCT{0.01}(\xpct@dirx,\xpct@diry)(\xpct@dirx,\xpct@diry)
    \xtrivVECTOR(0,0)(\xpct@dirx,\xpct@diry)}
\def\xline(#1,#2)#3{%
       \xpct@xline(#1,#2){#3}
   \xLINE(0,0)(\xpct@@xdir,\xpct@@ydir)}

\def\xvector(#1,#2)#3{%
   \ifdim #3 pt = 0 pt \zerovector(#1,#2)
   \else
       \xpct@xline(#1,#2){#3}
   \xVECTOR(0,0)(\xpct@@xdir,\xpct@@ydir)
   \fi}

\def\xtrivvector(#1,#2)#3{%
   \ifdim #3 pt = 0 pt \zerotrivvector(#1,#2)
   \else
       \xpct@xline(#1,#2){#3}
   \xtrivVECTOR(0,0)(\xpct@@xdir,\xpct@@ydir)
   \fi}
\def\xpct@xline(#1,#2)#3{%
         \ABSVALUE{#1}{\xpct@modx}
         \ifdim \xpct@modx pt < 0.0001 pt
              \COPY{0}{\xpct@@xdir}
              \ifdim #2\p@>\z@ \COPY{#3}{\xpct@@ydir}
              \else \MULTIPLY{-1}{#3}{\xpct@@ydir}
              \fi
         \else
              \DIVIDE{#1}{\xpct@modx}{\xpct@@xdir}
              \DIVIDE{#2}{\xpct@modx}{\xpct@@ydir}
              \SCALARVECTORPRODUCT{#3}(\xpct@@xdir,\xpct@@ydir)(%
                                       \xpct@@xdir,\xpct@@ydir)
        \fi}
\def\Polyline(#1)(#2){%
         \xLINE(#1)(#2)\@ifnextchar({\Polyline(#2)}{}}
\def\Polygon(#1,#2)(#3){%
       \COPY{#1}{\xpct@firstx}\COPY{#2}{\xpct@firsty}
                  \xpct@Polygon(#1,#2)(#3)}
\def\xpct@Polygon(#1)(#2){%
       \xLINE(#1)(#2)\@ifnextchar({\xpct@Polygon(#2)}{%
       \xLINE(#2)(\xpct@firstx,\xpct@firsty)}}
\def\regularPolygon{%
       \@ifnextchar[{\xpct@regPolygon}{\xpct@@regPolygon}}
\def\xpct@@regPolygon#1#2{\xpct@regPolygon[0]{#1}{#2}}
\def\xpct@regPolygon[#1]#2#3{\begingroup%
       \polarreference\degreesangles
       \setcounter{xpct@counta}{0}%
       \setcounter{xpct@countb}{#3}%
       \DIVIDE{360}{#3}{\xpct@angles}
       \COPY{#1}{\xpct@anglea}
       \@whilenum\value{xpct@counta}<\value{xpct@countb} \do {%
          \ADD{\xpct@anglea}{\xpct@angles}{\xpct@angleb}
          \xLINE(#2,\xpct@anglea)(#2,\xpct@angleb)
          \COPY{\xpct@angleb}{\xpct@anglea}\stepcounter{xpct@counta}}
       \endgroup}
\def\xpct@ctrlpoint(#1,#2)(#3,#4)(#5,#6)(#7,#8){%
       \DETERMINANT(#3,#4;#7,#8)\xpct@detA
       \DETERMINANT(#1,#2;#3,#4)\xpct@detB
       \DETERMINANT(#5,#6;#7,#8)\xpct@detC
       \DETERMINANT(#3,#7;\xpct@detB,\xpct@detC)\xpct@detD
       \DETERMINANT(#4,#8;\xpct@detB,\xpct@detC)\xpct@detE
       \ABSVALUE{\xpct@detA}{\xpct@@detA}
       \ABSVALUE{\xpct@detD}{\xpct@@detD}
       \ABSVALUE{\xpct@detE}{\xpct@@detE}
       \ifdim \xpct@@detA pt<0.00005 pt
          \ifdim \xpct@@detD pt<0.00005 pt %\xpct@detD pt=0 pt
             \ifdim \xpct@@detE pt<0.00005 pt %\xpct@detE pt=0 pt
                \ADD{#1}{#5}{\xpct@solx}\DIVIDE{\xpct@solx}{2}{\xpct@solx}
                \ADD{#2}{#6}{\xpct@soly}\DIVIDE{\xpct@soly}{2}{\xpct@soly}
             \fi\else
             \xpct@WarnIncSys(#1,#2)(#5,#6)
             \let\xpct@solx\undefined\let\xpct@soly\undefined
          \fi
       \else
          \DIVIDE{\xpct@detD}{\xpct@detA}{\xpct@solx}
          \DIVIDE{\xpct@detE}{\xpct@detA}{\xpct@soly}
       \fi}
\def\qCurve(#1){\@ifnextchar({\xpct@@qCurve(#1)}{\xpct@@@qCurve(#1)}}
\def\xpct@@qCurve(#1)(#2)(#3)(#4){%
       \refsysPoint(#1)(\xpct@@xzero,\xpct@@yzero)
       \refsysPoint(#3)(\xpct@@xone,\xpct@@yone)
       \refsysVector(#2)(\xpct@@dxzero,\xpct@@dyzero)
       \refsysVector(#4)(\xpct@@dxone,\xpct@@dyone)
       \xpct@qCurve(\xpct@@xzero,\xpct@@yzero)(\xpct@@dxzero,\xpct@@dyzero)(%
                    \xpct@@xone,\xpct@@yone)%
          (\xpct@@dxone,\xpct@@dyone)}
\def\xpct@@@qCurve(#1)#2(#3)#4{%
             \ifpolar
                 \qCurve(#1)(1,#2)(#3)(1,#4)
             \else
             \DEGREESCOS{#2}{\xpct@angxz}
             \DEGREESSIN{#2}{\xpct@angyz}
             \DEGREESCOS{#4}{\xpct@angxo}
             \DEGREESSIN{#4}{\xpct@angyo}
             \qCurve(#1)(\xpct@angxz,\xpct@angyz)(#3)%
                (\xpct@angxo,\xpct@angyo)\fi}
\def\xpct@qCurve(#1)(#2)(#3)(#4){%
       \xpct@ctrlpoint(#1)(#2)(#3)(#4)
       \ifx\xpct@solx\undefined
       \else
          \qbezier(#1)(\xpct@solx,\xpct@soly)(#3)\fi\ignorespaces}
\def\PlotQuadraticCurve(#1){%
       \@ifnextchar({\xpct@PlotQuadraticCurve(#1)}{%
                     \xpct@@PlotQuadraticCurve(#1)}}
\def\xpct@PlotQuadraticCurve(#1)(#2)(#3)(#4){%
       \qCurve(#1)(#2)(#3)(#4)
       \@ifnextchar({\PlotQuadraticCurve(#3)(#4)}{}}
\def\xpct@@PlotQuadraticCurve(#1)#2(#3)#4{%
       \qCurve(#1){#2}(#3){#4}
       \@ifnextchar({\PlotQuadraticCurve(#3){#4}}{}}
\newvectorfunction{\xpct@circulararc}{%
    \ifdegrees
       \DEGREESCOS{\t}{\x}
       \DEGREESSIN{\t}{\y}
       \COPY{\x}{\Dy}
       \MULTIPLY{-1}{\y}{\Dx}
    \else
       \COS{\t}{\x}
       \SIN{\t}{\y}
       \COPY{\x}{\Dy}
       \MULTIPLY{-1}{\y}{\Dx}
    \fi}
\newvectorfunction{\xpct@hyperbolicarc}{%
       \DIVIDE{1}{\t}{\xpct@invt}
       \ADD{\t}{\xpct@invt}{\x}
       \SUBTRACT{\t}{\xpct@invt}{\y}
       \MULTIPLY{0.5}{\x}{\x}
       \MULTIPLY{0.5}{\y}{\y}
       \COPY{\x}{\Dy}
       \COPY{\y}{\Dx}}
\newvectorfunction{\xpct@parabolicarc}{%
        \COPY{\t}{\y}
        \COPY{1}{\Dy}
        \SQUARE{\t}{\x}
        \MULTIPLY{2}{\t}{\Dx}}
\def\circularArc#1#2#3{\ellipticArc{#1}{#1}{#2}{#3}}
\let\xArc\circularArc
\def\ellipticArc#1#2#3#4{%
    \begingroup
      \cartesianreference
       \changereferencesystem(0,0)(#1,0)(0,#2)
       \PlotParametricFunction[\defaultplotdivs]{\xpct@circulararc}{#3}{#4}
    \endgroup\ignorespaces}
\def\Circle#1{\begingroup\radiansangles
                     \circularArc{#1}{0}{\numberTWOPI}\endgroup\ignorespaces}
\def\Ellipse#1#2{\begingroup\radiansangles
                         \ellipticArc{#1}{#2}{0}{\numberTWOPI}
                         \endgroup\ignorespaces}
\def\lhyperbolicArc#1#2#3#4{%
            \begingroup
               \changereferencesystem(0,0)(-1,0)(0,1)
               \rhyperbolicArc{#1}{#2}{#3}{#4}
           \endgroup}
\def\rhyperbolicArc#1#2#3#4{%
              \xpct@hypluy{#2}{#3}{\xpct@uone}
              \xpct@hypluy{#2}{#4}{\xpct@utwo}
              \xpct@hyperbolicArc{#1}{#2}{\xpct@uone}{\xpct@utwo}}
\def\xpct@hyperbolicArc#1#2#3#4{%
    \begingroup
      \cartesianreference
      \changereferencesystem(0,0)(#1,0)(0,#2)
       \PlotParametricFunction[\defaultplotdivs]{\xpct@hyperbolicarc}{#3}{#4}
    \endgroup}
\def\lHyperbola#1#2#3#4{%
          \begingroup
          \changereferencesystem(0,0)(-1,0)(0,1)
          \rHyperbola{#1}{#2}{#3}{#4}
          \endgroup}
\def\rHyperbola#1#2#3#4{%
       \def\xpct@hycons{}\xpct@hypconsist{#1}{#3}%
          \ifx\xpct@hycons\undefined
          \else
              \xpct@hyperbolalastu{#1}{#2}{#3}{#4}
              \DIVIDE{1}{\xpct@umax}{\xpct@umin}
              \xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1}
               \xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax}
          \fi}
\def\Hyperbola#1#2#3#4{%
       \begingroup
       \def\xpct@hycons{}\xpct@hypconsist{#1}{#3}%
          \ifx\xpct@hycons\undefined
          \else
              \xpct@hyperbolalastu{#1}{#2}{#3}{#4}
              \DIVIDE{1}{\xpct@umax}{\xpct@umin}
               \xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1}
               \xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax}
             \changereferencesystem(0,0)(-1,0)(0,1)
              \xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1}
               \xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax}
          \fi\endgroup}
\def\xpct@hypconsist#1#2{%
       \ifnum #1<#2\else\xpct@ErrHypCons
                            \let\xpct@hycons\undefined\fi}
\def\xpct@hyperbolalastu#1#2#3#4{%
      \xpct@hyplux{#1}{#3}{\xpct@umaxx}
      \xpct@hypluy{#2}{#4}{\xpct@umaxy}
       \MIN{\xpct@umaxx}{\xpct@umaxy}{\xpct@umax}}
\def \xpct@hyplux#1#2#3{%
       \DIVIDE{#2}{#1}{\xpct@xa}
       \SQUARE{\xpct@xa}{#3}
       \SUBTRACT{#3}{1}{#3}
       \SQUAREROOT{#3}{\xpct@@umaxx}
       \ADD{\xpct@xa}{\xpct@@umaxx}{#3}}
\def \xpct@hypluy#1#2#3{%
       \DIVIDE{#2}{#1}{\xpct@xa}
       \SQUARE{\xpct@xa}{#3}
       \ADD{#3}{1}{#3}
       \SQUAREROOT{#3}{\xpct@@umaxx}
       \ADD{\xpct@xa}{\xpct@@umaxx}{#3}}
\def\parabolicArc#1#2#3{%
    \begingroup
       \changereferencesystem(0,0)(#1,0)(0,1)
       \PlotParametricFunction[\defaultplotdivs]{\xpct@parabolicarc}{#2}{#3}
    \endgroup}
\def\Parabola#1#2#3{%
              \xpct@parabolalasty{#1}{#2}{#3}
              \parabolicArc{#1}{-\xpct@maxy}{0}
              \parabolicArc{#1}{0}{\xpct@maxy}}
\def\xpct@parabolalasty#1#2#3{%
       \ABSVALUE{#1}{\xpct@@maxy}
       \DIVIDE{#2}{\xpct@@maxy}{\xpct@@maxy}
       \SQUAREROOT{\xpct@@maxy}{\xpct@maxy}
       \MIN{\xpct@maxy}{#3}{\xpct@maxy}}
\def\PlotFunction{%
       \@ifnextchar[{\xpct@iterateplotfunction}{\xpct@plotfunction}}
\def\xpct@iterateplotfunction[#1]#2#3#4{%
\setcounter{xpct@step}{0}%
\COPY{#3}{\xpct@oldt}
\SUBTRACT{#4}{#3}{\xpct@step}
\DIVIDE{\xpct@step}{#1}{\xpct@step}
\@whilenum \value{xpct@step}<#1 \do
   {\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt}
   \xpct@plotfunction{#2}{\xpct@oldt}{\xpct@newt}
   \stepcounter{xpct@step}%
   \COPY\xpct@newt\xpct@oldt
}}
\def\xpct@plotfunction#1#2#3{\@killglue%
       #1{#2}{\yzero}{\Dyzero}%
       #1{#3}{\yone}{\Dyone}%
       \PlotxyDyData(#2,\yzero,\Dyzero)(#3,\yone,\Dyone)
       \ifx\xpct@solx\undefined
       \ADD{#2}{#3}{\xpct@middt}
       \MULTIPLY{0.5}{\xpct@middt}{\xpct@middt}
       \xpct@plotfunction{#1}{#2}{\xpct@middt}
       \xpct@plotfunction{#1}{\xpct@middt}{#3}
       \fi}
\def\PlotPointsOfFunction#1#2#3#4{%
   \setcounter{xpct@step}{0}%
\COPY{#3}{\xpct@oldt}
\SUBTRACT{#4}{#3}{\xpct@step}
\DIVIDE{\xpct@step}{#1}{\xpct@step}
\ADD{#1}{1}{\xpct@lastt}
\@whilenum \value{xpct@step}<\xpct@lastt \do
   {\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt}
   #2{\xpct@oldt}{\xpct@oldy}{\xpct@oldDy}
   \Put[c](\xpct@oldt,\xpct@oldy){\pointmark}
   \stepcounter{xpct@step}%
   \COPY\xpct@newt\xpct@oldt
}}
\def\PlotxyDyData(#1,#2,#3)(#4,#5,#6){%
       \qCurve(#1,#2)(1,#3)(#4,#5)(1,#6)
       \@ifnextchar({\PlotxyDyData(#4,#5,#6)}{}}
\def\PlotParametricFunction{%
    \@ifnextchar[{\xpct@iterateplotpfunction}{\xpct@plotpfunction}}
\def\xpct@iterateplotpfunction[#1]#2#3#4{%
\setcounter{xpct@step}{0}%
\COPY{#3}{\xpct@oldt}
\SUBTRACT{#4}{#3}{\xpct@step}
\DIVIDE{\xpct@step}{#1}{\xpct@step}
\@whilenum \value{xpct@step}<#1 \do
   {\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt}
   \xpct@plotpfunction{#2}{\xpct@oldt}{\xpct@newt}
   \stepcounter{xpct@step}%
   \COPY\xpct@newt\xpct@oldt}\ignorespaces}
\def\xpct@plotpfunction#1#2#3{%
    \begingroup
       #1{#2}\xzero\Dxzero\yzero\Dyzero
       #1{#3}\xone\Dxone\yone\Dyone
       \cartesianreference
       \qCurve(\xzero,\yzero)(\Dxzero,\Dyzero)(\xone,\yone)(\Dxone,\Dyone)
    \endgroup\ignorespaces}
\def\cartesiangrid(#1,#2)(#3,#4){%
       \begingroup\gridtrue\cartesianaxes(#1,#2)(#3,#4)\endgroup}
\def\cartesianaxes(#1,#2)(#3,#4){%
       \begingroup\cartesianreference
          \GLOBALCOPY{#1}{\xpct@XZero}\GLOBALCOPY{#2}{\xpct@YZero}
          \GLOBALCOPY{#3}{\xpct@XOne}\GLOBALCOPY{#4}{\xpct@YOne}
          \iftics
             \ticslabelsgridtrue
          \else
             \iflabels
                \ticslabelsgridtrue
             \else
                \ifgrid
                   \ticslabelsgridtrue
          \fi\fi\fi
          \ifticslabelsgrid
             \xpct@plotticslabels
          \fi
          \xpct@plotaxes\endgroup}
\def\plotxtic#1{%
          \maketics
          \xpct@adjticssize
          \xpct@adjxorytics{#1}{0}
          \xpct@printtic}
\def\plotytic#1{%
          \maketics
          \xpct@adjticssize
          \xpct@adjxorytics{#1}{1}
          \xpct@printtic}
\def\printxlabel#1#2{%
          \xpct@adjticssize
          \xpct@adjxorytics{#1}{0}
          \xpct@printlabel{0}{#2}}
\def\printylabel#1#2{%
          \xpct@adjticssize
          \xpct@adjxorytics{#1}{1}
          \xpct@printlabel{1}{#2}}
\def\printxticlabel#1#2{\plotxtic{#1}\printxlabel{#1}{#2}}
\def\printyticlabel#1#2{\plotytic{#1}\printylabel{#1}{#2}}
\def\plotxtics{\xpct@plottics{0}}
\def\plotytics{\xpct@plottics{1}}
\def\printxlabels{%
   \@ifnextchar[{\xpct@printlabels{0}}{\xpct@printlabels{0}[-1]}}
\def\printylabels{%
   \@ifnextchar[{\xpct@printlabels{1}}{\xpct@printlabels{1}[-1]}}
\def\printxticslabels{%
   \@ifnextchar[{\xpct@printxticslabels}{\xpct@printxticslabels[-1]}}
\def\printyticslabels{%
   \@ifnextchar[{\xpct@printyticslabels}{\xpct@printyticslabels[-1]}}

\def\xpct@plotaxes{\linethickness{\axesthickness}%
               \pictcolor{\axescolor}
               \ifinzeroaxes
                  \xLINE(\xpct@XZero,0)(\xpct@XOne,0)
                  \xLINE(0,\xpct@YZero)(0,\xpct@YOne)
               \else
                   \xLINE(\xpct@XZero,\xpct@YZero)(\xpct@XOne,\xpct@YZero)
                   \xLINE(\xpct@XZero,\xpct@YZero)(\xpct@XZero,\xpct@YOne)
               \fi}
\def\xpct@plotticslabels{%
       \xpct@adjticssize
       \xpct@plotxticslabels\xpct@plotyticslabels}
\def\xpct@plotxticslabels{%
       \ifgrid\xpct@plotgrid\fi
       \begingroup
          \ifnum\xunitdivisions=1
             \xpct@ticsinterval{\xpct@XZero}{\xpct@XOne}
             \xpct@plotxtics
          \else
             \begingroup
                \xpct@adjstics
                \MULTIPLY{\secundaryyticssize}{\yunitdivisions}{\yticssize}
                \makenolabels
                \def\xunitdivisions{1}
                \xpct@plotxticslabels
             \endgroup
             \def\xunitdivisions{1}
             \xpct@plotxticslabels
          \fi
       \endgroup}
\def\xpct@plotyticslabels{%
       \begingroup
          \ifnum\yunitdivisions=1
             \xpct@ticsinterval{\xpct@YZero}{\xpct@YOne}
             \xpct@plotytics
          \else
             \begingroup
                \xpct@adjstics
                \MULTIPLY{\secundaryxticssize}{\xunitdivisions}{\xticssize}
                \makenolabels
                \def\yunitdivisions{1}
                \xpct@plotyticslabels
             \endgroup
             \def\yunitdivisions{1}
             \xpct@plotyticslabels
          \fi
       \endgroup}
\def\xpct@adjstics{%
                \MULTIPLY{\xpct@XZero}{\xunitdivisions}{\xpct@XZero}
                \MULTIPLY{\xpct@YZero}{\yunitdivisions}{\xpct@YZero}
                \MULTIPLY{\xpct@XOne}{\xunitdivisions}{\xpct@XOne}
                \MULTIPLY{\xpct@YOne}{\yunitdivisions}{\xpct@YOne}
                \DIVIDE{1}{\xunitdivisions}{\xpct@xunit}
                \DIVIDE{1}{\yunitdivisions}{\xpct@yunit}
                \changereferencesystem(0,0)(\xpct@xunit,0)(0,\xpct@yunit)
                \def\gridthickness{\secundarygridthickness}
                \def\gridcolor{\secundarygridcolor}}
\def\xpct@plotxtics{\xpct@maketics{\xpct@firstint}{\xpct@numtics}{0}}
\def\xpct@plotytics{\xpct@maketics{\xpct@firstint}{\xpct@numtics}{1}}
\def\xpct@maketics#1#2#3{%
   \xpct@adjxorytics{#1}{#3}
       \setcounter{xpct@counta}{0}%
       \iflabels\setcounter{xpct@countb}{#1}\fi
       \@whilenum \value{xpct@counta}<#2 \do {%
          \iftics
           \xpct@printtic
           \fi
           \iflabels
              \highestlabel{\xpct@axeslabelattrib%
                            $\axeslabelmathalphabet{1}$}%
              \xpct@printlabel{#3}{\thexpct@countb}
              \stepcounter{xpct@countb}%
           \fi
           \stepcounter{xpct@counta}%
           \VECTORADD(\xpct@@xzero,\xpct@@yzero)(\xpct@@xincr,\xpct@@yincr)%
           (\xpct@@xzero,\xpct@@yzero)
           \VECTORADD(\xpct@@xone,\xpct@@yone)(\xpct@@xincr,\xpct@@yincr)%
           (\xpct@@xone,\xpct@@yone)
       }}
\def\xpct@adjxorytics#1#2{%
      \ifnum #2=0
                \COPY{#1}{\xpct@@xzero}
                \COPY{-\yticssize}{\xpct@@yzero}
                \COPY{#1}{\xpct@@xone}
                \COPY{\yticssize}{\xpct@@yone}
                \COPY{1}{\xpct@@xincr}
                \COPY{0}{\xpct@@yincr}
                \ifinzeroaxes\else
                   \ADD{\xpct@YZero}{\xpct@@yzero}{\xpct@@yzero}
                   \ADD{\xpct@YZero}{\xpct@@yone}{\xpct@@yone}
                \fi
           \else
                \COPY{#1}{\xpct@@yzero}
                \COPY{-\xticssize}{\xpct@@xzero}
                \COPY{#1}{\xpct@@yone}
                \COPY{\xticssize}{\xpct@@xone}
                \COPY{1}{\xpct@@yincr}
                \COPY{0}{\xpct@@xincr}
                \ifinzeroaxes\else
                   \ADD{\xpct@XZero}{\xpct@@xzero}{\xpct@@xzero}
                   \ADD{\xpct@XZero}{\xpct@@xone}{\xpct@@xone}
                \fi
       \fi}
\def\xpct@printtic{\pictcolor{\ticscolor}
             \linethickness{\ticsthickness}
             \xLINE(\xpct@@xzero,\xpct@@yzero)(\xpct@@xone,\xpct@@yone)}
\def\xpct@adjticssize{%
       \LENGTHDIVIDE{\ticssize}{\unitlength}{\xpct@ticssize}
       \LENGTHDIVIDE{\secundaryticssize}{\unitlength}{\xpct@sticssize}
       \refsysxyVector(1,0)(\xpct@a,\xpct@b)
          \VECTORNORM(\xpct@a,\xpct@b){\xpct@norm}
          \DIVIDE{\xpct@ticssize}{\xpct@norm}{\xticssize}
          \DIVIDE{\xpct@sticssize}{\xpct@norm}{\secundaryxticssize}
          \DIVIDE{\axislabelsep}{\xpct@norm}{\xpct@xaxislabelsep}
       \refsysxyVector(0,1)(\xpct@a,\xpct@b)
          \VECTORNORM(\xpct@a,\xpct@b){\xpct@norm}
          \DIVIDE{\xpct@ticssize}{\xpct@norm}{\yticssize}
          \DIVIDE{\xpct@sticssize}{\xpct@norm}{\secundaryyticssize}
          \DIVIDE{\axislabelsep}{\xpct@norm}{\xpct@yaxislabelsep}}
\def\xpct@printlabel#1#2{%
       \iftics
          \ifnum #1=0
             \ADD{\yticssize}{\xpct@yaxislabelsep}{\Pictlabelsep}
          \else
             \ADD{\xticssize}{\xpct@xaxislabelsep}{\Pictlabelsep}
          \fi
       \else
          \ifnum #1=0
             \COPY{\xpct@yaxislabelsep}{\Pictlabelsep}
          \else
             \COPY{\xpct@xaxislabelsep}{\Pictlabelsep}
          \fi
       \fi
    \ifinzeroaxes
       \ifnum\thexpct@countb=0
       \else
          \ifnum #1=0
             \rPut*{\xpct@xlblpos}(\xpct@@xzero,0){%
                \xpct@axeslabelattrib%
                \ensuremath{\axeslabelmathalphabet{#2}}}
          \else
             \rPut*{\xpct@ylblpos}(0,\xpct@@yzero){%
                \xpct@axeslabelattrib%
                \ensuremath{\axeslabelmathalphabet{#2}}}
          \fi
       \fi
    \else
       \ifnum #1=0
          \rPut*{\xpct@xlblpos}(\xpct@@xzero,\xpct@YZero){%
             \xpct@axeslabelattrib%
             \ensuremath{\axeslabelmathalphabet{#2}}}
       \else
          \rPut*{\xpct@ylblpos}(\xpct@XZero,\xpct@@yzero){%
             \xpct@axeslabelattrib%
             \ensuremath{\axeslabelmathalphabet{#2}}}
       \fi
    \fi}
\def\xlabelpos#1{\xpct@convtoang{#1}{\xpct@xlblpos}{\xpct@CorR}}
\def\ylabelpos#1{\xpct@convtoang{#1}{\xpct@ylblpos}{\xpct@CorR}}
\def\xpct@printxticslabels[#1]#2#3#4{%
       \plotxtics{#2}{#3}{#4}\printxlabels[#1]{#2}{#3}{#4}}
\def\xpct@printyticslabels[#1]#2#3#4{%
       \plotytics{#2}{#3}{#4}\printylabels[#1]{#2}{#3}{#4}}
\def\xpct@plottics#1#2#3#4{%
      \COPY{#2}{\xpct@ticcoor}
      \@whiledim\xpct@ticcoor\p@<#4\p@ \do {%
      \ifnum #1=0
         \plotxtic{\xpct@ticcoor}
      \else
         \plotytic{\xpct@ticcoor}
      \fi
      \ADD{#3}{\xpct@ticcoor}{\xpct@ticcoor}
      }
      \ifdim\xpct@ticcoor\p@>#4\p@
      \else
         \ifnum #1=0
            \plotxtic{\xpct@ticcoor}
         \else
            \plotytic{\xpct@ticcoor}
         \fi
      \fi}
\def\xpct@printlabels#1[#2]#3#4#5{%
      \COPY{#3}{\xpct@ticcoor}
      \@whiledim\xpct@ticcoor\p@<#5\p@ \do {%
         \ifnum #2=-1
            \COPY{\xpct@ticcoor}{\xpct@Ticcoor}
         \else
            \ROUND[#2]{\xpct@ticcoor}{\xpct@Ticcoor}
         \fi
         \xpct@prtlbl{#1}
         \ADD{#4}{\xpct@ticcoor}{\xpct@ticcoor}}
      \ifdim\xpct@ticcoor\p@>#5\p@
      \else
         \ifnum #2=-1
            \COPY{\xpct@ticcoor}{\xpct@Ticcoor}
         \else
            \ROUND[#2]{\xpct@ticcoor}{\xpct@Ticcoor}
         \fi
         \xpct@prtlbl{#1}
      \fi}
\def\xpct@prtlbl#1{%
        \ifinzeroaxes
        \ifdim \xpct@ticcoor\p@=\z@\else
            \xpct@adjticssize
            \xpct@adjxorytics{\xpct@ticcoor}{#1}
            \xpct@printlabel{#1}{\xpct@Ticcoor}
         \fi
         \else
            \xpct@adjticssize
            \xpct@adjxorytics{\xpct@ticcoor}{#1}
            \xpct@printlabel{#1}{\xpct@Ticcoor}\fi}
\def\xpct@plotgrid{%
       \xpct@ticsinterval{\xpct@XZero}{\xpct@XOne}
       \begingroup\setcounter{xpct@counta}{0}%
          \pictcolor{\gridcolor}\linethickness{\gridthickness}
          \COPY{\xpct@firstint}{\xpct@grid}
          \@whilenum\value{xpct@counta}<\xpct@numtics\do{
             \xLINE(\xpct@grid,\xpct@YZero)(\xpct@grid,\xpct@YOne)
             \ADD{1}{\xpct@grid}{\xpct@grid}
             \stepcounter{xpct@counta}}\endgroup
       \xpct@ticsinterval{\xpct@YZero}{\xpct@YOne}
       \begingroup\setcounter{xpct@counta}{0}%
          \pictcolor{\gridcolor}\linethickness{\gridthickness}
          \COPY{\xpct@firstint}{\xpct@grid}
          \@whilenum\value{xpct@counta}<\xpct@numtics\do{
             \xLINE(\xpct@XZero,\xpct@grid)(\xpct@XOne,\xpct@grid)
             \ADD{1}{\xpct@grid}{\xpct@grid}
             \stepcounter{xpct@counta}}\endgroup}
\def\xpct@ticsinterval#1#2{\TRUNCATE[0]{#1}{\xpct@firstint}
                       \TRUNCATE[0]{#2}{\xpct@lastint}
                       \SUBTRACT{\xpct@lastint}{\xpct@firstint}{\xpct@numtics}
                       \ADD{\xpct@numtics}{1}{\xpct@numtics}}
\def\polargrid#1#2{%
       \begingroup
       \polarreference
       \FLOOR{#1}{\xpct@rint}
       \MULTIPLY{\xpct@rint}{\runitdivisions}{\xpct@rdivs}
       \DIVIDE{1}{\runitdivisions}{\rincr}
       \COPY{0}{\xpct@radius}
       \setcounter{xpct@counta}{1}%
       \begingroup
          \pictcolor{\gridcolor}
          \linethickness{\gridthickness}
          \@whilenum \value{xpct@counta}<\xpct@rdivs\do {%
             \ADD{\rincr}{\xpct@radius}{\xpct@radius}
             \Ellipse{\xpct@radius}{\xpct@radius}
             \stepcounter{xpct@counta}}%
          \pictcolor{\axescolor}
          \linethickness{\axesthickness}
          \Ellipse{\xpct@rint}{\xpct@rint}
       \endgroup
       \COPY{0}{\xpct@angle}
       \DIVIDE{\numberTWOPI}{#2}{\xpct@angincr}
       \setcounter{xpct@counta}{0}%
       \pictcolor{\gridcolor}
       \linethickness{\gridthickness}
       \@whilenum \value{xpct@counta}<#2 \do {%
          \xLINE(0,0)(#1,\xpct@angle)
          \iflabels
             \COPY{\axislabelsep}{\Pictlabelsep}
             \MULTIPLY{2}{\thexpct@counta}{\xpct@arc}
             \xpct@polarlabel{#1}{\xpct@arc}{#2}\fi
          \ADD{\xpct@angincr}{\xpct@angle}{\xpct@angle}
          \stepcounter{xpct@counta}}%
        \pictcolor{\axescolor}
        \linethickness{\axesthickness}
        \xLINE(0,0)(#1,0)
       \iflabels
          \highestlabel{\xpct@axeslabelattrib$\axeslabelmathalphabet{1}$}
          \multiPut*[\xpct@rlblpos](1,0)(1,0){\xpct@rint}{%
             \ADD{\value{multiput}}{1}{\xpct@lbl}
             \xpct@axeslabelattrib%
             \ensuremath{\axeslabelmathalphabet{\xpct@lbl}}}%
       \fi
       \endgroup}

\def\rlabelpos#1{\xpct@convtoang{#1}{\xpct@rlblpos}{\xpct@CorR}}
\def\degreespolarlabels{\def\xpct@polarlabel{\xpct@degreeslabel}}
\def\radianspolarlabels{\def\xpct@polarlabel{\xpct@radianslabel}}
\def\xpct@degreeslabel#1#2#3{%
       \FRACTIONSIMPLIFY{#2}{#3}\xpct@num\xpct@den
       \MULTIPLY{\xpct@num}{180}{\xpct@degangle}
       \DIVIDE{\xpct@degangle}{\xpct@den}{\xpct@degangle}
       \cPut{\xpct@degangle}(#1,\xpct@angle){%
          \xpct@axeslabelattrib%
          \ensuremath{\axeslabelmathalphabet{\xpct@degangle^\mathrm{o}}}}}
\def\xpct@radianslabel#1#2#3{%
          \RADtoDEG{\xpct@angle}{\xpct@angles}
          \cPut{\xpct@angles}(#1,\xpct@angle){%
             \xpct@axeslabelattrib%
             \ensuremath{\axeslabelmathalphabet
                 {\xpct@prtfracrad{#2}{#3}}}}}
\def\xpct@prtfracrad#1#2{%
       \FRACTIONSIMPLIFY{#1}{#2}\xpct@num\xpct@den
          \ifnum \xpct@num = 0 0
          \else
             \ifnum \xpct@num = 1
                \ifnum \xpct@den = 1 \pi
                \else \pi/\xpct@den
                \fi
             \else \xpct@num\pi/\xpct@den
             \fi
          \fi}
\axesthickness=1pt
\def\axescolor{black}
\def\axeslabelcolor{\axescolor}
\def\axeslabelsize{\small}
\def\axeslabelmathversion{normal}
\def\axeslabelmathalphabet{\mathrm}
\xlabelpos{-90}
\ylabelpos{180}
\rlabelpos{bbr}
\def\axislabelsep{0.1}
\def\ticscolor{\axescolor}
\ticsthickness=1pt
\ticssize=4pt
\secundaryticssize=2pt
\gridthickness=0.4pt
\def\gridcolor{gray}
\secundarygridthickness=0.2pt
\def\secundarygridcolor{lightgray}
\def\xunitdivisions{1}
\def\yunitdivisions{1}
\def\runitdivisions{1}
\def\xpct@polarlabel{\xpct@radianslabel}
\def\Pictlabelsep{0.1}
\defaultPut{c}
\referencesystem(0,0)(1,0)(0,1)
\cartesianreference
\arrowsize{5}{2}
\def\defaultplotdivs{8}
\def\pointmarkdiam{0.1}
\def\pointmark{\circle*{\pointmarkdiam}}
\def\draftPictures{%
       \drafttrue
       \def\cPut##1(##2,##3)##4{}
       \def\xpct@@Put(##1)##2{}
       \def\xpct@@Putstar[##1](##2)##3{}
       \def\xpct@@@Put[##1](##2)##3{}
       \def\defaultPut##1{\def\xpct@defaultPut{\cPut}}
       \def\xpct@@mPut(##1,##2)(##3,##4)##5##6{}
       \def\xpct@PUT##1(##2,##3)##4{}
       \def\xLINE(##1)(##2){}
       \def\xtrivVECTOR(##1)(##2){}
       \def\xVECTOR(##1)(##2){}
       \def\zerovector(##1){}
       \def\zerotrivvector(##1){}
       \def\xline(##1,##2)##3{}
       \def\xvector(##1,##2)##3{}
       \def\xtrivvector(##1,##2)##3{}
       \def\xpct@regPolygon[##1]##2##3{}
       \def\xpct@@qCurve(##1)(##2)(##3)(##4){}
       \def\xpct@PlotQuadraticCurve(##1)(##2)(##3)(##4){%
           \@ifnextchar({\PlotQuadraticCurve(##3)(##4)}{}}
       \def\xpct@@PlotQuadraticCurve(##1)##2(##3)##4{%
           \@ifnextchar({\PlotQuadraticCurve(##3){##4}}{}}
       \def\circularArc##1##2##3{}
       \def\ellipticArc##1##2##3##4{}
       \def\Ellipse##1##2{}
       \def\Circle##1{}
       \def\xpct@hyperbolicArc##1##2##3##4{}
       \def\lHyperbola##1##2##3##4{}
       \def\rHyperbola##1##2##3##4{}
       \def\Hyperbola##1##2##3##4{}
       \def\rhyperbolicArc##1##2##3##4{}
       \def\lhyperbolicArc##1##2##3##4{}
       \def\parabolicArc##1##2##3{}
       \def\Parabola##1##2##3{}
       \def\PlotPointsOfFunction##1##2##3##4{}
       \def\xpct@iterateplotfunction[##1]##2##3##4{}
       \def\xpct@plotfunction##1##2##3{}
       \def\xpct@iterateplotpfunction[##1]##2##3##4{}
       \def\xpct@plotpfunction##1##2##3{}
       \def\cartesianaxes(##1,##2)(##3,##4){}
       \def\cartesiangrid(##1,##2)(##3,##4){}
       \def\plotxtic##1{}
       \def\plotytic##1{}
       \def\printxlabel##1##2{}
       \def\printylabel##1##2{}
       \def\printxticlabel##1##2{}
       \def\printyticlabel##1##2{}
       \def\plotxtics##1##2##3{}
       \def\plotytics##1##2##3{}
       \def\xpct@printlabels##1[##2]##3##4##5{}
       \def\polargrid##1##2{}
}
\ifdraft
   \draftPictures
\fi
\InputIfFileExists{xpicture.cfg}{\xpct@Infocfg}{\xpct@Infonocfg}
%% 
%%
%% End of file `xpicture.sty'.
