[pstricks] Re: Hyperbolas

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


Jacques L'helgoualc'h wrote:
> Herbert Voss a écrit, lundi 7 février 2005, à 08:09 :
> [...]
> 
>>\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}
>>}
> 
> 
> I suggest rational parameters (quicker, and maybe a better plotpoints
> repartition)
> 
> \def\psthyperbola at ii#1#2#3#4{% a b -1/+1  -1/+1
>   \parametricplot{0}{.99}{%
>     /a #1 def /b #2 def
>     /d {1 t dup mul sub} bind def
>     a t dup mul 1 add d div mul #3 mul
>     b t 2 mul d div mul #4 mul}
> }

yes, looks good. However, the definitions should be outside
of parametricplot


\def\psthyperbola at ii#1#2#3#4{% a b -1/+1  -1/+1
   \addto at pscode{/a #1 def /b #2 def
     /d {1 t dup mul sub} bind def }
   \parametricplot{0}{.99}{%
     a t dup mul 1 add d div mul #3 mul
     b t 2 mul d div mul #4 mul}
}

Herbert


-- 
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