1

I would like to have the command line arguments in PSTricks to sketch the curve $$x^{2}-y^{2}=n^{2}$$.

2
\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}
0

You may want to visit the page of all PSTricks extensions on CTAN: pstricks and then, click on "base" or "contrib".

Your Answer

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