# Plot the following parametric equation on latex using PSTricks:

x = (cos(t^2))(1 - sint); y = (sin(t^2))(1 + cost); -2/pi ≤ t ≤ 2/pi ; The following was my approach to this

\documentclass{article}
\usepackage{pstricks,pst-plot}
\title{\textbf{\LARGE {Assignment}}}
\author{\emph {NEHA MALIK}}
\begin{document}
\begin{pspicture}[showgrid=true](-5,-5)(5,5)
\psaxes{<->}(0,0)(-4.5,-4.5)(4.5,4.5)
\psparametricplot[linecolor=green]{-360}{360}{t 2 exp cos 1 t sin sub mul t 2 exp sin 1 t cos add mul}
\end{pspicture}
\end{document}


I have to use only \psparametricplot for it and I am new to it. Can someone help?? I am attaching what I got and what the output graph should look like.

• Welcome to TeX.SE! Please show us your short compilable tex code you have so far ... Commented Nov 26, 2021 at 20:14
• here is what I tried: \begin{pspicture}[showgrid=true](-5,-5)(5,5) \psaxes{<->}(0,0)(-4.5,-4.5)(4.5,4.5) \psparametricplot[linecolor=green]{-360}{360}{t 2 exp cos 1 t sin sub mul t 2 exp sin 1 t cos add mul} \end{pspicture} Commented Nov 27, 2021 at 21:12

There are two issues here: First PostScript works in degrees, while you want radians. You tried to compensate by adjusting the limits, but e.g. sin(360^2) in degrees is something completely different than sin((2pi)^2) in radians.

This can be fixed by converting from radians to degrees before running sin or cos by adding RadtoDeg.

\RequirePackage{pdfmanagement-testphase}
\documentclass{article}
\usepackage{pstricks,pst-plot}
\title{\textbf{\LARGE {Assignment}}}
\author{\emph {NEHA MALIK}}
\begin{document}
\begin{pspicture}[showgrid=true](-5,-5)(5,5)
\psaxes{<->}(0,0)(-4.5,-4.5)(4.5,4.5)
\end{pspicture}
\end{document}


This produces

As you can see, the pst-plot default of evaluating a plot at 50 points is highly inadequate for this function. It looks better if we increase the number of points to 1500 with plotpoints=1500:

\documentclass{article}
\usepackage{pstricks,pst-plot}
\title{\textbf{\LARGE {Assignment}}}
\author{\emph {NEHA MALIK}}
\begin{document}
\begin{pspicture}[showgrid=true](-5,-5)(5,5)
\psaxes{<->}(0,0)(-4.5,-4.5)(4.5,4.5)
\end{pspicture}
\end{document}



• Got it! Thank you soo muchh. 🙏 Commented Nov 30, 2021 at 5:12

Is it what you want?

\documentclass[svgnames, pstricks, border=10pt]{standalone}
\usepackage{pst-plot}

\begin{document}

\begin{pspicture}(-4.4,-4.4)(6,6)
\psset{unit=4cm, algebraic, plotpoints=100, showorigin=false}
\psaxes[labelFontSize=\scriptstyle,ticksize=0 4pt]{->}(0,0)(-1.1,-1.1)(1.5,1.5)[$x$,-120][$y$,210]
\psset{linewidth=1.5pt,algebraic, linecolor=IndianRed}
\psparametricplot{-0.6366}{0.6366}{cos(t^2)*(1-sin(t)) | sin(t^2)*(1 + cos(t))}
\end{pspicture}

\end{document}


• No... I tried finding the correct output and desmos says it is different from this. Commented Nov 27, 2021 at 21:16
• @BinodKumar: Strange… There's no error message when I compile this code. Could you post how it should look like, according to Desmos? Commented Nov 27, 2021 at 22:04
• Edited the question... Check it again please. Commented Nov 30, 2021 at 5:22