This question is a follow-up question to half of a hyperbola.

When constructing a hyperbola in TikZ, how can I specify the eccentricity to be 1.44022?

  • 1
    If the equation for the hyperbola is $x^2/a^2 - y^2/b^2 = 1$, then the eccentricity is $\sqrt{a^2 + b^2}/a$. Choose $a$ and $b$ appropriately. – Matthew Leingang Apr 16 '13 at 1:38

Two quantities out of a, b, and e (the eccentricity) determine the hyperbola. You can, for example, define e(>1) and a(>0), from which you can then derive b. See below.

EDIT: see this link, which explains my parameterisation.

enter image description here



    \pgfmathsetmacro{\e}{1.44022}   % eccentricity
    \draw plot[domain=-2:2] ({\a*cosh(\x)},{\b*sinh(\x)});
    \draw plot[domain=-2:2] ({-\a*cosh(\x)},{\b*sinh(\x)});
  • I would recommend using pgfplots for these types of problems- you don't have to change your code very much to do it :) – cmhughes Apr 16 '13 at 3:10
  • @Jubobs how are you using hyperbolic trig functions for a hyperbola? – dustin Apr 16 '13 at 3:13
  • 1
    @dustin trigonometric functions are used for circles and ellipses: (x/a)^2+(y/b)^2=1 because of the Pythagorean identity sin^2(\theta)+cos^2(\theta)=1. Hyperbolic functions are used for Hyperbolae because they satisfy the identity cosh^2(x)-sinh^2(x)=1 – cmhughes Apr 16 '13 at 3:29
  • @Jubobs postaction = decorate doesn't work on this type of tikz picture? I just tried decorating the hyperbola with arrows at 20 and 60 percent but nothing happened. – dustin Apr 16 '13 at 4:12
  • @dustin Your original post does not mention position=decorate. You should either edit this question to explain your position=decorate problem or post another question dedicated to it. – jub0bs Apr 16 '13 at 8:46

With PSTricks.

enter image description here


\FPset\E{1.440}% 3 digits should be enough



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.