如何使用 PSTricks 绘制曲线族?

如何使用 PSTricks 绘制曲线族?

我想要使​​用命令行参数来PSTricks绘制曲线$$x^{2}-y^{2}=n^{2}$$

答案1

\documentclass[fleqn]{book}
\usepackage[top=3cm,left=3cm,right=3cm,bottom=2.5cm,a4paper]{geometry}
\usepackage{lmodern}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\usepackage{multido}
\begin{document}
\begin{figure}[h]\centering
\psset{unit=0.75}
\def\xMax{12}
\def\yMax{6}
\def\Po{300}
\begin{pspicture}(0,-\yMax)(\xMax,\yMax)
\psclip{\psframe[fillstyle=solid,fillcolor=gray!10,linestyle=none](0,-\yMax)(\xMax,\yMax)}
\psline(-\xMax,0)(\xMax,0)
\psline(0,-\yMax)(0,\yMax)
\multido{\n=0+1,\i=9+9}{10}{
\psplot[linewidth=1.5pt,plotpoints=\Po,plotstyle=line,algebraic=true,linecolor=black!\i]{\n}{2\n}{sqrt(x^2-\n^2)}%
\psplot[linewidth=1.5pt,plotpoints=\Po,plotstyle=line,algebraic=true,linecolor=black!\i]{\n}{2\n}{-sqrt(x^2-\n^2)}}
\endpsclip
\end{pspicture}
\end{figure}
\end{document}

答案2

您可能想要访问 CTAN 上所有 PSTricks 扩展的页面: pstricks然后点击“base”或者“contrib”。

相关内容