| 1 |
%% |
| 2 |
%% This is file `xpicture.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% xpicture.dtx (with options: `xpicture,defaults') |
| 8 |
%% ******************************************************************** |
| 9 |
%% The xpicture package |
| 10 |
%% Copyright (C) 2010, 2011, 2012 by Robert Fuster <[email protected]> |
| 11 |
%% All rights reserved |
| 12 |
%% |
| 13 |
%% This file may be distributed and/or modified under the |
| 14 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 15 |
%% of this license or (at your option) any later version. |
| 16 |
%% The latest version of this license is in |
| 17 |
%% |
| 18 |
%% http://www.latex-project.org/lppl.txt |
| 19 |
%% |
| 20 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 21 |
%% version 2005/12/01 or later. |
| 22 |
%% ******************************************************************** |
| 23 |
%% \CharacterTable |
| 24 |
%% {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 |
| 25 |
%% 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 |
| 26 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 27 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 28 |
%% Dollar \$ Percent \% Ampersand \& |
| 29 |
%% Acute accent \' Left paren \( Right paren \) |
| 30 |
%% Asterisk \* Plus \+ Comma \, |
| 31 |
%% Minus \- Point \. Solidus \/ |
| 32 |
%% Colon \: Semicolon \; Less than \< |
| 33 |
%% Equals \= Greater than \> Question mark \? |
| 34 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 35 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 36 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 37 |
%% Right brace \} Tilde \~} |
| 38 |
|
| 39 |
|
| 40 |
\NeedsTeXFormat{LaTeX2e} |
| 41 |
\ProvidesPackage{xpicture}[2012/12/17 v.1.2a picture environment extensions] |
| 42 |
\newif\ifdraft\draftfalse |
| 43 |
\DeclareOption{draft}{\drafttrue} |
| 44 |
\DeclareOption*{% |
| 45 |
\PassOptionsToPackage{\CurrentOption}{curve2e} |
| 46 |
\PassOptionsToPackage{\CurrentOption}{xcolor}} |
| 47 |
\ProcessOptions |
| 48 |
\newif\ifpolar\polarfalse |
| 49 |
\newif\ifrputstar\rputstarfalse |
| 50 |
\newif\ifdegrees\degreesfalse |
| 51 |
\newif\iftics\ticstrue |
| 52 |
\newif\iflabels\labelstrue |
| 53 |
\newif\ifgrid\gridfalse |
| 54 |
\newif\ifticslabelsgrid\ticslabelsgridfalse |
| 55 |
\newif\ifinzeroaxes\inzeroaxestrue |
| 56 |
\newif\ifbg\bgfalse |
| 57 |
\RequirePackage{curve2e} |
| 58 |
\RequirePackage{xcolor} |
| 59 |
\RequirePackage{calculus} |
| 60 |
\def\xpct@Warnbadpos{% |
| 61 |
\PackageWarning{xpicture}% |
| 62 |
{Argument in \noexpand\defaultPut command must be either |
| 63 |
'c' or 'r'\MessageBreak |
| 64 |
I will no change the default position for |
| 65 |
\noexpand\Put commands}} |
| 66 |
\def\xpct@Infopos#1{% |
| 67 |
\PackageInfo{xpicture}% |
| 68 |
{Default position for \noexpand\Put commands changed to #1}} |
| 69 |
\def\xpct@WarnIncSys(#1,#2)(#3,#4){% |
| 70 |
\PackageWarning{xpicture}{% |
| 71 |
Incompatible linear system!\MessageBreak |
| 72 |
Tangent lines are parallel}} |
| 73 |
\def\xpct@ErrHypCons{% |
| 74 |
\PackageError{xpicture}{% |
| 75 |
Inconsistent parameters in \noexpand\Hyperbola command}{% |
| 76 |
The first and second parameters in a \noexpand\Hyperbola |
| 77 |
command\MessageBreak |
| 78 |
must be, respectively, lesser than the third and |
| 79 |
the fourth ones.}} |
| 80 |
\def\xpct@Infocfg{\PackageInfo{xpicture}{% |
| 81 |
Loading local configuration file xpicture.cfg}} |
| 82 |
\def\xpct@Infonocfg{\PackageInfo{xpicture}{% |
| 83 |
Local configuration file xpicture.cfg does not exists}} |
| 84 |
\newcounter{xpct@counta} |
| 85 |
\newcounter{xpct@countb} |
| 86 |
\newcounter{xpct@step} |
| 87 |
\newcounter{multiput} |
| 88 |
\newdimen\xpct@bxw |
| 89 |
\newdimen\xpct@bxh |
| 90 |
\def\xpct@maxnum{16383.99998} |
| 91 |
\def\makenotics{\ticsfalse} |
| 92 |
\def\maketics{\ticstrue} |
| 93 |
\def\makenolabels{\labelsfalse} |
| 94 |
\def\makelabels{\labelstrue} |
| 95 |
\def\makenogrid{\gridfalse} |
| 96 |
\def\makegrid{\gridtrue} |
| 97 |
\def\externalaxes{\inzeroaxesfalse} |
| 98 |
\def\internalaxes{\inzeroaxestrue} |
| 99 |
\newdimen\axesthickness |
| 100 |
\def\xpct@axeslabelattrib{\axeslabelsize% |
| 101 |
\pictcolor{\axeslabelcolor}% |
| 102 |
\mathversion{\axeslabelmathversion}} |
| 103 |
\newdimen\ticsthickness |
| 104 |
\newdimen\ticssize |
| 105 |
\newdimen\secundaryticssize |
| 106 |
\newdimen\gridthickness |
| 107 |
\newdimen\secundarygridthickness |
| 108 |
\def\pictcolor{\@killglue\color} |
| 109 |
\def\standardreferencesystem{\referencesystem(0,0)(1,0)(0,1)} |
| 110 |
\def\referencesystem(#1,#2)(#3,#4)(#5,#6){% |
| 111 |
\COPY{#1}\xpct@xorigin |
| 112 |
\COPY{#2}\xpct@yorigin |
| 113 |
\COPY{#3}\xpct@xI |
| 114 |
\COPY{#4}\xpct@yI |
| 115 |
\COPY{#5}\xpct@xII |
| 116 |
\COPY{#6}\xpct@yII} |
| 117 |
\def\changereferencesystem(#1)(#2)(#3){% |
| 118 |
\refsysPoint(#1)(\xpct@newx,\xpct@newy) |
| 119 |
\refsysVector(#2)(\xpct@newux,\xpct@newuy) |
| 120 |
\refsysVector(#3)(\xpct@newvx,\xpct@newvy) |
| 121 |
\referencesystem(\xpct@newx,\xpct@newy)(\xpct@newux,\xpct@newuy)% |
| 122 |
(\xpct@newvx,\xpct@newvy)} |
| 123 |
\def\translateorigin(#1){\changereferencesystem(#1)(1,0)(0,1)} |
| 124 |
\def\rotateaxes#1{% |
| 125 |
\ifdegrees\DEGREESCOS{#1}\xpct@cosine\DEGREESSIN{#1}\xpct@sine |
| 126 |
\else\COS{#1}\xpct@cosine\SIN{#1}\xpct@sine\fi |
| 127 |
\changereferencesystem% |
| 128 |
(0,0)(\xpct@cosine,\xpct@sine)(-\xpct@sine,\xpct@cosine)} |
| 129 |
\def\symmetrize#1{% |
| 130 |
\MULTIPLY{2}{#1}{\xpct@sym} |
| 131 |
\ifdegrees |
| 132 |
\DEGREESCOS{\xpct@sym}\xpct@cosine\DEGREESSIN{\xpct@sym}\xpct@sine |
| 133 |
\else |
| 134 |
\COS{\xpct@sym}\xpct@cosine\SIN{\xpct@sym}\xpct@sine\fi |
| 135 |
\changereferencesystem% |
| 136 |
(0,0)(\xpct@cosine,\xpct@sine)(\xpct@sine,-\xpct@cosine)} |
| 137 |
\def\refsysxyVector(#1)(#2,#3){% |
| 138 |
\MATRIXVECTORPRODUCT% |
| 139 |
(\xpct@xI,\xpct@xII;\xpct@yI,\xpct@yII)(#1)(#2,#3)} |
| 140 |
\def\refsysxyPoint(#1)(#2,#3){% |
| 141 |
\MATRIXVECTORPRODUCT(\xpct@xI,\xpct@xII;\xpct@yI,\xpct@yII)(#1)(#2,#3) |
| 142 |
\VECTORADD(#2,#3)(\xpct@xorigin,\xpct@yorigin)(#2,#3)} |
| 143 |
\def\refsyspVector(#1,#2)(#3,#4){% |
| 144 |
\polarcoor(#1,#2)(\xpct@polarx,\xpct@polary) |
| 145 |
\refsysxyVector(\xpct@polarx,\xpct@polary)(#3,#4)} |
| 146 |
\def\refsyspPoint(#1,#2)(#3,#4){% |
| 147 |
\polarcoor(#1,#2)(\xpct@polarx,\xpct@polary) |
| 148 |
\refsysxyPoint(\xpct@polarx,\xpct@polary)(#3,#4)} |
| 149 |
\def\cartesianreference{% |
| 150 |
\def\refsysVector{\refsysxyVector}% |
| 151 |
\def\refsysPoint{\refsysxyPoint}\polarfalse} |
| 152 |
\def\polarreference{% |
| 153 |
\def\refsysVector{\refsyspVector}% |
| 154 |
\def\refsysPoint{\refsyspPoint}\polartrue} |
| 155 |
\def\polarcoor(#1,#2)(#3,#4){% |
| 156 |
\ifdegrees\DEGREESCOS{#2}{\xpct@Px}\DEGREESSIN{#2}{\xpct@Py} |
| 157 |
\else\COS{#2}{\xpct@Px}\SIN{#2}{\xpct@Py}\fi |
| 158 |
\MULTIPLY{\xpct@Px}{#1}{#3} |
| 159 |
\MULTIPLY{\xpct@Py}{#1}{#4}} |
| 160 |
\def\degreesangles{\degreestrue} |
| 161 |
\def\radiansangles{\degreesfalse} |
| 162 |
\def\Picture{\@ifnextchar[{\xpct@@Picture}{\xpct@Picture}} |
| 163 |
\def\xpct@Picture(#1,#2)(#3,#4){% |
| 164 |
\refsysxyPoint(#1,#2)(\xpct@xzero,\xpct@yzero) |
| 165 |
\refsysxyPoint(#3,#4)(\xpct@xone,\xpct@yone) |
| 166 |
\refsysxyPoint(#1,#4)(\xpct@xtwo,\xpct@ytwo) |
| 167 |
\refsysxyPoint(#3,#2)(\xpct@xthree,\xpct@ythree) |
| 168 |
\MIN{\xpct@xzero}{\xpct@xone}{\xpct@xmin} |
| 169 |
\MIN{\xpct@xmin}{\xpct@xtwo}{\xpct@xmin} |
| 170 |
\MIN{\xpct@xmin}{\xpct@xthree}{\xpct@xmin} |
| 171 |
\MIN{\xpct@yzero}{\xpct@yone}{\xpct@ymin} |
| 172 |
\MIN{\xpct@ymin}{\xpct@ytwo}{\xpct@ymin} |
| 173 |
\MIN{\xpct@ymin}{\xpct@ythree}{\xpct@ymin} |
| 174 |
\MAX{\xpct@xzero}{\xpct@xone}{\xpct@xmax} |
| 175 |
\MAX{\xpct@xmax}{\xpct@xtwo}{\xpct@xmax} |
| 176 |
\MAX{\xpct@xmax}{\xpct@xthree}{\xpct@xmax} |
| 177 |
\MAX{\xpct@yzero}{\xpct@yone}{\xpct@ymax} |
| 178 |
\MAX{\xpct@ymax}{\xpct@ytwo}{\xpct@ymax} |
| 179 |
\MAX{\xpct@ymax}{\xpct@ythree}{\xpct@ymax} |
| 180 |
\SUBTRACT{\xpct@xmax}{\xpct@xmin}{\xpct@pictwidth} |
| 181 |
\SUBTRACT{\xpct@ymax}{\xpct@ymin}{\xpct@pictheight} |
| 182 |
\begin{picture}(\xpct@pictwidth,\xpct@pictheight)(% |
| 183 |
\xpct@xmin,\xpct@ymin) |
| 184 |
\highestlabel{\normalfont\normalsize$1$} |
| 185 |
\ifdraft |
| 186 |
\colorlet{backgroundcolor}{lightgray} |
| 187 |
\xpct@backgrd |
| 188 |
\put(\xpct@xmin,\xpct@ymin){\line(1,0){\xpct@pictwidth}} |
| 189 |
\put(\xpct@xmin,\xpct@ymin){\line(0,1){\xpct@pictheight}} |
| 190 |
\put(\xpct@xmin,\xpct@ymax){\line(1,0){\xpct@pictwidth}} |
| 191 |
\put(\xpct@xmax,\xpct@ymin){\line(0,1){\xpct@pictheight}} |
| 192 |
\VECTORADD(\xpct@xmax,\xpct@ymax)(\xpct@xmin,\xpct@ymin)(% |
| 193 |
\xpct@xmed,\xpct@ymed) |
| 194 |
\SCALARVECTORPRODUCT{0.5}(\xpct@xmed,\xpct@ymed)(% |
| 195 |
\xpct@xmed,\xpct@ymed) |
| 196 |
\put(\xpct@xmed,\xpct@ymed){\makebox(0,0){\scshape xpicture}} |
| 197 |
\else |
| 198 |
\ifbg\xpct@backgrd\fi |
| 199 |
\fi} |
| 200 |
\def\xpct@@Picture[#1](#2,#3)(#4,#5){% |
| 201 |
\colorlet{backgroundcolor}{#1}% |
| 202 |
\bgtrue\xpct@Picture(#2,#3)(#4,#5)} |
| 203 |
\def\xpct@backgrd{\begingroup |
| 204 |
\pictcolor{backgroundcolor} |
| 205 |
\moveto(\xpct@xzero,\xpct@yzero) |
| 206 |
\lineto(\xpct@xthree,\xpct@ythree) |
| 207 |
\lineto(\xpct@xone,\xpct@yone) |
| 208 |
\lineto(\xpct@xtwo,\xpct@ytwo) |
| 209 |
\closepath\fillpath |
| 210 |
\endgroup} |
| 211 |
\def\endPicture{\end{picture}} |
| 212 |
\newenvironment{xpicture}{\begin{Picture}}{\end{Picture}} |
| 213 |
\def\cPut#1(#2,#3)#4{% |
| 214 |
\COPY{0}{\xpct@CorRput} |
| 215 |
\xpct@PUT{#1}(#2,#3){#4}} |
| 216 |
\def\rPut{\@ifstar |
| 217 |
\xpct@rPutstar% |
| 218 |
\xpct@rPut% |
| 219 |
} |
| 220 |
\def\Put{\@ifstar |
| 221 |
\xpct@Putstar% |
| 222 |
\xpct@Put% |
| 223 |
} |
| 224 |
\def\defaultPut#1{\def\xpct@tempa{#1}\def\xpct@tempb{r} |
| 225 |
\ifx\xpct@tempa\xpct@tempb |
| 226 |
\xpct@Infopos#1 |
| 227 |
\def\xpct@defaultPut{\rPut} |
| 228 |
\else |
| 229 |
\xpct@Infopos#1 |
| 230 |
\def\xpct@tempc{c} |
| 231 |
\ifx\xpct@tempa\xpct@tempc |
| 232 |
\def\xpct@defaultPut{\cPut} |
| 233 |
\else |
| 234 |
\xpct@Warnbadpos |
| 235 |
\fi\fi} |
| 236 |
\def\highestlabel#1{\settoheight{\xpct@bxh}{#1}% |
| 237 |
\LENGTHDIVIDE{\xpct@bxh}{\unitlength}{\xpct@rputmxhg}} |
| 238 |
\def\xpct@rPutstar{\rputstartrue\COPY{1}{\xpct@CorRput}\xpct@PUT} |
| 239 |
\def\xpct@rPut{\rputstarfalse\COPY{1}{\xpct@CorRput}\xpct@PUT} |
| 240 |
\def\xpct@Putstar{\@ifnextchar[{\xpct@@Putstar}{\xpct@@Put}} |
| 241 |
\def\xpct@Put{\@ifnextchar[{\xpct@@@Put}{\xpct@@Put}} |
| 242 |
\def\xpct@@Put(#1){\refsysPoint(#1)(\xpct@abscoorx,\xpct@abscoory) |
| 243 |
\put(\xpct@abscoorx,\xpct@abscoory)} |
| 244 |
\def\xpct@@Putstar[#1](#2)#3{\xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR} |
| 245 |
\if\xpct@CorR c |
| 246 |
\cPut{#1}(#2){#3} |
| 247 |
\else |
| 248 |
\rPut*{#1}(#2){#3} |
| 249 |
\fi} |
| 250 |
\def\xpct@@@Put[#1](#2)#3{\xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR} |
| 251 |
\if\xpct@CorR c |
| 252 |
\cPut{#1}(#2){#3} |
| 253 |
\else |
| 254 |
\if\xpct@CorR r |
| 255 |
\rPut{#1}(#2){#3} |
| 256 |
\else |
| 257 |
\xpct@defaultPut{#1}(#2){#3} |
| 258 |
\fi\fi} |
| 259 |
\def\xpct@PUT#1(#2,#3)#4{% |
| 260 |
\xpct@alphaput{#1}{\xpct@CorRput} |
| 261 |
\refsysxyVector(\xpct@xPictsep,\xpct@yPictsep)(\xpct@Posx,\xpct@Posy) |
| 262 |
\refsysPoint(#2,#3)(\xpct@posx,\xpct@posy) |
| 263 |
\xpct@alphamove{#4}{\xpct@CorRput} |
| 264 |
\VECTORADD(\xpct@posx,\xpct@posy)(\xpct@Posx,\xpct@Posy)(% |
| 265 |
\xpct@Posx,\xpct@Posy) |
| 266 |
\put(\xpct@Posx,\xpct@Posy){#4}} |
| 267 |
\def\xpct@alphaput#1#2{\def\xpct@tempa{#1}\def\xpct@tempb{c}% |
| 268 |
\ifx\xpct@tempa\xpct@tempb |
| 269 |
\COPY{0}{\xpct@xPictsep}\COPY{0}{\xpct@yPictsep} |
| 270 |
\else |
| 271 |
\xpct@convtoang{#1}{\xpct@putpos}{\xpct@CorR} |
| 272 |
\ifnum #2=0 |
| 273 |
\DEGREESCOS{\xpct@putpos}{\xpct@cosine} |
| 274 |
\DEGREESSIN{\xpct@putpos}{\xpct@sine} |
| 275 |
\else |
| 276 |
\qCOS{\xpct@putpos}{\xpct@cosine} |
| 277 |
\qSIN{\xpct@putpos}{\xpct@sine} |
| 278 |
\fi |
| 279 |
\MULTIPLY{\Pictlabelsep}{\xpct@cosine}{\xpct@xPictsep} |
| 280 |
\MULTIPLY{\Pictlabelsep}{\xpct@sine}{\xpct@yPictsep} |
| 281 |
\fi} |
| 282 |
\def\xpct@alphamove#1#2{% |
| 283 |
\xpct@halfbox{#1}{\xpct@amplada}{\xpct@altura} |
| 284 |
\ifx\xpct@tempa\xpct@tempb |
| 285 |
\else |
| 286 |
\ifnum #2=0 |
| 287 |
\UNITVECTOR(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir) |
| 288 |
\else |
| 289 |
\qUNITVECTOR(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir) |
| 290 |
\ifrputstar |
| 291 |
\ifdim\xpct@ydir\p@=-1\p@ |
| 292 |
\DIVIDE{\xpct@rputmxhg}{2}{\xpct@altura} |
| 293 |
\fi |
| 294 |
\fi |
| 295 |
\fi |
| 296 |
\MULTIPLY{\xpct@ydir}{\xpct@altura}{\xpct@ydir} |
| 297 |
\MULTIPLY{\xpct@xdir}{\xpct@amplada}{\xpct@xdir} |
| 298 |
\VECTORADD(\xpct@Posx,\xpct@Posy)(\xpct@xdir,\xpct@ydir)% |
| 299 |
(\xpct@Posx,\xpct@Posy) |
| 300 |
\fi |
| 301 |
\VECTORSUB(\xpct@Posx,\xpct@Posy)(\xpct@amplada,\xpct@altura)(% |
| 302 |
\xpct@Posx,\xpct@Posy)} |
| 303 |
\def\xpct@convtoang#1#2#3{% |
| 304 |
\def\xpct@tempc{#1} |
| 305 |
\def\xpct@tempd{r}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{r}\else |
| 306 |
\def\xpct@tempd{tr}\ifx\xpct@tempc\xpct@tempd\COPY{45}{#2}\def#3{r}\else |
| 307 |
\def\xpct@tempd{t}\ifx\xpct@tempc\xpct@tempd\COPY{90}{#2}\def#3{r}\else |
| 308 |
\def\xpct@tempd{tl}\ifx\xpct@tempc\xpct@tempd\COPY{135}{#2}\def#3{r}\else |
| 309 |
\def\xpct@tempd{l}\ifx\xpct@tempc\xpct@tempd\COPY{180}{#2}\def#3{r} |
| 310 |
\else |
| 311 |
\def\xpct@tempd{bl}\ifx\xpct@tempc\xpct@tempd\COPY{-135}{#2} |
| 312 |
\def#3{r}\else |
| 313 |
\def\xpct@tempd{b}\ifx\xpct@tempc\xpct@tempd\COPY{-90}{#2} |
| 314 |
\def#3{r}\else |
| 315 |
\def\xpct@tempd{br}\ifx\xpct@tempc\xpct@tempd\COPY{-45}{#2} |
| 316 |
\def#3{r}\else |
| 317 |
\def\xpct@tempd{rtr}\ifx\xpct@tempc\xpct@tempd\COPY{22.5}{#2} |
| 318 |
\def#3{r}\else |
| 319 |
\def\xpct@tempd{ttr}\ifx\xpct@tempc\xpct@tempd\COPY{67.5}{#2} |
| 320 |
\def#3{r}\else |
| 321 |
\def\xpct@tempd{ttl}\ifx\xpct@tempc\xpct@tempd\COPY{112.5}{#2} |
| 322 |
\def#3{r}\else |
| 323 |
\def\xpct@tempd{ltl}\ifx\xpct@tempc\xpct@tempd\COPY{157.5}{#2} |
| 324 |
\def#3{r}\else |
| 325 |
\def\xpct@tempd{lbl}\ifx\xpct@tempc\xpct@tempd\COPY{-157.5}{#2} |
| 326 |
\def#3{r}\else |
| 327 |
\def\xpct@tempd{bbl}\ifx\xpct@tempc\xpct@tempd\COPY{-112.5}{#2} |
| 328 |
\def#3{r}\else |
| 329 |
\def\xpct@tempd{bbr}\ifx\xpct@tempc\xpct@tempd\COPY{-67.5}{#2} |
| 330 |
\def#3{r}\else |
| 331 |
\def\xpct@tempd{rbr}\ifx\xpct@tempc\xpct@tempd\COPY{-22.5}{#2} |
| 332 |
\def#3{r}\else |
| 333 |
\def\xpct@tempd{E}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{c}\else |
| 334 |
\def\xpct@tempd{NE}\ifx\xpct@tempc\xpct@tempd\COPY{45}{#2}\def#3{c}\else |
| 335 |
\def\xpct@tempd{N}\ifx\xpct@tempc\xpct@tempd\COPY{90}{#2}\def#3{c}\else |
| 336 |
\def\xpct@tempd{NW}\ifx\xpct@tempc\xpct@tempd\COPY{135}{#2}\def#3{c}\else |
| 337 |
\def\xpct@tempd{W}\ifx\xpct@tempc\xpct@tempd\COPY{180}{#2}\def#3{c}\else |
| 338 |
\def\xpct@tempd{SW}\ifx\xpct@tempc\xpct@tempd\COPY{-135}{#2} |
| 339 |
\def#3{c}\else |
| 340 |
\def\xpct@tempd{S}\ifx\xpct@tempc\xpct@tempd\COPY{-90}{#2}\def#3{c}\else |
| 341 |
\def\xpct@tempd{SE}\ifx\xpct@tempc\xpct@tempd\COPY{-45}{#2}\def#3{c}\else |
| 342 |
\def\xpct@tempd{ENE}\ifx\xpct@tempc\xpct@tempd\COPY{22.5}{#2} |
| 343 |
\def#3{c}\else |
| 344 |
\def\xpct@tempd{NNE}\ifx\xpct@tempc\xpct@tempd\COPY{67.5}{#2} |
| 345 |
\def#3{c}\else |
| 346 |
\def\xpct@tempd{NNW}\ifx\xpct@tempc\xpct@tempd\COPY{112.5}{#2} |
| 347 |
\def#3{c}\else |
| 348 |
\def\xpct@tempd{WNW}\ifx\xpct@tempc\xpct@tempd\COPY{157.5}{#2} |
| 349 |
\def#3{c}\else |
| 350 |
\def\xpct@tempd{WSW}\ifx\xpct@tempc\xpct@tempd\COPY{-157.5}{#2} |
| 351 |
\def#3{c}\else |
| 352 |
\def\xpct@tempd{SSW}\ifx\xpct@tempc\xpct@tempd\COPY{-112.5}{#2} |
| 353 |
\def#3{c}\else |
| 354 |
\def\xpct@tempd{SSE}\ifx\xpct@tempc\xpct@tempd\COPY{-67.5}{#2} |
| 355 |
\def#3{c}\else |
| 356 |
\def\xpct@tempd{ESE}\ifx\xpct@tempc\xpct@tempd\COPY{-22.5}{#2} |
| 357 |
\def#3{c}\else |
| 358 |
\def\xpct@tempd{c}\ifx\xpct@tempc\xpct@tempd\COPY{0}{#2}\def#3{c}\else |
| 359 |
\COPY{#1}{#2}\def#3{a} |
| 360 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi |
| 361 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi |
| 362 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi |
| 363 |
} |
| 364 |
\def\xpct@halfbox#1#2#3{% |
| 365 |
\settowidth\xpct@bxw{#1}% |
| 366 |
\settoheight\xpct@bxh{#1}% |
| 367 |
\LENGTHDIVIDE{\xpct@bxw}{\unitlength}{#2} |
| 368 |
\LENGTHDIVIDE{\xpct@bxh}{\unitlength}{#3} |
| 369 |
\MULTIPLY{0.5}{#2}{#2} |
| 370 |
\MULTIPLY{0.5}{#3}{#3}} |
| 371 |
\def\qCOS#1#2{% |
| 372 |
\ifdim #1\p@<-135\p@ |
| 373 |
\ADD{360}{#1}{\xpct@angles}\qCOS{\xpct@angles}{#2} |
| 374 |
\else |
| 375 |
\ifdim #1\p@>225\p@ \SUBTRACT{#1}{360}{\xpct@angles} |
| 376 |
\qCOS{\xpct@angles}{#2} |
| 377 |
\else |
| 378 |
\ifdim #1\p@<-45\p@ \DEGREESCOT{#1}{#2}\MULTIPLY{-1}{#2}{#2} |
| 379 |
\else |
| 380 |
\ifdim #1\p@<45\p@ \COPY{1}{#2} |
| 381 |
\else |
| 382 |
\ifdim #1\p@<135\p@ \DEGREESCOT{#1}{#2} |
| 383 |
\else |
| 384 |
\COPY{-1}{#2} |
| 385 |
\fi |
| 386 |
\fi |
| 387 |
\fi |
| 388 |
\fi |
| 389 |
\fi |
| 390 |
} |
| 391 |
\def\qSIN#1#2{% |
| 392 |
\ifdim #1\p@<-135\p@ |
| 393 |
\ADD{360}{#1}{\xpct@angles}\qSIN{\xpct@angles}{#2} |
| 394 |
\else |
| 395 |
\ifdim #1\p@>225\p@ \SUBTRACT{#1}{360}{\xpct@angles} |
| 396 |
\qSIN{\xpct@angles}{#2} |
| 397 |
\else |
| 398 |
\ifdim #1\p@<-45\p@ \COPY{-1}{#2} |
| 399 |
\else |
| 400 |
\ifdim #1\p@<45\p@ \DEGREESTAN{#1}{#2} |
| 401 |
\else |
| 402 |
\ifdim #1\p@<135\p@ \COPY{1}{#2} |
| 403 |
\else |
| 404 |
\DEGREESTAN{#1}{#2}\MULTIPLY{-1}{#2}{#2} |
| 405 |
\fi |
| 406 |
\fi |
| 407 |
\fi |
| 408 |
\fi |
| 409 |
\fi |
| 410 |
} |
| 411 |
\def\qUNITVECTOR(#1,#2)(#3,#4){% |
| 412 |
\VECTORCOPY(#1,#2)(#3,#4) |
| 413 |
\ABSVALUE{#4}{\xpct@Ydir} |
| 414 |
\ifdim \xpct@Ydir\p@ < 0.00005\p@ |
| 415 |
\COPY{\xpct@maxnum}{\xpct@tan} |
| 416 |
\else |
| 417 |
\DIVIDE{#3}{#4}{\xpct@tan} |
| 418 |
\fi |
| 419 |
\ifdim #3\p@ > 0\p@ |
| 420 |
\ifdim #4\p@ > 0\p@ |
| 421 |
\ifdim #3\p@ > #4\p@ |
| 422 |
\COPY{1}{#3}\DIVIDE{#4}{\xpct@tan}{#4} |
| 423 |
\else |
| 424 |
\COPY{1}{#4}\COPY{\xpct@tan}{#3} |
| 425 |
\fi |
| 426 |
\else |
| 427 |
\ifdim #3\p@ > -#4\p@ |
| 428 |
\COPY{1}{#3}\DIVIDE{-#4}{\xpct@tan}{#4} |
| 429 |
\else |
| 430 |
\COPY{-1}{#4}\MULTIPLY{-1}{\xpct@tan}{#3} |
| 431 |
\fi |
| 432 |
\fi |
| 433 |
\else |
| 434 |
\ifdim #4\p@ > 0\p@ |
| 435 |
\ifdim -#3\p@ > #4\p@ |
| 436 |
\COPY{-1}{#3}\DIVIDE{-#4}{\xpct@tan}{#4} |
| 437 |
\else |
| 438 |
\COPY{1}{#4}\COPY{\xpct@tan}{#3} |
| 439 |
\fi |
| 440 |
\else |
| 441 |
\ifdim #3\p@ > #4\p@ |
| 442 |
\COPY{-1}{#4}\COPY{-\xpct@tan}{#3} |
| 443 |
\else |
| 444 |
\COPY{-1}{#3}\DIVIDE{#4}{\xpct@tan}{#4} |
| 445 |
\fi |
| 446 |
\fi |
| 447 |
\fi |
| 448 |
} |
| 449 |
\def\multicPut#1{\def\xpct@mPut{\cPut{#1}}\xpct@@mPut} |
| 450 |
\def\multirPut{\@ifstar |
| 451 |
\xpct@multirPutstar% |
| 452 |
\xpct@multirPut% |
| 453 |
} |
| 454 |
\def\multiPut{\@ifstar |
| 455 |
\xpct@multiPutstar% |
| 456 |
\xpct@multiPut% |
| 457 |
} |
| 458 |
\def\xpct@multirPutstar#1{\def\xpct@mPut{\rPut*{#1}}\xpct@@mPut} |
| 459 |
\def\xpct@multirPut#1{\def\xpct@mPut{\rPut{#1}}\xpct@@mPut} |
| 460 |
\def\xpct@multiPut{\@ifnextchar[{\xpct@@@multiPut}{\xpct@@multiPut}} |
| 461 |
\def\xpct@multiPutstar{\@ifnextchar[{\xpct@@@multiPutstar}{\xpct@@multiPutstar}} |
| 462 |
\def\xpct@@multiPut{\def\xpct@mPut{\Put}\xpct@@mPut} |
| 463 |
\def\xpct@@multiPutstar{\def\xpct@mPut{\Put*}\xpct@@mPut} |
| 464 |
\def\xpct@@@multiPut[#1]{\def\xpct@mPut{\Put[#1]}\xpct@@mPut} |
| 465 |
\def\xpct@@@multiPutstar[#1]{\def\xpct@mPut{\Put*[#1]}\xpct@@mPut} |
| 466 |
\def\xpct@@mPut(#1,#2)(#3,#4)#5#6{% |
| 467 |
\COPY{#1}\xpct@@abscoorx\COPY{#2}\xpct@@abscoory |
| 468 |
\setcounter{multiput}{0}% |
| 469 |
\@whilenum\value{multiput}<#5 \do |
| 470 |
{\xpct@mPut(\xpct@@abscoorx,\xpct@@abscoory){#6} |
| 471 |
\ADD{#3}\xpct@@abscoorx\xpct@@abscoorx |
| 472 |
\ADD{#4}\xpct@@abscoory\xpct@@abscoory |
| 473 |
\stepcounter{multiput}}} |
| 474 |
\def\multicPlot#1#2(#3){\cPut{#1}(#3){#2}\@ifnextchar({\multicPlot{#1}{#2}}{}} |
| 475 |
\def\multirPlot{\@ifstar |
| 476 |
\xpct@multirPlotstar% |
| 477 |
\xpct@multirPlot% |
| 478 |
} |
| 479 |
\def\multiPlot{\@ifstar |
| 480 |
\xpct@multiPlotstar% |
| 481 |
\xpct@multiPlot% |
| 482 |
} |
| 483 |
\def\xpct@multirPlotstar#1#2(#3){\rPut*{#1}(#3){#2} |
| 484 |
\@ifnextchar({\xpct@multirPlotstar{#1}{#2}}{}} |
| 485 |
\def\xpct@multirPlot#1#2(#3){\rPut{#1}(#3){#2} |
| 486 |
\@ifnextchar({\xpct@multirPlot{#1}{#2}}{}} |
| 487 |
\def\xpct@multiPlotstar{% |
| 488 |
\@ifnextchar[{\xpct@@@multiPlotstar}{\xpct@@multiPlotstar}} |
| 489 |
\def\xpct@multiPlot{\@ifnextchar[{\xpct@@@multiPlot}{\xpct@@multiPlot}} |
| 490 |
\def\xpct@@multiPlot#1(#2){\Put(#2){#1}\@ifnextchar({\xpct@@multiPlot{#1}}{}} |
| 491 |
\def\xpct@@@multiPlot[#1]#2(#3){\Put[#1](#3){#2} |
| 492 |
\@ifnextchar({\xpct@@@multiPlot[#1]{#2}}{}} |
| 493 |
\def\xpct@@multiPlotstar#1(#2){\Put*(#2){#1} |
| 494 |
\@ifnextchar({\xpct@@multiPlotstar{#1}}{}} |
| 495 |
\def\xpct@@@multiPlotstar[#1]#2(#3){\Put*[#1](#3){#2} |
| 496 |
\@ifnextchar({\xpct@@@multiPlotstar[#1]{#2}}{}} |
| 497 |
\def\xLINE(#1)(#2){% |
| 498 |
\refsysPoint(#1)(\xpct@xzero,\xpct@yzero) |
| 499 |
\refsysPoint(#2)(\xpct@xone,\xpct@yone) |
| 500 |
\xpct@strline(\xpct@xzero,\xpct@yzero)(\xpct@xone,\xpct@yone)} |
| 501 |
\let\strline\xLINE |
| 502 |
\def\xpct@strline{\@killglue\@ifundefined{segment}{\LINE}{\segment}} |
| 503 |
\def\xVECTOR(#1)(#2){% |
| 504 |
\refsysPoint(#1)(\xpct@xzero,\xpct@yzero) |
| 505 |
\refsysPoint(#2)(\xpct@xone,\xpct@yone) |
| 506 |
\VECTOR(\xpct@xzero,\xpct@yzero)(\xpct@xone,\xpct@yone)} |
| 507 |
\def\xtrivVECTOR(#1)(#2){% |
| 508 |
\refsysPoint(#1)(\xpct@xzeropoint,\xpct@yzeropoint) |
| 509 |
\refsysPoint(#2)(\xpct@xonepoint,\xpct@yonepoint) |
| 510 |
\xpct@xtrivVECTOR(\xpct@xzeropoint,\xpct@yzeropoint)(% |
| 511 |
\xpct@xonepoint,\xpct@yonepoint)} |
| 512 |
\def\arrowsize#1#2{\COPY{#1}{\xpct@xarrowlen} |
| 513 |
\COPY{#2}{\xpct@yarrowlen}} |
| 514 |
\def\xpct@xtrivVECTOR(#1)(#2){% |
| 515 |
\xpct@strline(#1)(#2) |
| 516 |
\VECTORSUB(#2)(#1)(\xpct@xarrow,\xpct@yarrow) |
| 517 |
\VECTORNORM(\xpct@xarrow,\xpct@yarrow){\xpct@xarrowunit} |
| 518 |
\DIVIDE{\xpct@xarrow}{\xpct@xarrowunit}{\xpct@xarrow} |
| 519 |
\DIVIDE{\xpct@yarrow}{\xpct@xarrowunit}{\xpct@yarrow} |
| 520 |
\xpct@arrow(#2){\xpct@xarrow}{\xpct@yarrow}} |
| 521 |
\def\xpct@arrow(#1)#2#3{\begingroup% |
| 522 |
\referencesystem(#1)(#2,#3)(-#3,#2) |
| 523 |
\Put(0,0){\setlength{\unitlength}{1pt}% |
| 524 |
\begin{Picture}(0,0)(0,0)\cartesianreference |
| 525 |
\xLINE(-\xpct@xarrowlen,\xpct@yarrowlen)(0,0) |
| 526 |
\xLINE(0,0)(-\xpct@xarrowlen,-\xpct@yarrowlen) |
| 527 |
\end{Picture}}\endgroup} |
| 528 |
\def\zerovector(#1){% |
| 529 |
\UNITVECTOR(#1)(\xpct@dirx,\xpct@diry) |
| 530 |
\SCALARVECTORPRODUCT{0.01}(\xpct@dirx,\xpct@diry)(\xpct@dirx,\xpct@diry) |
| 531 |
\xVECTOR(0,0)(\xpct@dirx,\xpct@diry)} |
| 532 |
\def\zerotrivvector(#1){% |
| 533 |
\UNITVECTOR(#1)(\xpct@dirx,\xpct@diry) |
| 534 |
\SCALARVECTORPRODUCT{0.01}(\xpct@dirx,\xpct@diry)(\xpct@dirx,\xpct@diry) |
| 535 |
\xtrivVECTOR(0,0)(\xpct@dirx,\xpct@diry)} |
| 536 |
\def\xline(#1,#2)#3{% |
| 537 |
\xpct@xline(#1,#2){#3} |
| 538 |
\xLINE(0,0)(\xpct@@xdir,\xpct@@ydir)} |
| 539 |
|
| 540 |
\def\xvector(#1,#2)#3{% |
| 541 |
\ifdim #3 pt = 0 pt \zerovector(#1,#2) |
| 542 |
\else |
| 543 |
\xpct@xline(#1,#2){#3} |
| 544 |
\xVECTOR(0,0)(\xpct@@xdir,\xpct@@ydir) |
| 545 |
\fi} |
| 546 |
|
| 547 |
\def\xtrivvector(#1,#2)#3{% |
| 548 |
\ifdim #3 pt = 0 pt \zerotrivvector(#1,#2) |
| 549 |
\else |
| 550 |
\xpct@xline(#1,#2){#3} |
| 551 |
\xtrivVECTOR(0,0)(\xpct@@xdir,\xpct@@ydir) |
| 552 |
\fi} |
| 553 |
\def\xpct@xline(#1,#2)#3{% |
| 554 |
\ABSVALUE{#1}{\xpct@modx} |
| 555 |
\ifdim \xpct@modx pt < 0.0001 pt |
| 556 |
\COPY{0}{\xpct@@xdir} |
| 557 |
\ifdim #2\p@>\z@ \COPY{#3}{\xpct@@ydir} |
| 558 |
\else \MULTIPLY{-1}{#3}{\xpct@@ydir} |
| 559 |
\fi |
| 560 |
\else |
| 561 |
\DIVIDE{#1}{\xpct@modx}{\xpct@@xdir} |
| 562 |
\DIVIDE{#2}{\xpct@modx}{\xpct@@ydir} |
| 563 |
\SCALARVECTORPRODUCT{#3}(\xpct@@xdir,\xpct@@ydir)(% |
| 564 |
\xpct@@xdir,\xpct@@ydir) |
| 565 |
\fi} |
| 566 |
\def\Polyline(#1)(#2){% |
| 567 |
\xLINE(#1)(#2)\@ifnextchar({\Polyline(#2)}{}} |
| 568 |
\def\Polygon(#1,#2)(#3){% |
| 569 |
\COPY{#1}{\xpct@firstx}\COPY{#2}{\xpct@firsty} |
| 570 |
\xpct@Polygon(#1,#2)(#3)} |
| 571 |
\def\xpct@Polygon(#1)(#2){% |
| 572 |
\xLINE(#1)(#2)\@ifnextchar({\xpct@Polygon(#2)}{% |
| 573 |
\xLINE(#2)(\xpct@firstx,\xpct@firsty)}} |
| 574 |
\def\regularPolygon{% |
| 575 |
\@ifnextchar[{\xpct@regPolygon}{\xpct@@regPolygon}} |
| 576 |
\def\xpct@@regPolygon#1#2{\xpct@regPolygon[0]{#1}{#2}} |
| 577 |
\def\xpct@regPolygon[#1]#2#3{\begingroup% |
| 578 |
\polarreference\degreesangles |
| 579 |
\setcounter{xpct@counta}{0}% |
| 580 |
\setcounter{xpct@countb}{#3}% |
| 581 |
\DIVIDE{360}{#3}{\xpct@angles} |
| 582 |
\COPY{#1}{\xpct@anglea} |
| 583 |
\@whilenum\value{xpct@counta}<\value{xpct@countb} \do {% |
| 584 |
\ADD{\xpct@anglea}{\xpct@angles}{\xpct@angleb} |
| 585 |
\xLINE(#2,\xpct@anglea)(#2,\xpct@angleb) |
| 586 |
\COPY{\xpct@angleb}{\xpct@anglea}\stepcounter{xpct@counta}} |
| 587 |
\endgroup} |
| 588 |
\def\xpct@ctrlpoint(#1,#2)(#3,#4)(#5,#6)(#7,#8){% |
| 589 |
\DETERMINANT(#3,#4;#7,#8)\xpct@detA |
| 590 |
\DETERMINANT(#1,#2;#3,#4)\xpct@detB |
| 591 |
\DETERMINANT(#5,#6;#7,#8)\xpct@detC |
| 592 |
\DETERMINANT(#3,#7;\xpct@detB,\xpct@detC)\xpct@detD |
| 593 |
\DETERMINANT(#4,#8;\xpct@detB,\xpct@detC)\xpct@detE |
| 594 |
\ABSVALUE{\xpct@detA}{\xpct@@detA} |
| 595 |
\ABSVALUE{\xpct@detD}{\xpct@@detD} |
| 596 |
\ABSVALUE{\xpct@detE}{\xpct@@detE} |
| 597 |
\ifdim \xpct@@detA pt<0.00005 pt |
| 598 |
\ifdim \xpct@@detD pt<0.00005 pt %\xpct@detD pt=0 pt |
| 599 |
\ifdim \xpct@@detE pt<0.00005 pt %\xpct@detE pt=0 pt |
| 600 |
\ADD{#1}{#5}{\xpct@solx}\DIVIDE{\xpct@solx}{2}{\xpct@solx} |
| 601 |
\ADD{#2}{#6}{\xpct@soly}\DIVIDE{\xpct@soly}{2}{\xpct@soly} |
| 602 |
\fi\else |
| 603 |
\xpct@WarnIncSys(#1,#2)(#5,#6) |
| 604 |
\let\xpct@solx\undefined\let\xpct@soly\undefined |
| 605 |
\fi |
| 606 |
\else |
| 607 |
\DIVIDE{\xpct@detD}{\xpct@detA}{\xpct@solx} |
| 608 |
\DIVIDE{\xpct@detE}{\xpct@detA}{\xpct@soly} |
| 609 |
\fi} |
| 610 |
\def\qCurve(#1){\@ifnextchar({\xpct@@qCurve(#1)}{\xpct@@@qCurve(#1)}} |
| 611 |
\def\xpct@@qCurve(#1)(#2)(#3)(#4){% |
| 612 |
\refsysPoint(#1)(\xpct@@xzero,\xpct@@yzero) |
| 613 |
\refsysPoint(#3)(\xpct@@xone,\xpct@@yone) |
| 614 |
\refsysVector(#2)(\xpct@@dxzero,\xpct@@dyzero) |
| 615 |
\refsysVector(#4)(\xpct@@dxone,\xpct@@dyone) |
| 616 |
\xpct@qCurve(\xpct@@xzero,\xpct@@yzero)(\xpct@@dxzero,\xpct@@dyzero)(% |
| 617 |
\xpct@@xone,\xpct@@yone)% |
| 618 |
(\xpct@@dxone,\xpct@@dyone)} |
| 619 |
\def\xpct@@@qCurve(#1)#2(#3)#4{% |
| 620 |
\ifpolar |
| 621 |
\qCurve(#1)(1,#2)(#3)(1,#4) |
| 622 |
\else |
| 623 |
\DEGREESCOS{#2}{\xpct@angxz} |
| 624 |
\DEGREESSIN{#2}{\xpct@angyz} |
| 625 |
\DEGREESCOS{#4}{\xpct@angxo} |
| 626 |
\DEGREESSIN{#4}{\xpct@angyo} |
| 627 |
\qCurve(#1)(\xpct@angxz,\xpct@angyz)(#3)% |
| 628 |
(\xpct@angxo,\xpct@angyo)\fi} |
| 629 |
\def\xpct@qCurve(#1)(#2)(#3)(#4){% |
| 630 |
\xpct@ctrlpoint(#1)(#2)(#3)(#4) |
| 631 |
\ifx\xpct@solx\undefined |
| 632 |
\else |
| 633 |
\qbezier(#1)(\xpct@solx,\xpct@soly)(#3)\fi\ignorespaces} |
| 634 |
\def\PlotQuadraticCurve(#1){% |
| 635 |
\@ifnextchar({\xpct@PlotQuadraticCurve(#1)}{% |
| 636 |
\xpct@@PlotQuadraticCurve(#1)}} |
| 637 |
\def\xpct@PlotQuadraticCurve(#1)(#2)(#3)(#4){% |
| 638 |
\qCurve(#1)(#2)(#3)(#4) |
| 639 |
\@ifnextchar({\PlotQuadraticCurve(#3)(#4)}{}} |
| 640 |
\def\xpct@@PlotQuadraticCurve(#1)#2(#3)#4{% |
| 641 |
\qCurve(#1){#2}(#3){#4} |
| 642 |
\@ifnextchar({\PlotQuadraticCurve(#3){#4}}{}} |
| 643 |
\newvectorfunction{\xpct@circulararc}{% |
| 644 |
\ifdegrees |
| 645 |
\DEGREESCOS{\t}{\x} |
| 646 |
\DEGREESSIN{\t}{\y} |
| 647 |
\COPY{\x}{\Dy} |
| 648 |
\MULTIPLY{-1}{\y}{\Dx} |
| 649 |
\else |
| 650 |
\COS{\t}{\x} |
| 651 |
\SIN{\t}{\y} |
| 652 |
\COPY{\x}{\Dy} |
| 653 |
\MULTIPLY{-1}{\y}{\Dx} |
| 654 |
\fi} |
| 655 |
\newvectorfunction{\xpct@hyperbolicarc}{% |
| 656 |
\DIVIDE{1}{\t}{\xpct@invt} |
| 657 |
\ADD{\t}{\xpct@invt}{\x} |
| 658 |
\SUBTRACT{\t}{\xpct@invt}{\y} |
| 659 |
\MULTIPLY{0.5}{\x}{\x} |
| 660 |
\MULTIPLY{0.5}{\y}{\y} |
| 661 |
\COPY{\x}{\Dy} |
| 662 |
\COPY{\y}{\Dx}} |
| 663 |
\newvectorfunction{\xpct@parabolicarc}{% |
| 664 |
\COPY{\t}{\y} |
| 665 |
\COPY{1}{\Dy} |
| 666 |
\SQUARE{\t}{\x} |
| 667 |
\MULTIPLY{2}{\t}{\Dx}} |
| 668 |
\def\circularArc#1#2#3{\ellipticArc{#1}{#1}{#2}{#3}} |
| 669 |
\let\xArc\circularArc |
| 670 |
\def\ellipticArc#1#2#3#4{% |
| 671 |
\begingroup |
| 672 |
\cartesianreference |
| 673 |
\changereferencesystem(0,0)(#1,0)(0,#2) |
| 674 |
\PlotParametricFunction[\defaultplotdivs]{\xpct@circulararc}{#3}{#4} |
| 675 |
\endgroup\ignorespaces} |
| 676 |
\def\Circle#1{\begingroup\radiansangles |
| 677 |
\circularArc{#1}{0}{\numberTWOPI}\endgroup\ignorespaces} |
| 678 |
\def\Ellipse#1#2{\begingroup\radiansangles |
| 679 |
\ellipticArc{#1}{#2}{0}{\numberTWOPI} |
| 680 |
\endgroup\ignorespaces} |
| 681 |
\def\lhyperbolicArc#1#2#3#4{% |
| 682 |
\begingroup |
| 683 |
\changereferencesystem(0,0)(-1,0)(0,1) |
| 684 |
\rhyperbolicArc{#1}{#2}{#3}{#4} |
| 685 |
\endgroup} |
| 686 |
\def\rhyperbolicArc#1#2#3#4{% |
| 687 |
\xpct@hypluy{#2}{#3}{\xpct@uone} |
| 688 |
\xpct@hypluy{#2}{#4}{\xpct@utwo} |
| 689 |
\xpct@hyperbolicArc{#1}{#2}{\xpct@uone}{\xpct@utwo}} |
| 690 |
\def\xpct@hyperbolicArc#1#2#3#4{% |
| 691 |
\begingroup |
| 692 |
\cartesianreference |
| 693 |
\changereferencesystem(0,0)(#1,0)(0,#2) |
| 694 |
\PlotParametricFunction[\defaultplotdivs]{\xpct@hyperbolicarc}{#3}{#4} |
| 695 |
\endgroup} |
| 696 |
\def\lHyperbola#1#2#3#4{% |
| 697 |
\begingroup |
| 698 |
\changereferencesystem(0,0)(-1,0)(0,1) |
| 699 |
\rHyperbola{#1}{#2}{#3}{#4} |
| 700 |
\endgroup} |
| 701 |
\def\rHyperbola#1#2#3#4{% |
| 702 |
\def\xpct@hycons{}\xpct@hypconsist{#1}{#3}% |
| 703 |
\ifx\xpct@hycons\undefined |
| 704 |
\else |
| 705 |
\xpct@hyperbolalastu{#1}{#2}{#3}{#4} |
| 706 |
\DIVIDE{1}{\xpct@umax}{\xpct@umin} |
| 707 |
\xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1} |
| 708 |
\xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax} |
| 709 |
\fi} |
| 710 |
\def\Hyperbola#1#2#3#4{% |
| 711 |
\begingroup |
| 712 |
\def\xpct@hycons{}\xpct@hypconsist{#1}{#3}% |
| 713 |
\ifx\xpct@hycons\undefined |
| 714 |
\else |
| 715 |
\xpct@hyperbolalastu{#1}{#2}{#3}{#4} |
| 716 |
\DIVIDE{1}{\xpct@umax}{\xpct@umin} |
| 717 |
\xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1} |
| 718 |
\xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax} |
| 719 |
\changereferencesystem(0,0)(-1,0)(0,1) |
| 720 |
\xpct@hyperbolicArc{#1}{#2}{\xpct@umin}{1} |
| 721 |
\xpct@hyperbolicArc{#1}{#2}{1}{\xpct@umax} |
| 722 |
\fi\endgroup} |
| 723 |
\def\xpct@hypconsist#1#2{% |
| 724 |
\ifnum #1<#2\else\xpct@ErrHypCons |
| 725 |
\let\xpct@hycons\undefined\fi} |
| 726 |
\def\xpct@hyperbolalastu#1#2#3#4{% |
| 727 |
\xpct@hyplux{#1}{#3}{\xpct@umaxx} |
| 728 |
\xpct@hypluy{#2}{#4}{\xpct@umaxy} |
| 729 |
\MIN{\xpct@umaxx}{\xpct@umaxy}{\xpct@umax}} |
| 730 |
\def \xpct@hyplux#1#2#3{% |
| 731 |
\DIVIDE{#2}{#1}{\xpct@xa} |
| 732 |
\SQUARE{\xpct@xa}{#3} |
| 733 |
\SUBTRACT{#3}{1}{#3} |
| 734 |
\SQUAREROOT{#3}{\xpct@@umaxx} |
| 735 |
\ADD{\xpct@xa}{\xpct@@umaxx}{#3}} |
| 736 |
\def \xpct@hypluy#1#2#3{% |
| 737 |
\DIVIDE{#2}{#1}{\xpct@xa} |
| 738 |
\SQUARE{\xpct@xa}{#3} |
| 739 |
\ADD{#3}{1}{#3} |
| 740 |
\SQUAREROOT{#3}{\xpct@@umaxx} |
| 741 |
\ADD{\xpct@xa}{\xpct@@umaxx}{#3}} |
| 742 |
\def\parabolicArc#1#2#3{% |
| 743 |
\begingroup |
| 744 |
\changereferencesystem(0,0)(#1,0)(0,1) |
| 745 |
\PlotParametricFunction[\defaultplotdivs]{\xpct@parabolicarc}{#2}{#3} |
| 746 |
\endgroup} |
| 747 |
\def\Parabola#1#2#3{% |
| 748 |
\xpct@parabolalasty{#1}{#2}{#3} |
| 749 |
\parabolicArc{#1}{-\xpct@maxy}{0} |
| 750 |
\parabolicArc{#1}{0}{\xpct@maxy}} |
| 751 |
\def\xpct@parabolalasty#1#2#3{% |
| 752 |
\ABSVALUE{#1}{\xpct@@maxy} |
| 753 |
\DIVIDE{#2}{\xpct@@maxy}{\xpct@@maxy} |
| 754 |
\SQUAREROOT{\xpct@@maxy}{\xpct@maxy} |
| 755 |
\MIN{\xpct@maxy}{#3}{\xpct@maxy}} |
| 756 |
\def\PlotFunction{% |
| 757 |
\@ifnextchar[{\xpct@iterateplotfunction}{\xpct@plotfunction}} |
| 758 |
\def\xpct@iterateplotfunction[#1]#2#3#4{% |
| 759 |
\setcounter{xpct@step}{0}% |
| 760 |
\COPY{#3}{\xpct@oldt} |
| 761 |
\SUBTRACT{#4}{#3}{\xpct@step} |
| 762 |
\DIVIDE{\xpct@step}{#1}{\xpct@step} |
| 763 |
\@whilenum \value{xpct@step}<#1 \do |
| 764 |
{\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt} |
| 765 |
\xpct@plotfunction{#2}{\xpct@oldt}{\xpct@newt} |
| 766 |
\stepcounter{xpct@step}% |
| 767 |
\COPY\xpct@newt\xpct@oldt |
| 768 |
}} |
| 769 |
\def\xpct@plotfunction#1#2#3{\@killglue% |
| 770 |
#1{#2}{\yzero}{\Dyzero}% |
| 771 |
#1{#3}{\yone}{\Dyone}% |
| 772 |
\PlotxyDyData(#2,\yzero,\Dyzero)(#3,\yone,\Dyone) |
| 773 |
\ifx\xpct@solx\undefined |
| 774 |
\ADD{#2}{#3}{\xpct@middt} |
| 775 |
\MULTIPLY{0.5}{\xpct@middt}{\xpct@middt} |
| 776 |
\xpct@plotfunction{#1}{#2}{\xpct@middt} |
| 777 |
\xpct@plotfunction{#1}{\xpct@middt}{#3} |
| 778 |
\fi} |
| 779 |
\def\PlotPointsOfFunction#1#2#3#4{% |
| 780 |
\setcounter{xpct@step}{0}% |
| 781 |
\COPY{#3}{\xpct@oldt} |
| 782 |
\SUBTRACT{#4}{#3}{\xpct@step} |
| 783 |
\DIVIDE{\xpct@step}{#1}{\xpct@step} |
| 784 |
\ADD{#1}{1}{\xpct@lastt} |
| 785 |
\@whilenum \value{xpct@step}<\xpct@lastt \do |
| 786 |
{\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt} |
| 787 |
#2{\xpct@oldt}{\xpct@oldy}{\xpct@oldDy} |
| 788 |
\Put[c](\xpct@oldt,\xpct@oldy){\pointmark} |
| 789 |
\stepcounter{xpct@step}% |
| 790 |
\COPY\xpct@newt\xpct@oldt |
| 791 |
}} |
| 792 |
\def\PlotxyDyData(#1,#2,#3)(#4,#5,#6){% |
| 793 |
\qCurve(#1,#2)(1,#3)(#4,#5)(1,#6) |
| 794 |
\@ifnextchar({\PlotxyDyData(#4,#5,#6)}{}} |
| 795 |
\def\PlotParametricFunction{% |
| 796 |
\@ifnextchar[{\xpct@iterateplotpfunction}{\xpct@plotpfunction}} |
| 797 |
\def\xpct@iterateplotpfunction[#1]#2#3#4{% |
| 798 |
\setcounter{xpct@step}{0}% |
| 799 |
\COPY{#3}{\xpct@oldt} |
| 800 |
\SUBTRACT{#4}{#3}{\xpct@step} |
| 801 |
\DIVIDE{\xpct@step}{#1}{\xpct@step} |
| 802 |
\@whilenum \value{xpct@step}<#1 \do |
| 803 |
{\ADD{\xpct@oldt}{\xpct@step}{\xpct@newt} |
| 804 |
\xpct@plotpfunction{#2}{\xpct@oldt}{\xpct@newt} |
| 805 |
\stepcounter{xpct@step}% |
| 806 |
\COPY\xpct@newt\xpct@oldt}\ignorespaces} |
| 807 |
\def\xpct@plotpfunction#1#2#3{% |
| 808 |
\begingroup |
| 809 |
#1{#2}\xzero\Dxzero\yzero\Dyzero |
| 810 |
#1{#3}\xone\Dxone\yone\Dyone |
| 811 |
\cartesianreference |
| 812 |
\qCurve(\xzero,\yzero)(\Dxzero,\Dyzero)(\xone,\yone)(\Dxone,\Dyone) |
| 813 |
\endgroup\ignorespaces} |
| 814 |
\def\cartesiangrid(#1,#2)(#3,#4){% |
| 815 |
\begingroup\gridtrue\cartesianaxes(#1,#2)(#3,#4)\endgroup} |
| 816 |
\def\cartesianaxes(#1,#2)(#3,#4){% |
| 817 |
\begingroup\cartesianreference |
| 818 |
\GLOBALCOPY{#1}{\xpct@XZero}\GLOBALCOPY{#2}{\xpct@YZero} |
| 819 |
\GLOBALCOPY{#3}{\xpct@XOne}\GLOBALCOPY{#4}{\xpct@YOne} |
| 820 |
\iftics |
| 821 |
\ticslabelsgridtrue |
| 822 |
\else |
| 823 |
\iflabels |
| 824 |
\ticslabelsgridtrue |
| 825 |
\else |
| 826 |
\ifgrid |
| 827 |
\ticslabelsgridtrue |
| 828 |
\fi\fi\fi |
| 829 |
\ifticslabelsgrid |
| 830 |
\xpct@plotticslabels |
| 831 |
\fi |
| 832 |
\xpct@plotaxes\endgroup} |
| 833 |
\def\plotxtic#1{% |
| 834 |
\maketics |
| 835 |
\xpct@adjticssize |
| 836 |
\xpct@adjxorytics{#1}{0} |
| 837 |
\xpct@printtic} |
| 838 |
\def\plotytic#1{% |
| 839 |
\maketics |
| 840 |
\xpct@adjticssize |
| 841 |
\xpct@adjxorytics{#1}{1} |
| 842 |
\xpct@printtic} |
| 843 |
\def\printxlabel#1#2{% |
| 844 |
\xpct@adjticssize |
| 845 |
\xpct@adjxorytics{#1}{0} |
| 846 |
\xpct@printlabel{0}{#2}} |
| 847 |
\def\printylabel#1#2{% |
| 848 |
\xpct@adjticssize |
| 849 |
\xpct@adjxorytics{#1}{1} |
| 850 |
\xpct@printlabel{1}{#2}} |
| 851 |
\def\printxticlabel#1#2{\plotxtic{#1}\printxlabel{#1}{#2}} |
| 852 |
\def\printyticlabel#1#2{\plotytic{#1}\printylabel{#1}{#2}} |
| 853 |
\def\plotxtics{\xpct@plottics{0}} |
| 854 |
\def\plotytics{\xpct@plottics{1}} |
| 855 |
\def\printxlabels{% |
| 856 |
\@ifnextchar[{\xpct@printlabels{0}}{\xpct@printlabels{0}[-1]}} |
| 857 |
\def\printylabels{% |
| 858 |
\@ifnextchar[{\xpct@printlabels{1}}{\xpct@printlabels{1}[-1]}} |
| 859 |
\def\printxticslabels{% |
| 860 |
\@ifnextchar[{\xpct@printxticslabels}{\xpct@printxticslabels[-1]}} |
| 861 |
\def\printyticslabels{% |
| 862 |
\@ifnextchar[{\xpct@printyticslabels}{\xpct@printyticslabels[-1]}} |
| 863 |
|
| 864 |
\def\xpct@plotaxes{\linethickness{\axesthickness}% |
| 865 |
\pictcolor{\axescolor} |
| 866 |
\ifinzeroaxes |
| 867 |
\xLINE(\xpct@XZero,0)(\xpct@XOne,0) |
| 868 |
\xLINE(0,\xpct@YZero)(0,\xpct@YOne) |
| 869 |
\else |
| 870 |
\xLINE(\xpct@XZero,\xpct@YZero)(\xpct@XOne,\xpct@YZero) |
| 871 |
\xLINE(\xpct@XZero,\xpct@YZero)(\xpct@XZero,\xpct@YOne) |
| 872 |
\fi} |
| 873 |
\def\xpct@plotticslabels{% |
| 874 |
\xpct@adjticssize |
| 875 |
\xpct@plotxticslabels\xpct@plotyticslabels} |
| 876 |
\def\xpct@plotxticslabels{% |
| 877 |
\ifgrid\xpct@plotgrid\fi |
| 878 |
\begingroup |
| 879 |
\ifnum\xunitdivisions=1 |
| 880 |
\xpct@ticsinterval{\xpct@XZero}{\xpct@XOne} |
| 881 |
\xpct@plotxtics |
| 882 |
\else |
| 883 |
\begingroup |
| 884 |
\xpct@adjstics |
| 885 |
\MULTIPLY{\secundaryyticssize}{\yunitdivisions}{\yticssize} |
| 886 |
\makenolabels |
| 887 |
\def\xunitdivisions{1} |
| 888 |
\xpct@plotxticslabels |
| 889 |
\endgroup |
| 890 |
\def\xunitdivisions{1} |
| 891 |
\xpct@plotxticslabels |
| 892 |
\fi |
| 893 |
\endgroup} |
| 894 |
\def\xpct@plotyticslabels{% |
| 895 |
\begingroup |
| 896 |
\ifnum\yunitdivisions=1 |
| 897 |
\xpct@ticsinterval{\xpct@YZero}{\xpct@YOne} |
| 898 |
\xpct@plotytics |
| 899 |
\else |
| 900 |
\begingroup |
| 901 |
\xpct@adjstics |
| 902 |
\MULTIPLY{\secundaryxticssize}{\xunitdivisions}{\xticssize} |
| 903 |
\makenolabels |
| 904 |
\def\yunitdivisions{1} |
| 905 |
\xpct@plotyticslabels |
| 906 |
\endgroup |
| 907 |
\def\yunitdivisions{1} |
| 908 |
\xpct@plotyticslabels |
| 909 |
\fi |
| 910 |
\endgroup} |
| 911 |
\def\xpct@adjstics{% |
| 912 |
\MULTIPLY{\xpct@XZero}{\xunitdivisions}{\xpct@XZero} |
| 913 |
\MULTIPLY{\xpct@YZero}{\yunitdivisions}{\xpct@YZero} |
| 914 |
\MULTIPLY{\xpct@XOne}{\xunitdivisions}{\xpct@XOne} |
| 915 |
\MULTIPLY{\xpct@YOne}{\yunitdivisions}{\xpct@YOne} |
| 916 |
\DIVIDE{1}{\xunitdivisions}{\xpct@xunit} |
| 917 |
\DIVIDE{1}{\yunitdivisions}{\xpct@yunit} |
| 918 |
\changereferencesystem(0,0)(\xpct@xunit,0)(0,\xpct@yunit) |
| 919 |
\def\gridthickness{\secundarygridthickness} |
| 920 |
\def\gridcolor{\secundarygridcolor}} |
| 921 |
\def\xpct@plotxtics{\xpct@maketics{\xpct@firstint}{\xpct@numtics}{0}} |
| 922 |
\def\xpct@plotytics{\xpct@maketics{\xpct@firstint}{\xpct@numtics}{1}} |
| 923 |
\def\xpct@maketics#1#2#3{% |
| 924 |
\xpct@adjxorytics{#1}{#3} |
| 925 |
\setcounter{xpct@counta}{0}% |
| 926 |
\iflabels\setcounter{xpct@countb}{#1}\fi |
| 927 |
\@whilenum \value{xpct@counta}<#2 \do {% |
| 928 |
\iftics |
| 929 |
\xpct@printtic |
| 930 |
\fi |
| 931 |
\iflabels |
| 932 |
\highestlabel{\xpct@axeslabelattrib% |
| 933 |
$\axeslabelmathalphabet{1}$}% |
| 934 |
\xpct@printlabel{#3}{\thexpct@countb} |
| 935 |
\stepcounter{xpct@countb}% |
| 936 |
\fi |
| 937 |
\stepcounter{xpct@counta}% |
| 938 |
\VECTORADD(\xpct@@xzero,\xpct@@yzero)(\xpct@@xincr,\xpct@@yincr)% |
| 939 |
(\xpct@@xzero,\xpct@@yzero) |
| 940 |
\VECTORADD(\xpct@@xone,\xpct@@yone)(\xpct@@xincr,\xpct@@yincr)% |
| 941 |
(\xpct@@xone,\xpct@@yone) |
| 942 |
}} |
| 943 |
\def\xpct@adjxorytics#1#2{% |
| 944 |
\ifnum #2=0 |
| 945 |
\COPY{#1}{\xpct@@xzero} |
| 946 |
\COPY{-\yticssize}{\xpct@@yzero} |
| 947 |
\COPY{#1}{\xpct@@xone} |
| 948 |
\COPY{\yticssize}{\xpct@@yone} |
| 949 |
\COPY{1}{\xpct@@xincr} |
| 950 |
\COPY{0}{\xpct@@yincr} |
| 951 |
\ifinzeroaxes\else |
| 952 |
\ADD{\xpct@YZero}{\xpct@@yzero}{\xpct@@yzero} |
| 953 |
\ADD{\xpct@YZero}{\xpct@@yone}{\xpct@@yone} |
| 954 |
\fi |
| 955 |
\else |
| 956 |
\COPY{#1}{\xpct@@yzero} |
| 957 |
\COPY{-\xticssize}{\xpct@@xzero} |
| 958 |
\COPY{#1}{\xpct@@yone} |
| 959 |
\COPY{\xticssize}{\xpct@@xone} |
| 960 |
\COPY{1}{\xpct@@yincr} |
| 961 |
\COPY{0}{\xpct@@xincr} |
| 962 |
\ifinzeroaxes\else |
| 963 |
\ADD{\xpct@XZero}{\xpct@@xzero}{\xpct@@xzero} |
| 964 |
\ADD{\xpct@XZero}{\xpct@@xone}{\xpct@@xone} |
| 965 |
\fi |
| 966 |
\fi} |
| 967 |
\def\xpct@printtic{\pictcolor{\ticscolor} |
| 968 |
\linethickness{\ticsthickness} |
| 969 |
\xLINE(\xpct@@xzero,\xpct@@yzero)(\xpct@@xone,\xpct@@yone)} |
| 970 |
\def\xpct@adjticssize{% |
| 971 |
\LENGTHDIVIDE{\ticssize}{\unitlength}{\xpct@ticssize} |
| 972 |
\LENGTHDIVIDE{\secundaryticssize}{\unitlength}{\xpct@sticssize} |
| 973 |
\refsysxyVector(1,0)(\xpct@a,\xpct@b) |
| 974 |
\VECTORNORM(\xpct@a,\xpct@b){\xpct@norm} |
| 975 |
\DIVIDE{\xpct@ticssize}{\xpct@norm}{\xticssize} |
| 976 |
\DIVIDE{\xpct@sticssize}{\xpct@norm}{\secundaryxticssize} |
| 977 |
\DIVIDE{\axislabelsep}{\xpct@norm}{\xpct@xaxislabelsep} |
| 978 |
\refsysxyVector(0,1)(\xpct@a,\xpct@b) |
| 979 |
\VECTORNORM(\xpct@a,\xpct@b){\xpct@norm} |
| 980 |
\DIVIDE{\xpct@ticssize}{\xpct@norm}{\yticssize} |
| 981 |
\DIVIDE{\xpct@sticssize}{\xpct@norm}{\secundaryyticssize} |
| 982 |
\DIVIDE{\axislabelsep}{\xpct@norm}{\xpct@yaxislabelsep}} |
| 983 |
\def\xpct@printlabel#1#2{% |
| 984 |
\iftics |
| 985 |
\ifnum #1=0 |
| 986 |
\ADD{\yticssize}{\xpct@yaxislabelsep}{\Pictlabelsep} |
| 987 |
\else |
| 988 |
\ADD{\xticssize}{\xpct@xaxislabelsep}{\Pictlabelsep} |
| 989 |
\fi |
| 990 |
\else |
| 991 |
\ifnum #1=0 |
| 992 |
\COPY{\xpct@yaxislabelsep}{\Pictlabelsep} |
| 993 |
\else |
| 994 |
\COPY{\xpct@xaxislabelsep}{\Pictlabelsep} |
| 995 |
\fi |
| 996 |
\fi |
| 997 |
\ifinzeroaxes |
| 998 |
\ifnum\thexpct@countb=0 |
| 999 |
\else |
| 1000 |
\ifnum #1=0 |
| 1001 |
\rPut*{\xpct@xlblpos}(\xpct@@xzero,0){% |
| 1002 |
\xpct@axeslabelattrib% |
| 1003 |
\ensuremath{\axeslabelmathalphabet{#2}}} |
| 1004 |
\else |
| 1005 |
\rPut*{\xpct@ylblpos}(0,\xpct@@yzero){% |
| 1006 |
\xpct@axeslabelattrib% |
| 1007 |
\ensuremath{\axeslabelmathalphabet{#2}}} |
| 1008 |
\fi |
| 1009 |
\fi |
| 1010 |
\else |
| 1011 |
\ifnum #1=0 |
| 1012 |
\rPut*{\xpct@xlblpos}(\xpct@@xzero,\xpct@YZero){% |
| 1013 |
\xpct@axeslabelattrib% |
| 1014 |
\ensuremath{\axeslabelmathalphabet{#2}}} |
| 1015 |
\else |
| 1016 |
\rPut*{\xpct@ylblpos}(\xpct@XZero,\xpct@@yzero){% |
| 1017 |
\xpct@axeslabelattrib% |
| 1018 |
\ensuremath{\axeslabelmathalphabet{#2}}} |
| 1019 |
\fi |
| 1020 |
\fi} |
| 1021 |
\def\xlabelpos#1{\xpct@convtoang{#1}{\xpct@xlblpos}{\xpct@CorR}} |
| 1022 |
\def\ylabelpos#1{\xpct@convtoang{#1}{\xpct@ylblpos}{\xpct@CorR}} |
| 1023 |
\def\xpct@printxticslabels[#1]#2#3#4{% |
| 1024 |
\plotxtics{#2}{#3}{#4}\printxlabels[#1]{#2}{#3}{#4}} |
| 1025 |
\def\xpct@printyticslabels[#1]#2#3#4{% |
| 1026 |
\plotytics{#2}{#3}{#4}\printylabels[#1]{#2}{#3}{#4}} |
| 1027 |
\def\xpct@plottics#1#2#3#4{% |
| 1028 |
\COPY{#2}{\xpct@ticcoor} |
| 1029 |
\@whiledim\xpct@ticcoor\p@<#4\p@ \do {% |
| 1030 |
\ifnum #1=0 |
| 1031 |
\plotxtic{\xpct@ticcoor} |
| 1032 |
\else |
| 1033 |
\plotytic{\xpct@ticcoor} |
| 1034 |
\fi |
| 1035 |
\ADD{#3}{\xpct@ticcoor}{\xpct@ticcoor} |
| 1036 |
} |
| 1037 |
\ifdim\xpct@ticcoor\p@>#4\p@ |
| 1038 |
\else |
| 1039 |
\ifnum #1=0 |
| 1040 |
\plotxtic{\xpct@ticcoor} |
| 1041 |
\else |
| 1042 |
\plotytic{\xpct@ticcoor} |
| 1043 |
\fi |
| 1044 |
\fi} |
| 1045 |
\def\xpct@printlabels#1[#2]#3#4#5{% |
| 1046 |
\COPY{#3}{\xpct@ticcoor} |
| 1047 |
\@whiledim\xpct@ticcoor\p@<#5\p@ \do {% |
| 1048 |
\ifnum #2=-1 |
| 1049 |
\COPY{\xpct@ticcoor}{\xpct@Ticcoor} |
| 1050 |
\else |
| 1051 |
\ROUND[#2]{\xpct@ticcoor}{\xpct@Ticcoor} |
| 1052 |
\fi |
| 1053 |
\xpct@prtlbl{#1} |
| 1054 |
\ADD{#4}{\xpct@ticcoor}{\xpct@ticcoor}} |
| 1055 |
\ifdim\xpct@ticcoor\p@>#5\p@ |
| 1056 |
\else |
| 1057 |
\ifnum #2=-1 |
| 1058 |
\COPY{\xpct@ticcoor}{\xpct@Ticcoor} |
| 1059 |
\else |
| 1060 |
\ROUND[#2]{\xpct@ticcoor}{\xpct@Ticcoor} |
| 1061 |
\fi |
| 1062 |
\xpct@prtlbl{#1} |
| 1063 |
\fi} |
| 1064 |
\def\xpct@prtlbl#1{% |
| 1065 |
\ifinzeroaxes |
| 1066 |
\ifdim \xpct@ticcoor\p@=\z@\else |
| 1067 |
\xpct@adjticssize |
| 1068 |
\xpct@adjxorytics{\xpct@ticcoor}{#1} |
| 1069 |
\xpct@printlabel{#1}{\xpct@Ticcoor} |
| 1070 |
\fi |
| 1071 |
\else |
| 1072 |
\xpct@adjticssize |
| 1073 |
\xpct@adjxorytics{\xpct@ticcoor}{#1} |
| 1074 |
\xpct@printlabel{#1}{\xpct@Ticcoor}\fi} |
| 1075 |
\def\xpct@plotgrid{% |
| 1076 |
\xpct@ticsinterval{\xpct@XZero}{\xpct@XOne} |
| 1077 |
\begingroup\setcounter{xpct@counta}{0}% |
| 1078 |
\pictcolor{\gridcolor}\linethickness{\gridthickness} |
| 1079 |
\COPY{\xpct@firstint}{\xpct@grid} |
| 1080 |
\@whilenum\value{xpct@counta}<\xpct@numtics\do{ |
| 1081 |
\xLINE(\xpct@grid,\xpct@YZero)(\xpct@grid,\xpct@YOne) |
| 1082 |
\ADD{1}{\xpct@grid}{\xpct@grid} |
| 1083 |
\stepcounter{xpct@counta}}\endgroup |
| 1084 |
\xpct@ticsinterval{\xpct@YZero}{\xpct@YOne} |
| 1085 |
\begingroup\setcounter{xpct@counta}{0}% |
| 1086 |
\pictcolor{\gridcolor}\linethickness{\gridthickness} |
| 1087 |
\COPY{\xpct@firstint}{\xpct@grid} |
| 1088 |
\@whilenum\value{xpct@counta}<\xpct@numtics\do{ |
| 1089 |
\xLINE(\xpct@XZero,\xpct@grid)(\xpct@XOne,\xpct@grid) |
| 1090 |
\ADD{1}{\xpct@grid}{\xpct@grid} |
| 1091 |
\stepcounter{xpct@counta}}\endgroup} |
| 1092 |
\def\xpct@ticsinterval#1#2{\TRUNCATE[0]{#1}{\xpct@firstint} |
| 1093 |
\TRUNCATE[0]{#2}{\xpct@lastint} |
| 1094 |
\SUBTRACT{\xpct@lastint}{\xpct@firstint}{\xpct@numtics} |
| 1095 |
\ADD{\xpct@numtics}{1}{\xpct@numtics}} |
| 1096 |
\def\polargrid#1#2{% |
| 1097 |
\begingroup |
| 1098 |
\polarreference |
| 1099 |
\FLOOR{#1}{\xpct@rint} |
| 1100 |
\MULTIPLY{\xpct@rint}{\runitdivisions}{\xpct@rdivs} |
| 1101 |
\DIVIDE{1}{\runitdivisions}{\rincr} |
| 1102 |
\COPY{0}{\xpct@radius} |
| 1103 |
\setcounter{xpct@counta}{1}% |
| 1104 |
\begingroup |
| 1105 |
\pictcolor{\gridcolor} |
| 1106 |
\linethickness{\gridthickness} |
| 1107 |
\@whilenum \value{xpct@counta}<\xpct@rdivs\do {% |
| 1108 |
\ADD{\rincr}{\xpct@radius}{\xpct@radius} |
| 1109 |
\Ellipse{\xpct@radius}{\xpct@radius} |
| 1110 |
\stepcounter{xpct@counta}}% |
| 1111 |
\pictcolor{\axescolor} |
| 1112 |
\linethickness{\axesthickness} |
| 1113 |
\Ellipse{\xpct@rint}{\xpct@rint} |
| 1114 |
\endgroup |
| 1115 |
\COPY{0}{\xpct@angle} |
| 1116 |
\DIVIDE{\numberTWOPI}{#2}{\xpct@angincr} |
| 1117 |
\setcounter{xpct@counta}{0}% |
| 1118 |
\pictcolor{\gridcolor} |
| 1119 |
\linethickness{\gridthickness} |
| 1120 |
\@whilenum \value{xpct@counta}<#2 \do {% |
| 1121 |
\xLINE(0,0)(#1,\xpct@angle) |
| 1122 |
\iflabels |
| 1123 |
\COPY{\axislabelsep}{\Pictlabelsep} |
| 1124 |
\MULTIPLY{2}{\thexpct@counta}{\xpct@arc} |
| 1125 |
\xpct@polarlabel{#1}{\xpct@arc}{#2}\fi |
| 1126 |
\ADD{\xpct@angincr}{\xpct@angle}{\xpct@angle} |
| 1127 |
\stepcounter{xpct@counta}}% |
| 1128 |
\pictcolor{\axescolor} |
| 1129 |
\linethickness{\axesthickness} |
| 1130 |
\xLINE(0,0)(#1,0) |
| 1131 |
\iflabels |
| 1132 |
\highestlabel{\xpct@axeslabelattrib$\axeslabelmathalphabet{1}$} |
| 1133 |
\multiPut*[\xpct@rlblpos](1,0)(1,0){\xpct@rint}{% |
| 1134 |
\ADD{\value{multiput}}{1}{\xpct@lbl} |
| 1135 |
\xpct@axeslabelattrib% |
| 1136 |
\ensuremath{\axeslabelmathalphabet{\xpct@lbl}}}% |
| 1137 |
\fi |
| 1138 |
\endgroup} |
| 1139 |
|
| 1140 |
\def\rlabelpos#1{\xpct@convtoang{#1}{\xpct@rlblpos}{\xpct@CorR}} |
| 1141 |
\def\degreespolarlabels{\def\xpct@polarlabel{\xpct@degreeslabel}} |
| 1142 |
\def\radianspolarlabels{\def\xpct@polarlabel{\xpct@radianslabel}} |
| 1143 |
\def\xpct@degreeslabel#1#2#3{% |
| 1144 |
\FRACTIONSIMPLIFY{#2}{#3}\xpct@num\xpct@den |
| 1145 |
\MULTIPLY{\xpct@num}{180}{\xpct@degangle} |
| 1146 |
\DIVIDE{\xpct@degangle}{\xpct@den}{\xpct@degangle} |
| 1147 |
\cPut{\xpct@degangle}(#1,\xpct@angle){% |
| 1148 |
\xpct@axeslabelattrib% |
| 1149 |
\ensuremath{\axeslabelmathalphabet{\xpct@degangle^\mathrm{o}}}}} |
| 1150 |
\def\xpct@radianslabel#1#2#3{% |
| 1151 |
\RADtoDEG{\xpct@angle}{\xpct@angles} |
| 1152 |
\cPut{\xpct@angles}(#1,\xpct@angle){% |
| 1153 |
\xpct@axeslabelattrib% |
| 1154 |
\ensuremath{\axeslabelmathalphabet |
| 1155 |
{\xpct@prtfracrad{#2}{#3}}}}} |
| 1156 |
\def\xpct@prtfracrad#1#2{% |
| 1157 |
\FRACTIONSIMPLIFY{#1}{#2}\xpct@num\xpct@den |
| 1158 |
\ifnum \xpct@num = 0 0 |
| 1159 |
\else |
| 1160 |
\ifnum \xpct@num = 1 |
| 1161 |
\ifnum \xpct@den = 1 \pi |
| 1162 |
\else \pi/\xpct@den |
| 1163 |
\fi |
| 1164 |
\else \xpct@num\pi/\xpct@den |
| 1165 |
\fi |
| 1166 |
\fi} |
| 1167 |
\axesthickness=1pt |
| 1168 |
\def\axescolor{black} |
| 1169 |
\def\axeslabelcolor{\axescolor} |
| 1170 |
\def\axeslabelsize{\small} |
| 1171 |
\def\axeslabelmathversion{normal} |
| 1172 |
\def\axeslabelmathalphabet{\mathrm} |
| 1173 |
\xlabelpos{-90} |
| 1174 |
\ylabelpos{180} |
| 1175 |
\rlabelpos{bbr} |
| 1176 |
\def\axislabelsep{0.1} |
| 1177 |
\def\ticscolor{\axescolor} |
| 1178 |
\ticsthickness=1pt |
| 1179 |
\ticssize=4pt |
| 1180 |
\secundaryticssize=2pt |
| 1181 |
\gridthickness=0.4pt |
| 1182 |
\def\gridcolor{gray} |
| 1183 |
\secundarygridthickness=0.2pt |
| 1184 |
\def\secundarygridcolor{lightgray} |
| 1185 |
\def\xunitdivisions{1} |
| 1186 |
\def\yunitdivisions{1} |
| 1187 |
\def\runitdivisions{1} |
| 1188 |
\def\xpct@polarlabel{\xpct@radianslabel} |
| 1189 |
\def\Pictlabelsep{0.1} |
| 1190 |
\defaultPut{c} |
| 1191 |
\referencesystem(0,0)(1,0)(0,1) |
| 1192 |
\cartesianreference |
| 1193 |
\arrowsize{5}{2} |
| 1194 |
\def\defaultplotdivs{8} |
| 1195 |
\def\pointmarkdiam{0.1} |
| 1196 |
\def\pointmark{\circle*{\pointmarkdiam}} |
| 1197 |
\def\draftPictures{% |
| 1198 |
\drafttrue |
| 1199 |
\def\cPut##1(##2,##3)##4{} |
| 1200 |
\def\xpct@@Put(##1)##2{} |
| 1201 |
\def\xpct@@Putstar[##1](##2)##3{} |
| 1202 |
\def\xpct@@@Put[##1](##2)##3{} |
| 1203 |
\def\defaultPut##1{\def\xpct@defaultPut{\cPut}} |
| 1204 |
\def\xpct@@mPut(##1,##2)(##3,##4)##5##6{} |
| 1205 |
\def\xpct@PUT##1(##2,##3)##4{} |
| 1206 |
\def\xLINE(##1)(##2){} |
| 1207 |
\def\xtrivVECTOR(##1)(##2){} |
| 1208 |
\def\xVECTOR(##1)(##2){} |
| 1209 |
\def\zerovector(##1){} |
| 1210 |
\def\zerotrivvector(##1){} |
| 1211 |
\def\xline(##1,##2)##3{} |
| 1212 |
\def\xvector(##1,##2)##3{} |
| 1213 |
\def\xtrivvector(##1,##2)##3{} |
| 1214 |
\def\xpct@regPolygon[##1]##2##3{} |
| 1215 |
\def\xpct@@qCurve(##1)(##2)(##3)(##4){} |
| 1216 |
\def\xpct@PlotQuadraticCurve(##1)(##2)(##3)(##4){% |
| 1217 |
\@ifnextchar({\PlotQuadraticCurve(##3)(##4)}{}} |
| 1218 |
\def\xpct@@PlotQuadraticCurve(##1)##2(##3)##4{% |
| 1219 |
\@ifnextchar({\PlotQuadraticCurve(##3){##4}}{}} |
| 1220 |
\def\circularArc##1##2##3{} |
| 1221 |
\def\ellipticArc##1##2##3##4{} |
| 1222 |
\def\Ellipse##1##2{} |
| 1223 |
\def\Circle##1{} |
| 1224 |
\def\xpct@hyperbolicArc##1##2##3##4{} |
| 1225 |
\def\lHyperbola##1##2##3##4{} |
| 1226 |
\def\rHyperbola##1##2##3##4{} |
| 1227 |
\def\Hyperbola##1##2##3##4{} |
| 1228 |
\def\rhyperbolicArc##1##2##3##4{} |
| 1229 |
\def\lhyperbolicArc##1##2##3##4{} |
| 1230 |
\def\parabolicArc##1##2##3{} |
| 1231 |
\def\Parabola##1##2##3{} |
| 1232 |
\def\PlotPointsOfFunction##1##2##3##4{} |
| 1233 |
\def\xpct@iterateplotfunction[##1]##2##3##4{} |
| 1234 |
\def\xpct@plotfunction##1##2##3{} |
| 1235 |
\def\xpct@iterateplotpfunction[##1]##2##3##4{} |
| 1236 |
\def\xpct@plotpfunction##1##2##3{} |
| 1237 |
\def\cartesianaxes(##1,##2)(##3,##4){} |
| 1238 |
\def\cartesiangrid(##1,##2)(##3,##4){} |
| 1239 |
\def\plotxtic##1{} |
| 1240 |
\def\plotytic##1{} |
| 1241 |
\def\printxlabel##1##2{} |
| 1242 |
\def\printylabel##1##2{} |
| 1243 |
\def\printxticlabel##1##2{} |
| 1244 |
\def\printyticlabel##1##2{} |
| 1245 |
\def\plotxtics##1##2##3{} |
| 1246 |
\def\plotytics##1##2##3{} |
| 1247 |
\def\xpct@printlabels##1[##2]##3##4##5{} |
| 1248 |
\def\polargrid##1##2{} |
| 1249 |
} |
| 1250 |
\ifdraft |
| 1251 |
\draftPictures |
| 1252 |
\fi |
| 1253 |
\InputIfFileExists{xpicture.cfg}{\xpct@Infocfg}{\xpct@Infonocfg} |
| 1254 |
%% |
| 1255 |
%% |
| 1256 |
%% End of file `xpicture.sty'. |