I had asked this question earlier here How to choose the correct area to fill using buildcycle in asymptote? and got the correct answer from Thruston. I have run into a similar problem, this time with a strophoid instead of ellipse.
`/* Geogebra to Asymptote conversion, documentation at artofproblemsolving.com/Wiki go to User:Azjps/geogebra */
import contour; import graph; size(7cm);
import patterns;
add("hatch",hatch(2.5mm));
string blank(real x) {return "";}
real labelscalefactor = 0.5; /* changes label-to-point distance */
pen dps = linewidth(0.7) + fontsize(10); defaultpen(dps); /* default pen style */
pen dotstyle = black; /* point style */
real xmin = -5.5, xmax = 6.86, ymin = -6, ymax = 6.9; /* image dimensions */
Label laxis; laxis.p = fontsize(10);
xaxis(-5.5, xmax, Ticks(laxis,blank, Step = 1, Size = 2, NoZero),EndArrow(6), above = true);
yaxis(-6.5, ymax, Ticks(laxis, blank, Step = 1, Size = 2, NoZero),EndArrow(6), above = true); /* draws axes; NoZero hides '0' label */
/* draw figures */
real implicitf1 (real x, real y) { return (5.0+x)*y^2-x^2*(5.0-x); }
guide[][] cf=contour(implicitf1, (xmin,ymin), (xmax,ymax), new real[]{0}, 500);
draw(cf[0][0], linewidth(1));
path p1=(5,1.5) -- (0,-6);
draw(p1,linewidth(1));
path p2=buildcycle(p1,cf[0][0]);
fill(p2,pattern("hatch"));
clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);
/* end of picture */`
Here is the resulting image. I want the other part to be shaded. Can anyone explain how buildcycle works?