Folium of Descartes

You can fill if you use \parametricplot:

\documentclass[10pt,x11names]{article}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}
\pagestyle{empty}

\begin{document}

\begin{figure}[!ht]
\centering
\psset{algebraic=true,dimen=middle,dotstyle=o,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25,unit=3,plotpoints=2000}
\begin{pspicture*}(-2,-2)(2,2)
 \psset{linecolor=SteelBlue4, linewidth=1.2pt}
 \pscustom[fillstyle=solid, fillcolor=lightgray!25!LightSteelBlue2!10!]{
 \parametricplot{-0.99}{0}{3*t/(1 + t^3) | 3*t^2/(1 + t^3)}
 \parametricplot{-600}{-1.01}{3*t/(1 + t^3) | 3*t^2/(1 + t^3)}
 }
\pscustom[fillstyle=solid, fillcolor=LightSteelBlue2!25! ]{
 \parametricplot{0}{200}{3*t/(1 + t^3) | 3*t^2/(1 + t^3)}
 }
 \psline[linewidth=0.4pt, linecolor=black](-2.5; 45)(2.5 ; 45)
 \psline[linewidth=0.4pt, linecolor=black](-2,1)(2,-3)
\psaxes[linecolor=gray,xAxis=true,yAxis=true,labels=none,ticks=none]{->}(0,0)(-2,-2)(2,2)
\end{pspicture*}
\caption{Folium of Descartes}
\end{figure}

\end{document} 

enter image description here


Done with mfpic, a LaTeX interface to MetaPost. To draw the folium you can use the cartesian form directly, thanks to the handy \levelcurve command of this package, so long as you write it as an inequation and you provide a point that verifies this inequation (here (1, 1)). The resulting curve is filled with the \gfill command with the desired color as an option.

\documentclass{standalone}
\usepackage[metapost]{mfpic}
  \setlength{\mfpicunit}{1cm}
  \opengraphsfile{\jobname}
\begin{document}
\begin{mfpic}[2]{-0.5}{2}{-0.5}{2}
  \draw\gfill[blue+green]\levelcurve{(1, 1), 0.01}{y**3 - 3x*y + x**3 < 0}
  \doaxes{xy}
\end{mfpic}
\closegraphsfile
\end{document}

To be compiled first with (PDF)LaTeX, then with MetaPost, and finally with (PDF)LaTeX. The result is as follows:

enter image description here


In Metapost, you could just make the folium a closed path and fill it.

enter image description here

I've used the (rather simpler) polar form of the equation below.

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

u := 2cm;

path xx, yy, folium;

xx = (1/2 left -- 2 right) scaled u;
yy = (1/2 down -- 2 up)    scaled u;

drawarrow xx withcolor .4 white;
drawarrow yy withcolor .4 white;

folium = (origin 
  for theta=1 step 1  until 89:  
    -- (3*sind(theta)*cosd(theta)/(sind(theta)**3+cosd(theta)**3),0) rotated theta
  endfor 
  -- cycle) scaled u;

fill folium withcolor .9[blue,white];
draw folium withcolor .67 blue;

endfig;
end.

And here's a fuller version, with the equation moved to a function, and showing how to extend the folium and pick out the loop as a sub path of it.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(2);

u := 2cm;

path xx, yy, folium, loop, asymptote;

xx = (2 left -- 2 right) scaled u;
yy = (2 down -- 2 up)    scaled u;

drawarrow xx withcolor .4 white;
drawarrow yy withcolor .4 white;

% "a" is the scale factor
a = 1;
vardef r(expr t) = right scaled (3*a*sind(t)*cosd(t)/(sind(t)**3+cosd(t)**3)) 
                         rotated t enddef;

% define the folium with some wings 
b = 30; % should be less than 45
folium = (r(-b) for theta=1-b step 1 until 89+b: -- r(theta) endfor -- r(90+b)) scaled u;

% define the loop to be the part from theta=0 to theta=90
loop = subpath(b,b+89) of folium -- cycle;

% define an appropriate segment of the asymptote
asymptote = ( xpart point 0        of folium,    -xpart point 0        of folium-a*u) 
         -- (-ypart point infinity of folium-a*u, ypart point infinity of folium    );

% now draw them
fill loop withcolor .9[blue,white];
draw folium withcolor .67 blue;
draw asymptote dashed evenly;

endfig;
end.