[pstricks] Re: Hyperbolas
Jacques L'helgoualc'h
lhh+nospam at free.fr
Tue Feb 8 09:53:21 CET 2005
Jacques L'helgoualc'h a écrit, lundi 7 février 2005, à 17:36 :
[...]
Yet another improvement
\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}
\psthyperbola at ii{#1 neg}{#2}% second branch
\endgroup
}
\def\psthyperbola at ii#1#2{% a b
\addto at pscode{%
/a {#1} bind def
/b {#2} bind def
/d {2 1 t dup mul sub div} bind def}% d = 2/(1 - t^2)
\parametricplot{-.99}{.99}{%
a d 1 sub mul % (1 + t^2)/(1 - t^2) = -1 + 2/(1 - t^2)
b t d mul mul}
}
\makeatother
but d depends on t: I feel it should be (re)defined inside the
parametricplot loop?
--
Jacques L'helgoualc'h
More information about the PSTricks
mailing list