Re: Shading in polar plot
- To: mathgroup at smc.vnet.net
- Subject: [mg107879] Re: [mg107857] Shading in polar plot
- From: "David Park" <djmpark at comcast.net>
- Date: Mon, 1 Mar 2010 08:05:40 -0500 (EST)
- References: <19509473.1267436979165.JavaMail.root@n11>
PolarPlot doesn't have a Filling option. But the plot is not too difficult with the Presentations package. To obtain the fills, we first draw r versus t between the limits where the lemniscates intersects the circle, which can be solved for. We can use filling there. Then we transform the result from the t-r plane to the x-y plane using DrawingTransform. We do this for each side, combine with a PolarDraw and we have your plot. Needs["Presentations`Master`"] trfill = Draw[{Sqrt[6 Cos[2 t]], Sqrt[3]}, {t, -\[Pi]/6, \[Pi]/6}, Filling -> {1 -> {2}}, FillingStyle -> LightBlue]; Draw2D[ {PolarDraw[{Sqrt[3], Sqrt[6 Cos[2 t]], -Sqrt[6 Cos[2 t]]}, {t, 0, 2 Pi}], trfill /. DrawingTransform[#2 Cos[#1] &, #2 Sin[#1] &], trfill /. DrawingTransform[-#2 Cos[#1] &, #2 Sin[#1] &]}, AspectRatio -> Automatic, Frame -> True, ImageSize -> 300] David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: Jon Joseph [mailto:josco.jon at gmail.com] All: I would like to shade the area outside of the circle Sqrt[3] and inside the lemniscate r^2=6Cos[2 t]. Can this be done using PolarPlot and mesh functions or is something else needed? PolarPlot[{Sqrt[3], Sqrt[6 Cos[2 t]], -Sqrt[6 Cos[2 t]]}, {t, 0, 2 Pi}] Shows the curves without the shading. Jon