[pstricks] Re: Hyperbolas
Jacques L'helgoualc'h
lhh+nospam at free.fr
Mon Feb 7 17:36:23 CET 2005
Herbert Voss a écrit, lundi 7 février 2005, à 16:08 :
> [...] However, the definitions should be outside
> of parametricplot
Thanks for this tip; is the following code OK?
\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 def
/d {1 t dup mul sub} bind def }
\parametricplot{-.99}{.99}{%
a t dup mul 1 add d div mul
b t 2 mul d div mul}
}
\makeatother
--
Jacques L'helgoualc'h
More information about the PSTricks
mailing list