[pstricks] Re: Hyperbolas
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Mon Feb 7 08:09:45 CET 2005
Bruce Burlton wrote:
> Have you seen any pstricks routines that draw hyperbolas
> (x^2/a^2-y^2/b^2=1)?
>
> I have tried to do so with a parametric approach (psplot), but it "blows
> up" in postscript.
give an example
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}
--
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