# What is the difference of the two graphs of following function?

\documentclass[border=10pt,pstricks]{standalone}
\usepackage{pst-func}
\begin{document}
\pspicture(-2,-1)(2,1)
\psplotImp[linecolor=red,algebraic](-2,-2.2)(2,2.4){%
(x^2+y^2)^2-4*(x^2)*y }
\psline{<->}(0,-1.2)(0,1.2)
\psline{<->}(-1.2,0)(1.2,0)
\endpspicture
\end{document}


\documentclass[border=10pt]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(-1.5,-1.5)(3,2)
\psline{<->}(0,-1.2)(0,1.2)
\psline{<->}(-1.2,0)(1.2,0)
\psplot[polarplot,algebraic,plotstyle=curve]{0}{Pi}{4*cos(x)^2*sin(x)}
\rput(1.75,1.5){$(x^2+y^2)^2=4x^2y$}
\psdot(1,1)
\end{pspicture}
\end{document}


Question: Why the second graph is more beautiful than the first one?

• @MoneyOrientedProgrammer Thank for your implementation.
– user173875
Jul 30 '19 at 15:17
• But I did not implement the package. Herbert Voss did. Jul 31 '19 at 13:56

You can use the option stepFactor=0.1 to decrease the pixels of your first image. See the pag. 70 of the new manual of Herbert Voss of the May 17, 2019: http://mirrors.ibiblio.org/CTAN/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf

\documentclass[border=10pt,pstricks]{standalone}
\usepackage{pst-func}
\begin{document}
\pspicture(-2,-1)(2,1)
\psplotImp[linecolor=red,stepFactor=0.1,algebraic](-2,-2.2)(2,2.4){%
(x^2+y^2)^2-4*(x^2)*y }
\psline{<->}(0,-1.2)(0,1.2)
\psline{<->}(-1.2,0)(1.2,0)
\endpspicture
\end{document}


Exclusively, just for the reason of completeness, I have also found this site where there is a discuss of a situation similar to yours. See this link: https://ipfs-sec.stackexchange.cloudflare-ipfs.com/tex/A/question/8017.html posted by Herbert Voss 9 years ago.

• \psplotImp draws the contour of F(x,y)=0 by checking each point of a rectangular grid of points whether it is on or nearly on the contour. As the dots are not connected by lines or curves, the output looks like a bitmap image (of course it is a vector graphic of dots). It is not zoom in friendly. You can increase the resolution but it will take more time to draw because there are more points to check. As far as I know, this algorithm is the easiest to implement but slow. Implicit plotting is useful if you cannot separate y from x or y from Θ.

• \psplot draw the graph of y=f(x) (rectangular) or r=f(x) (polar) by plotting a series of points each is obtained by varying the independent variable x. The dots then are connected by lines or curves. It looks good because you can zoom in as high as your viewer can support.

• Upvote your clear and exhaustive explanation. Jul 30 '19 at 22:39
• By the way, \psEquipotential uses the same slow algorithm. Aug 1 '19 at 11:27
• I know little but not as thorough as you. If you look at my questions or answers they are always very brief and go to the core. I hope the translator is clear. Aug 1 '19 at 11:40
• @Sebastiano: I like Italian grape. It is very delicious and also cheap! :-) Aug 1 '19 at 13:02
• For all points (x|y) of a line it is checked if f(x,y) is zero or switches from + to - or vice versa. If yes, then the point must be part of the implizit defined function. This is done in two loops: for all points of a line and all lines. Aug 3 '19 at 19:19