1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% GLE - Graphics Layout Engine <http://glx.sourceforge.io/> %
% %
% Modified BSD License %
% %
% Copyright (C) 2009 GLE. %
% %
% Redistribution and use in source and binary forms, with or without %
% modification, are permitted provided that the following conditions %
% are met: %
% %
% 1. Redistributions of source code must retain the above copyright %
% notice, this list of conditions and the following disclaimer. %
% %
% 2. Redistributions in binary form must reproduce the above %
% copyright notice, this list of conditions and the following %
% disclaimer in the documentation and/or other materials provided with %
% the distribution. %
% %
% 3. The name of the author may not be used to endorse or promote %
% products derived from this software without specific prior written %
% permission. %
% %
% THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR %
% IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED %
% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE %
% ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY %
% DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL %
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE %
% GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS %
% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER %
% IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR %
% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN %
% IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix
\chapter{Tables}
\section{Markers}
\index{markers}
\mbox{\input{primitives/fig/gc_marker.inc}}
\section{Functions and Variables}
\index{functions}
\label{fct:sec}
GLE has the following built in functions and variables in the following categories
\subsection{General Program}
\begin{supertabular}{ll} \hline
Function name & Returns \\ \hline
{\tt arg(i)} \index{arg()} & i-th command line argument \\
{\tt arg\$(i)} \index{arg()} & i-th command line argument \\
{\tt dataxvalue(ds,i)} \index{dataxvalue} & $x$-value of $i$-th point in ds (p.~\pageref{dataxvalue})\\
{\tt datayvalue(ds,i)} \index{datayvalue} & $y$-value of $i$-th point in ds (p.~\pageref{datayvalue})\\
{\tt date\$()} \index{date\$()} & current date e.g. ``Tue Apr 09 1991'' \\
{\tt device\$()} \index{device\$()} & available devices e.g. ``HARDCOPY, PS''\\
{\tt getenv(str)} \index{getenv{}} & returns environment variable ``str''\\
{\tt eval(str)} \index{eval()} & evaluates given GLE expression \\
{\tt $\backslash{}$expr(exp)} \index{$\backslash{}$expr(exp)} & substitute result of evaluating ``exp'' \\
{\tt file\$()} \index{file\$()} & returns GLE file name (without extension) \\
{\tt height(name\$)} \index{height()} & the height of the object {\tt name\$} \\
{\tt nargs()} \index{nargs()} & number of command line arguments \\
{\tt ndata(ds)} \index{ndata} & number of points in data set ds (p.~\pageref{ndata})\\
{\tt ndatasets()} \index{ndatasets} & number of available data sets\\
{\tt pageheight()} \index{pageheight()} & the height of the page (from size command) \\
{\tt pagewidth()} \index{pagewidth()} & the width of the page (from size command) \\
{\tt path\$()} \index{path\$()} & returns the directory where the script is located \\
{\tt pointx(pt)} \index{pointx()} & the x value of named point pt \\
{\tt pointy(pt)} \index{pointy()} & the y value of named point pt \\
{\tt ptx(pt)} \index{ptx()} & the x value of named point pt (abbreviation for pointx) \\
{\tt pty(pt)} \index{pty()} & the y value of named point pt (abbreviation for pointy)\\
{\tt rgb(red,green,blue)} \index{rgb()} & create color given RGB values \\
{\tt rgba(red,green,blue,alpha)} \index{rgba()} & create color given RGB and alpha values \\
{\tt rgb255(red,green,blue)} \index{rgb255()} & create color given RGB values \\
{\tt rgba255(red,green,blue,alpha)} \index{rgba255()} & create color given RGB and alpha values \\
{\tt tdepth(str\$)} \index{tdepth()} & the depth of {\tt str\$} assuming current the font, size \\
{\tt theight(str\$)} \index{theight()} & the height of {\tt str\$} assuming current font, size \\
{\tt twidth(str\$)} \index{twidth()} & the width of {\tt str\$} assuming current font, size \\
{\tt time\$()} \index{time\$()} & current time e.g. ``11:44:27'' \\
{\tt width(name\$)} \index{width()} & the width of the object {\tt name\$} \\
{\tt xend()} \index{xend()} & the x end point of a text string when drawn \\
{\tt xpos()} \index{xpos()} & the current x point \\
{\tt yend()} \index{yend()} & the y end point of a text string when drawn \\
{\tt ypos()} \index{ypos()} & the current y point \\
\end{supertabular}
\subsection{String or Text Manipulation}
\begin{supertabular}{ll} \hline
Function Name & Returns \\ \hline
{\tt num\$(exp)} \index{num\$()} & string representation of {\tt exp} \\
{\tt num1\$(exp)} \index{num1\$()} & as above but with no spaces \\
{\tt pos(str1\$,str2\$,exp)} \index{pos()} & position of {\tt str2\$} in {\tt str1\$} from {\tt exp} \\
{\tt right\$(str\$,exp)} \index{right\$()} & rest of {\tt str\$} starting at {\tt exp} \\
{\tt seg\$(str\$,exp1,exp2)} \index{seg\$()} & {\tt str\$} from {\tt exp1} to {\tt exp2} \\
{\tt val(str\$)} \index{val()} & value of the string {\tt str\$} \\
{\tt left\$(str\$,exp)} \index{left\$()} & left {\tt exp} characters of {\tt str\$} \\
{\tt len(str\$)} \index{len()} & the length of {\tt str\$} \\
{\tt format\$(exp,format)} \index{format\$()} & format {\tt exp} as specified in {\tt format} (p.~\pageref{formatnum:pg})\\
\end{supertabular}
\subsection{Logical Operators}
\begin{tabular}{ll} \hline
Operator & Meaning \\ \hline
{\tt =} \index{=} & equals (same as assignment) \\
{\tt \textless \textgreater} \index{\textless \textgreater} & not equals (in GLE {\tt !} is the comment character) \\
{\tt \textless } \index{\textless} & less than\\
{\tt \textgreater } \index{\textgreater} & greater than\\
{\tt \textless =} \index{\textless =} & less than or equal \\
{\tt \textgreater =} \index{\textgreater =} & greater than or equal \\
{\tt and} \index{and} & logical and between two expressions e.g. {\tt ( x \textless\ 1) and (x \textgreater\ 10) }\\
{\tt or} \index{or} & logical or between two expressions\\
{\tt not(exp)} \index{not()} & logical not of {\tt exp} \\
\end{tabular}
\subsection{Mathematical Operators, Constants, and Functions}
GLE provides the following mathematical operators, functions, and constants. All angles are in radians. The constant values have 16 digits of precision within GLE. The special functions are from the boost C++ libraries or the C++ standard math libraries. The physical constants are based on CODATA values and are in SI units and generated from scipy.constants. The mathematical constants are from the boost::math C++ library.
\vspace{2ex}
\begin{tabular}{ll} \hline
Operator & Meaning \\ \hline
{\tt =} \index{=} & assignment (same as logical equals) \\
{\tt +} \index{+} & addition \\
{\tt -} \index{-} & subtraction \\
{\tt *} \index{*} & multiplication\\
{\tt /} \index{/} & division \\
{\tt \textasciicircum } \index{\textasciicircum} & exponentiation \\
{\tt \%} \index{\%} & modulus or remainder\\
{\tt ++} \index{++} & increment {\tt a++ $\equiv$ a = a + 1 }\\
{\tt --} \index{--} & decrement {\tt a-- $\equiv$ a = a - 1 }\\
{\tt +=} \index{+=} & addition assignment {\tt a+=3 $\equiv$ a = a + 3 }\\
{\tt -=} \index{-=} & subtraction assignment {\tt a-=3 $\equiv$ a = a - 3 }\\
{\tt *=} \index{*=} & multiplication assignment {\tt a*=3 $\equiv$ a = a * 3 }\\
{\tt /=} \index{/=} & division assignment {\tt a/=3 $\equiv$ a = a / 3 }\\
\end{tabular}
\vspace{2ex}
\input{appendix/constants.tex}
%\begin{tabular}{ll} \hline
%Numerical Constants & Value \\ \hline
%{\tt pi} \index{pi} & $\pi = 3.14159265358979323846 $ \\
%{\tt two\_pi} \index{two\_pi} & $2\pi $ \\
%{\tt root\_pi} \index{root\_pi} & $\sqrt{\pi}$ \\
%{\tt half\_pi} \index{half\_pi} & $\pi/2$ \\
%{\tt root\_two} \index{root\_two} & $\sqrt{2}$ \\
%{\tt root\_three} \index{root\_three} & $\sqrt{3}$ \\
%{\tt \_e\_} \index{\_e\_} & $e^1$ \\
%\end{tabular}
\vspace{2ex}
\begin{supertabular}{ll} \hline
Function & Returns \\ \hline
{\tt abs($x$)} \index{abs()} & absolute value of $x$ \\
{\tt acos($x$)} \index{acos()} & inverse cosine of $x$ \\
{\tt acosh($x$)} \index{acosh()} & inverse hyperbolic cosine of $x$ \\
{\tt acot($x$)} \index{acot()} & 1/atan($x$) \\
{\tt acoth($x$)} \index{acoth()} & 1/atanh($x$) \\
{\tt acsc($x$)} \index{acsc()} & 1/asin($x$) \\
{\tt acsch($x$)} \index{acsch()} & 1/asinh($x$) \\
{\tt asec($x$)} \index{asec()} & 1/acos($x$) \\
{\tt asech($x$)} \index{asech()} & 1/acosh($x$) \\
{\tt asin($x$)} \index{asin()} & inverse sine of $x$ \\
{\tt asinh($x$)} \index{asinh()} & inverse hyperbolic sine of $x$\\
{\tt atan($x$)} \index{atan()} & inverse tangent of $x$ \\
{\tt atanh($x$)} \index{atanh()} & inverse hyperbolic tangent of $x$ \\
{\tt atn($x$)} \index{atn()} & same as atan($x$) ({\it deprecated, kept for backward compatibility} ) \\
{\tt cos($x$)} \index{cos()} & cosine of $x$ \\
{\tt cosh($x$)} \index{cosh()} & hyperbolic cosine of $x$ \\
{\tt cot($x$)} \index{cot()} & 1/tan($x$) \\
{\tt coth($x$)} \index{coth()} & 1/tanh($x$) \\
{\tt csc($x$)} \index{csc()} & 1/sin($x$) \\
{\tt csch($x$)} \index{csch()} & 1/sinh($x$) \\
{\tt erf($x$)} \index{eval()} & Gaussian error function of $x$ \\
{\tt exp($x$)} \index{exp()} & $e^x$ \\
{\tt fix($x$)} \index{fix()} & $x$ rounded towards 0 \\
{\tt int($x$)} \index{int()} & integer part of $x$ \\
{\tt log($x$)} \index{log()} & log to base $e$ of $x$ \\
{\tt log10($x$)} \index{log10()} & log to base 10 of $x$ \\
{\tt max($x$,$y$)} \index{max()} & the maximum value of $x$ or $y$ \\
{\tt min($x$,$y$)} \index{min()} & the minimum value of $x$ or $y$ \\
{\tt rnd($x$)} \index{rnd()} & random number between 0 and $x$ \\
{\tt sdiv(x,y)} \index{sdvi()} & return x/y or 0 if y = 0 \\
{\tt sec($x$)} \index{sec()} & 1/cos($x$) \\
{\tt sech($x$)} \index{sech()} & 1/cosh($x$) \\
{\tt sgn($x$)} \index{sgn()} & returns 1 if $x$ is positive, -1 if $x$ is negative \\
{\tt sin($x$)} \index{sin()} & sine of $x$ \\
{\tt sinh($x$)} \index{sinh()} & hyperbolic sine of $x$ \\
{\tt sqr($x$)} \index{sqr()} & $x$ squared \\
{\tt sqrt($x$)} \index{sqrt()} & square root of $x$ \\
{\tt tan($x$)} \index{tan()} & tangent of $x$ \\
{\tt tanh($x$)} \index{tanh()} & hyperbolic tangent of $x$ \\
{\tt todeg($x$)} \index{todeg()} & convert from radians to degrees \\
{\tt torad($x$)} \index{torad()} & convert from degrees to radians \\
{\tt associated\_laguerre($n$,$x$)} \index{associated\_laguerre()} & $n^{th}$ order associated Laguerre polynomial of $x$ \\
{\tt spherical\_harmonic($n$,$m$,$\theta$,$\phi$)} \index{spherical\_harmonic()} & real valued spherical harmonic, $\theta$ polar angle $[0,\pi]$, $\phi$ azimuthal angle $[0,2\pi]$. \\
{\tt factorial($n$)} \index{factorial()} & $n!$ \\
{\tt double\_factorial($n$)} \index{double\_factorial()} & $n!!$ \\
{\tt hermite($n$,x)} \index{hermite()} & $n^{th}$ order Hermite polynomial of $x$ \\
{\tt associated\_legendre($\ell$,$x$)} \index{associated\_legendre()} & $\ell^{th}$-order associated Legendre polynomial of $x$ \\
{\tt bessel\_first($v$,$x$)} \index{bessel\_first()} & Bessel function of the first kind \\
{\tt bessel\_second($v$,$x$)} \index{bessel\_second()} & Bessel function of the second kind \\
{\tt airy\_first($x$)} \index{airy\_first()} & Airy function of the first kind \\
{\tt airy\_second($x$)} \index{airy\_second()} & Airy function of the second kind \\
{\tt chebyshev\_first($n$,$x$)} \index{chebyshev\_first()} & $n^{th}$ order Chebyshev polynomial of the first kind of $x$ \\
{\tt chebyshev\_second($n$,$x$)} \index{chebyshev\_second()} & $n^{th}$ order Chebyshev polynomial of the second kind of $x$ \\
\end{supertabular}
\subsection{Graphing}
Graph variables and function that provide information from preceding graph block
\begin{supertabular}{ll} \hline
Function Name & Returns \\ \hline
{\tt xgmin} \index{xgmin} & the minimum x-coordinate of the graph \\
{\tt xgmax} \index{xgmax} & the maximum x-coordinate of the graph \\
{\tt x2gmin} \index{x2gmin} & the minimum x2-coordinate of the graph \\
{\tt x2gmax} \index{x2gmax} & the maximum x2-coordinate of the graph \\
{\tt ygmin} \index{ygmin} & the minimum y-coordinate of the graph \\
{\tt ygmax} \index{ygmax} & the maximum y-coordinate of the graph \\
{\tt y2gmin} \index{y2gmin} & the minimum y2-coordinate of the graph \\
{\tt y2gmax} \index{y2gmax} & the maximum y2-coordinate of the graph \\
{\tt xbar(x,i)} \index{xbar()} & the absolute x coordinate of the i-th bar at point x on the graph \\
{\tt xg(xexp)} \index{xg()} & converts units of last graph to abs cm. \\
{\tt xg3d(x,y,z)} \index{xg3d()} & converts units of last 3D graph to abs cm. \\
{\tt xy2angle(dx,dy)} \index{xy2angle()}& convert rectangular coordinates to polar angle (in degrees)\\
{\tt yg(yexp)} \index{yg()} & converts units of last graph to abs cm. \\
{\tt yg3d(x,y,z)} \index{yg3d()} & converts units of last 3D graph to abs cm. \\
\end{supertabular}
\input{appendix/sym}
\newpage
%\section{Installing GLE}
%\label{install:app}
\section{Fonts}
\index{fonts} \index{font-examples}
\resizebox{!}{22cm}{\includegraphics{appendix/fig/ap_fonts}}
\newpage
%%
% \clearpage
% \input{appendix/sm_single}
%%
% \clearpage
% \input{appendix/sm_stack2}
%
% \clearpage
% \input{appendix/sm_stack4b}
%%
% \clearpage
% \input{appendix/sm_stack1}
%%
% \clearpage
% \input{appendix/sm_loop}
%%
% \clearpage
% \input{appendix/sm_join}
%%
% \clearpage
% \input{appendix/sm_clip}
%%
%%\cleardoublepage
|