타원 대신 쌍곡선. 타원에 대한 아래 코드를 참고하세요. 및 과장법에 대한 유사한 코드가 있습니까?

타원 대신 쌍곡선. 타원에 대한 아래 코드를 참고하세요. 및 과장법에 대한 유사한 코드가 있습니까?
\documentclass[11pt,a4paper]{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[scale=1];

\draw (0,0) ellipse (5 and 3);

\end{tikzpicture}

\end{document}

답변1

이는 pgfplots패키지와 파라메트릭 플롯을 수행하는 기능을 사용합니다.

쌍곡선은 매개변수를 통해 다음과 같이 정의될 수 있습니다.

x = a*cosh(t)
y = b*sinh(t)

a 및 b는 '주' 및 '부' 축 매개변수를 의미합니다.

\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\usepackage{pgfplots}




\pgfplotsset{compat=1.12,
  grid=none,
  axis lines=none,
  width=8cm,
  height=8cm,
  scale only axis,
}
\begin{document}


\begin{tikzpicture}[scale=1];

%\draw (0,0) ellipse (5 and 3);
\begin{axis}
\addplot[samples=201,domain=-1:1,variable=\t]({2*cosh(t)},{1*sinh(t)});
\addplot[samples=201,domain=-1:1,variable=\t]({-2*cosh(t)},{1*sinh(t)}); % left hyperbolic branch

\addplot[samples=201,domain=0:360,variable=\t]({5*cos(t)},{3*sin(t)}); % Draw the ellipse

\end{axis}

\end{tikzpicture}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보