Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: fill circle while using circle command 2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74259] Re: fill circle while using circle command 2
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Thu, 15 Mar 2007 19:11:36 -0500 (EST)
  • References: <etb5pe$kfr$1@smc.vnet.net>

Of course you can avoid the graphics programming!

But I think it can have much fun!

Needs["Graphics`Colors`"]

Block[{$DisplayFunction = Identity}, g = ParametricPlot[{Cos[y],
Sin[y]}, {y, 0, 2*Pi}, Axes -> False]];
fil[opts___] := Show[{g, Graphics[g /. Line[x_] :> {opts,
Polygon[x]}]}, AspectRatio -> 1]

fil[];
fil[Red];
fil[Blue];

And

fil[Hue[#/13]] & /@ Range[1, 10, 0.5];
SelectionMove[EvaluationNotebook[], All, GeneratedCell];;
FrontEndTokenExecute["CellGroup"]
FrontEndTokenExecute["OpenCloseGroup"]

Double click above the graphic to get an animation!

Anyway as David Park showed me you can use something more easy to
understand!

Needs["Graphics`Colors`"]

circlepoints = Table[{Cos[y],
  Sin[y]} //  N, {y, 0, 2 Pi, 2Pi/100}];
Show[Graphics[ {LightCoral, Polygon[circlepoints], Black,
AbsoluteThickness[2],
   Line[circlepoints]}], AspectRatio -> Automatic];


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



  • Prev by Date: Re: Multiple regressions
  • Next by Date: Re: fill circle while using circle command
  • Previous by thread: Re: Initialization cell appearance
  • Next by thread: Mathematica 4.0