
이 질문은 후속 질문입니다.쌍곡선의 절반.
TikZ에서 쌍곡선을 구성할 때 이심률을 어떻게 지정합니까 1.44022
?
답변1
a, b, e 중 두 개의 양(이심률)이 쌍곡선을 결정합니다. 예를 들어, 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}