1

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. First one is my output and next to it is the correct one.

2
  • 1
    Welcome to TeX.SE! Please show us your short compilable tex code you have so far ...
    – Mensch
    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

2 Answers 2

2

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}
\DeclareDocumentMetadata{}
\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]{2 Pi mul neg}{2 Pi mul}{t 2 exp RadtoDeg cos 1 t RadtoDeg sin sub mul t 2 exp RadtoDeg sin 1 t RadtoDeg cos add mul} 
\end{pspicture} 
\end{document}

This produces enter image description here

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)
\psparametricplot[linecolor=green,plotpoints=1500]{2 Pi mul neg}{2 Pi mul}{t 2 exp RadtoDeg cos 1 t RadtoDeg sin sub mul t 2 exp RadtoDeg sin 1 t RadtoDeg cos add mul} 
\end{pspicture} 
\end{document}

enter image description here

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

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} 

enter image description here

3
  • 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?
    – Bernard
    Commented Nov 27, 2021 at 22:04
  • Edited the question... Check it again please. Commented Nov 30, 2021 at 5:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .