# Can you fill in a closed curve? [duplicate]

Imagine I have a have a set of points that form a closed curve (or simply a circle), I normally just list plot these points and join the dots.

However, I now have the need to fill in this closed area. I could break it into two sets of curves and fill between the result, but let us pretend I have hundreds of these plots to make and want a quicker way.

-

## marked as duplicate by Mr.Wizard♦Jan 10 '14 at 10:07

Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign – Vitaliy Kaurov Feb 6 '13 at 16:33

I recommend FilledCurve. Imagine you have a set of points:

pts = {{-1, 0}, {-1, 1}, {0, 0}, {1, 1}, {1, 0}};


Compare smooth curve:

Graphics[{Pink, Thick, BSplineCurve[pts, SplineClosed -> True]}]


To its filled version:

Graphics[{Pink, EdgeForm[Directive[Black, Thick]],
FilledCurve[BSplineCurve[pts, SplineClosed -> True]]}]


I guess you need a smooth curve, because for just joined points with a filling inside even Polygon will do - and you get a smooth one with enough points:

bsf = BSplineFunction[pts, SplineClosed -> True];
dat = Table[bsf[t], {t, 0, 1, .01}];
Graphics[{Pink, EdgeForm[Directive[Black, Thick]], Polygon[dat]}]
`

-
Great, thanks for this, now I just need to make it work well with Log plots... – Jay Feb 7 '13 at 1:55