Re: fill circle while using circle command
- To: mathgroup at smc.vnet.net
- Subject: [mg74251] Re: fill circle while using circle command
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Thu, 15 Mar 2007 19:07:15 -0500 (EST)
- References: <etb5pe$kfr$1@smc.vnet.net>
Why to use the Graphics command? You can achieve what you want with simple graphics programming. Before presenting the code, I will break it in its steps so that you understand the procedure. To this end Copy/Paste the following in a notebook (as a whole cell) and execute the commands. Print["here is your circle"] g = ParametricPlot[{Cos[y], Sin[y]}, { y, 0, 2*Pi}, Axes -> False, PlotStyle -> Thickness[0.01], AspectRatio -> 1]; Print["look at the InputForm of g"] Print["InputForm\[Implies] " InputForm[g]] Print["the circle is constructed by connecting\nwith Line the following points"] Cases[g, {(x_)?NumberQ, (y_)?NumberQ}, Infinity] Print["wrap the list of points to Polygon"] Polygon@%% Print["the resulting shape"] Show[Graphics[%%], AspectRatio -> 1] Note we have full access in this way. Indeed see the output of the complete code, below: Block[{$DisplayFunction = Identity}, g = ParametricPlot[{Cos[y], Sin[y]}, {y, 0, 2*Pi}, Axes -> False, PlotStyle -> Thickness[0.02]]]; Show[{g, g /. Line[x_] :> {GrayLevel[0.7], Polygon[x]}}, AspectRatio - > 1]; Best Regards Dimitris =CF/=C7 Tony Harris =DD=E3=F1=E1=F8=E5: > Hello, > > I sure would appreciate it if someone can tell me how to fill a circle > while using the Graphics command, "circle". > > Here is what I used to generate a circle centered at (2,0) with a radius > of 1. > Show[Graphics[Circle[{2, 0}, 1]]]; > > > > I tried many things that failed but it looks like it should be easy. > Thanks to anyone who can assist. > > > > T Harris