Re: Drawing a Washer, Polar Plot Question

*To*: mathgroup at smc.vnet.net*Subject*: [mg29736] Re: [mg29728] Drawing a Washer, Polar Plot Question*From*: BobHanlon at aol.com*Date*: Thu, 5 Jul 2001 06:08:01 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

In a message dated 2001/7/4 6:56:32 PM, rlove at antispam.neosoft.com writes: >I have a polar plot of my data that lookes the way I want. Now >I want to add a grey "washer" shaped exclusion zone on top of >the plot. I see there is a nice Disk two dimensional graphics >object that is almost what I want. It draws a filled in circle >centered on {x,y} of radius r. What I want is some thing that >draws a filled in circle between r1 and r2, centered on {x,y}. >Is there some way I can do this easily? I've tried combining two >Disks of different colors and sizes but no luck. > One approach: Needs["Graphics`Graphics`"]; Needs["Graphics`Colors`"]; Needs["Graphics`InequalityGraphics`"]; doughnut[{x0_, y0_}, r1_?Positive, r2_?Positive, opts___?OptionQ] := Module[{x, y, rminSq = Min[r1, r2]^2, rmax = Max[r1, r2], rmaxSq}, rmaxSq = rmax^2; InequalityPlot[ rminSq<=((x-x0)^2+(y-y0)^2)<=rmaxSq, {x,x0-rmax,x0+rmax}, {y,y0-rmax,y0+rmax} ]]; DisplayTogether[ PolarPlot[{4/(2+Cos[t]),4 Cos[t]-2}, {t,0,2 Pi}, PlotStyle -> Red], doughnut[{-1, -1}, 2, 3]]; Bob Hanlon Chantilly, VA USA