[pstricks] Re: Hyperbolas

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Mon Feb 7 08:16:47 CET 2005


Sorry, cut and paste ... :-(

Herbert

> \documentclass[a4paper,12pt]{article}
> \usepackage{pstricks}
> \usepackage{pst-plot}
> \usepackage{pst-math}
> \makeatletter
> \def\psthyperbola{\pst at object{psthyperbola}}
> \def\psthyperbola at i#1#2{%
>   \pst at killglue
>   \begingroup
>   \use at par
>   \psthyperbola at ii{#1}{#2}{1}{1}
>   \psthyperbola at ii{#1}{#2}{-1}{1}
>   \psthyperbola at ii{#1}{#2}{1}{-1}
>   \psthyperbola at ii{#1}{#2}{-1}{-1}
>   \endgroup
> }
> \def\psthyperbola at ii#1#2#3#4{% a b -1/+1  -1/+1
>   \parametricplot{0}{6.28}{%
>     /a #1 def /b #2 def
>     a t COSH mul #3 mul b t SINH mul #4 mul}
> }
> \makeatother
> \parindent=0pt
> 
> \begin{document}

\begin{pspicture*}(-5,-5)(5,5)
   \psaxes(0,0)(-5,-5)(5,5)
   \psset{linewidth=1.5pt}
   \psthyperbola{2.0}{1.5}
   \psthyperbola[linecolor=red]{1.0}{1.5}
\end{pspicture*}

\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list