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

MathGroup Archive 2001

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

Search the Archive

Re:Drawing a Washer, Polar Plot Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29742] Re:[mg29728] Drawing a Washer, Polar Plot Question
  • From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
  • Date: Fri, 6 Jul 2001 03:24:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Robert Love wanted to make a circle with a hole in it.
The code almost works.

radius1=3;
radius2=8;
step=0.1;
lst=Range[0,2p,step];
pnts=Transpose[{Sin[lst],Cos[lst]}];
poly=Polygon[Join[radius1*pnts,radius2*Reverse[pnts]]];
Show[Graphics[{RGBColor[0.4,0.8,0.4],poly}],AspectRatio®Automatic];


The next version works much better.

radius1=3;
radius2=8;
step=0.1;
lst=Range[0,2p,step];
lst=Join[lst,{First[lst]}];
pnts=Transpose[{Sin[lst],Cos[lst]}];
poly=Polygon[Join[radius1*pnts,radius2*Reverse[pnts]]];
Show[Graphics[{RGBColor[0.4,0.8,0.4],poly}],AspectRatio®Automatic];


I used this in one of my MathSource packages and found that sometimes a
little line comes through where the polygon wraps around on it self.  That
can be cured by drawing a thin rectangle on top of the thin strip.

-----------
Regards,
  Ted Ersek
  Download Mathematica tips, tricks from
  http://www.verbeia.com/mathematica/tips/Tricks.html




  • Prev by Date: Re: proof by induction?
  • Next by Date: Re: List-Operations on Heads other than List
  • Previous by thread: RE: Drawing a Washer, Polar Plot Question
  • Next by thread: RE Map