
この質問は、双曲線の半分。
TikZ で双曲線を作成するときに、離心率を に指定するにはどうすればよいですか1.44022
?
答え1
a、b、e (離心率) のうちの 2 つの量によって双曲線が決まります。たとえば、e(>1) と a(>0) を定義して、そこから b を導き出すことができます。以下を参照してください。
編集: こちらを参照リンク、これが私のパラメータ化を説明しています。
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=1]
\pgfmathsetmacro{\e}{1.44022} % eccentricity
\pgfmathsetmacro{\a}{1}
\pgfmathsetmacro{\b}{(\a*sqrt((\e)^2-1)}
\draw plot[domain=-2:2] ({\a*cosh(\x)},{\b*sinh(\x)});
\draw plot[domain=-2:2] ({-\a*cosh(\x)},{\b*sinh(\x)});
\end{tikzpicture}
\end{document}
答え2
PSTricks を使用。
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-plot,pst-math}
\usepackage[nomessages]{fp}
\FPset\E{1.440}% 3 digits should be enough
\FPset\A{1}
\FPeval\B{round(A*root(2,E^2-1):3)}
\def\X(#1){\A*COSH(#1)}
\def\Y(#1){\B*SINH(#1)}
\psset{algebraic}
\begin{document}
\begin{pspicture}(-6,-4)(6,4)
\psaxes{->}(0,0)(-6,-4)(5.5,3.5)[$x$,0][$y$,90]
\psset{linecolor=blue}
\psparametricplot{-2}{2}{\X(t)|\Y(t)}
\psparametricplot{-2}{2}{-\X(t)|\Y(t)}
\end{pspicture}
\end{document}