[pstricks] more confusion

Nitecki, Zbigniew H. Zbigniew.Nitecki at tufts.edu
Sun Jan 1 20:10:02 CET 2012

Of course!  Thanks…I feel like a total idiot.

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/

On Jan 1, 2012, at 14:05, Michael Sharpe wrote:

On Jan 1, 2012, at 10:07 AM, Nitecki, Zbigniew H. wrote:

Inside a pspicture environment, the code

\parametricplot[linecolor=red]{-1.6}{1.6}{t COSH 2 mul t SINH 1.5 2 mul mul}

(correctly) gives me the right branch of the hyperbola (x^2)/4-(y^2)/9=1, in red.

But the code

\newcommand{\frbranch}[1.0]{%
\parametricplot[linecolor=#4]{-#5}{#5}{%
{t COSH #2 mul t SINH #1 #3 mul mul}
}
}%Colored right branch of hyperbola x^{2}/A^{2}-y^{2}/B^{2}=C^{2};  arguments are:
%#1=B/A =slope of asymptotes:  default is 1.0
%#2=AC=distance of vertex from origin
%#3=A
%#4=color
%#5=range:  to fit inside axb box, use
%#5=MIN(cosh^{-1}(a/A), sinh^{-1}(b/B))
\begin{pspicture}(-5,-5)(5,5)
\frbranch[1.5]{2}{2}{red}{1.6}
\end{pspicture}

crashes on execution.

What am I doing wrong? (Ignore my choice of #5=1.6.  It was an arbitrary choice which should affect nothing.)

You have an additional pair of braces around the function, which prevents PostScript from executing the code. You should instead write

\newcommand{\frbranch}[1.0]{%
\parametricplot[linecolor=#4]{-#5}{#5}%
{t COSH #2 mul t SINH #1 #3 mul mul}
}

Michael

_______________________________________________
PSTricks mailing list
PSTricks at tug.org<mailto:PSTricks at tug.org>
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/