Polar contour plot in Mathematica?Plotting in polar coordinates, simple implicit curvesPlotting an implicit polar equationHow to plot a function $psi(r,theta,phi=0)$ in polar coordinates?Plotting in polar coordinates, simple implicit curvesPolar image plotInverse substitution polar-cartesianHow to plot a polar function with two variable?Offset plot in MathematicaArrayPlot in polar coordinates?

Is it alright to say good afternoon Sirs and Madams in a panel interview?

What was the intention with the Commodore 128?

Meaning and structure of headline "Hair it is: A List of ..."

Heyawacky: Ace of Cups

Unconventional examples of mathematical modelling

What would cause a nuclear power plant to break down after 2000 years, but not sooner?

What are the advantages of this gold finger shape?

Has there ever been a truly bilingual country prior to the contemporary period?

What happened after the end of the Truman Show?

What should we do with manuals from the 80s?

programming a recursive formula into Mathematica and find the nth position in the sequence

Eric Andre had a dream

How can I change the movement to Linear?

Are there any rules on how characters go from 0th to 1st level in a class?

Why do aircraft leave cruising altitude long before landing just to circle?

When does The Truman Show take place?

What allows us to use imaginary numbers?

What's the relationship betweeen MS-DOS and XENIX?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

A+ rating still unsecure by Google Chrome's opinion

What does a comma signify in inorganic chemistry?

If it isn't [someone's name]!

Regression when x and y each have uncertainties

Vegetarian dishes on Russian trains (European part)



Polar contour plot in Mathematica?


Plotting in polar coordinates, simple implicit curvesPlotting an implicit polar equationHow to plot a function $psi(r,theta,phi=0)$ in polar coordinates?Plotting in polar coordinates, simple implicit curvesPolar image plotInverse substitution polar-cartesianHow to plot a polar function with two variable?Offset plot in MathematicaArrayPlot in polar coordinates?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7












$begingroup$


I am following a text on fluid mechanics with MAPLE examples.
I want to do the following ContourPlot in Mathematica in Polar coordinates:



$$ (r^2-fraca^3r) sin^2theta$$



where $a=1$



cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2 


enter image description here



This is a ContourPlot in Polar coordinates.



$$ (r^2-fraca^3r) sin^2theta=C $$



$C$ is a constant. Notice that MAPLE requires the user to specify the values of $C$.




What is a simple, convenient way to implement polar contour plots?




Note. The picture above represents a sphere at rest in an infinite stream of an ideal fluid. The system is axially symmetric, hence we can use Polar coordinates (instead of Spherical coordinates).










share|improve this question











$endgroup$













  • $begingroup$
    Can you please list the C values as a M codes?
    $endgroup$
    – OkkesDulgerci
    8 hours ago










  • $begingroup$
    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
    $endgroup$
    – Conor Cosnett
    8 hours ago










  • $begingroup$
    they are arbitrary, I just want to make something that looks like the picture above
    $endgroup$
    – Conor Cosnett
    8 hours ago






  • 1




    $begingroup$
    Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
    $endgroup$
    – xzczd
    8 hours ago

















7












$begingroup$


I am following a text on fluid mechanics with MAPLE examples.
I want to do the following ContourPlot in Mathematica in Polar coordinates:



$$ (r^2-fraca^3r) sin^2theta$$



where $a=1$



cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2 


enter image description here



This is a ContourPlot in Polar coordinates.



$$ (r^2-fraca^3r) sin^2theta=C $$



$C$ is a constant. Notice that MAPLE requires the user to specify the values of $C$.




What is a simple, convenient way to implement polar contour plots?




Note. The picture above represents a sphere at rest in an infinite stream of an ideal fluid. The system is axially symmetric, hence we can use Polar coordinates (instead of Spherical coordinates).










share|improve this question











$endgroup$













  • $begingroup$
    Can you please list the C values as a M codes?
    $endgroup$
    – OkkesDulgerci
    8 hours ago










  • $begingroup$
    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
    $endgroup$
    – Conor Cosnett
    8 hours ago










  • $begingroup$
    they are arbitrary, I just want to make something that looks like the picture above
    $endgroup$
    – Conor Cosnett
    8 hours ago






  • 1




    $begingroup$
    Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
    $endgroup$
    – xzczd
    8 hours ago













7












7








7


2



$begingroup$


I am following a text on fluid mechanics with MAPLE examples.
I want to do the following ContourPlot in Mathematica in Polar coordinates:



$$ (r^2-fraca^3r) sin^2theta$$



where $a=1$



cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2 


enter image description here



This is a ContourPlot in Polar coordinates.



$$ (r^2-fraca^3r) sin^2theta=C $$



$C$ is a constant. Notice that MAPLE requires the user to specify the values of $C$.




What is a simple, convenient way to implement polar contour plots?




Note. The picture above represents a sphere at rest in an infinite stream of an ideal fluid. The system is axially symmetric, hence we can use Polar coordinates (instead of Spherical coordinates).










share|improve this question











$endgroup$




I am following a text on fluid mechanics with MAPLE examples.
I want to do the following ContourPlot in Mathematica in Polar coordinates:



$$ (r^2-fraca^3r) sin^2theta$$



where $a=1$



cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2 


enter image description here



This is a ContourPlot in Polar coordinates.



$$ (r^2-fraca^3r) sin^2theta=C $$



$C$ is a constant. Notice that MAPLE requires the user to specify the values of $C$.




What is a simple, convenient way to implement polar contour plots?




Note. The picture above represents a sphere at rest in an infinite stream of an ideal fluid. The system is axially symmetric, hence we can use Polar coordinates (instead of Spherical coordinates).







plotting coordinate-transformation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 hours ago







Conor Cosnett

















asked 8 hours ago









Conor CosnettConor Cosnett

3,62910 silver badges33 bronze badges




3,62910 silver badges33 bronze badges














  • $begingroup$
    Can you please list the C values as a M codes?
    $endgroup$
    – OkkesDulgerci
    8 hours ago










  • $begingroup$
    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
    $endgroup$
    – Conor Cosnett
    8 hours ago










  • $begingroup$
    they are arbitrary, I just want to make something that looks like the picture above
    $endgroup$
    – Conor Cosnett
    8 hours ago






  • 1




    $begingroup$
    Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
    $endgroup$
    – xzczd
    8 hours ago
















  • $begingroup$
    Can you please list the C values as a M codes?
    $endgroup$
    – OkkesDulgerci
    8 hours ago










  • $begingroup$
    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
    $endgroup$
    – Conor Cosnett
    8 hours ago










  • $begingroup$
    they are arbitrary, I just want to make something that looks like the picture above
    $endgroup$
    – Conor Cosnett
    8 hours ago






  • 1




    $begingroup$
    Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
    $endgroup$
    – xzczd
    8 hours ago















$begingroup$
Can you please list the C values as a M codes?
$endgroup$
– OkkesDulgerci
8 hours ago




$begingroup$
Can you please list the C values as a M codes?
$endgroup$
– OkkesDulgerci
8 hours ago












$begingroup$
cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
$endgroup$
– Conor Cosnett
8 hours ago




$begingroup$
cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2
$endgroup$
– Conor Cosnett
8 hours ago












$begingroup$
they are arbitrary, I just want to make something that looks like the picture above
$endgroup$
– Conor Cosnett
8 hours ago




$begingroup$
they are arbitrary, I just want to make something that looks like the picture above
$endgroup$
– Conor Cosnett
8 hours ago




1




1




$begingroup$
Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
$endgroup$
– xzczd
8 hours ago




$begingroup$
Strongly related, if not duplicate: mathematica.stackexchange.com/q/67261/1871
$endgroup$
– xzczd
8 hours ago










5 Answers
5






active

oldest

votes


















11












$begingroup$

You can use TransformedField to get a function that can be used as the first argument of ContourPlot:



 f = (r^2 - a^3/r) Sin[t]^2;
tf = TransformedField[ "Polar" -> "Cartesian", f, r, t -> x, y]

TeXForm @ tf



$fracy^2 left(x^2 sqrtx^2+y^2+y^2 sqrtx^2+y^2-1right)left(x^2+y^2right)^3/2$




cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
a = 1;

ContourPlot[tf, x, -3, 3, y, -3, 3,
Contours -> cValues,
PlotPoints-> 200,
Axes -> True,
Frame -> False,
PlotRange -> All,
ContourShading -> None,
AspectRatio -> Automatic,
RegionFunction -> (Norm[#, #2] <= 3&)]


enter image description here



An alternative approach is to use f with ContourPlot and post-process the output to transform the lines:



cp1 = ContourPlot[f, r, 0, 3, t, -Pi, Pi, 
Contours -> cValues, PlotRange -> All,
ContourShading -> None, Axes -> True,
Frame -> False, ImageSize -> 300];

cp2 = Show[cp1 /. GraphicsComplex[c_, rest___] :>
GraphicsComplex[c /. a_, b_ :> (a Cos[b], Sin[b]), rest],
AspectRatio -> Automatic, ImageSize -> 300];

Row[cp, cp2, Spacer[15]]


enter image description here






share|improve this answer











$endgroup$














  • $begingroup$
    See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
    $endgroup$
    – Michael E2
    46 mins ago


















7












$begingroup$

Using MeshFunctions and Mesh in a ParametricPlot of polar coordinates to define the contours:



cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
Block[a = 1,
ParametricPlot[r Cos[[Theta]], Sin[[Theta]],
r, 0, 3 a, [Theta], 0, 2 Pi,
PlotStyle -> None, BoundaryStyle -> None, PlotPoints -> 60, 120,
MeshFunctions ->
Function[x, y, r, [Theta], (r^2 - a^3/r) Sin[[Theta]]^2],
Mesh -> cValues,
MeshStyle -> Directive[ColorData[97][1], AbsoluteThickness[1.6]],
PlotRange -> All, -2, 2, Method -> "BoundaryOffset" -> True]
]


enter image description here






share|improve this answer









$endgroup$






















    6












    $begingroup$

    Here is how to do the coordinate system conversion by hand:



    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 
    3.2;

    ContourPlot[
    (Norm[x, y]^2 - 3/Norm[x, y]) Sin[ArcTan[x, y]]^2,
    x, -3, 3,
    y, -3, 3,
    Contours -> cValues
    ]


    Mathematica graphics






    share|improve this answer









    $endgroup$






















      5












      $begingroup$

      As mentioned above, I think this problem may be considered as a duplicate, but let me show the usage of my implicitPlot anyway:



      cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;

      With[a = 1,
      implicitPlot[(r^2 - a^3/r) Sin[theta]^2, r, 0, 3, theta, 0, 2 Pi, "Polar",
      PlotPoints -> 25, Contours -> cValues]]


      enter image description here



      You can of course create the graphic in a way more similar to Maple:



      With[a = 1, 
      implicitPlot[(r^2 - a^3/r) Sin[theta]^2 == #1, r, 0, 3, theta, 0, 2 π, "Polar",
      PlotPoints -> 51, AspectRatio -> Automatic] & /@ cValues // Show]


      enter image description here






      share|improve this answer









      $endgroup$






















        4












        $begingroup$

        Here is an alternative way. We can solve for r and plot $[theta,r]$.



        Solve[(r^2 - a^3/r) Sin[θ]^2 == g, r]



        $leftleftrto fracsqrt[3]2 gsqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )+fraccsc ^2(theta )
        sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )3 sqrt[3]2right,\
        leftrto -fracleft(1+i
        sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1-i sqrt3right)
        csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6 sqrt[3]2right,\
        leftrto
        -fracleft(1-i sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1+i
        sqrt3right) csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6
        sqrt[3]2rightright$




        Let's take real solution.



        r[g_, θ_] := (
        2^(1/3) g)/(27 Sin[θ]^6 +
        Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3) + (
        Csc[θ]^2 (27 Sin[θ]^6 +
        Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3))/(
        3 2^(1/3))

        ListPolarPlot[
        Table[θ, r[#, θ], θ, 0.01, 2 π, 0.05] & /@
        cValues // Chop, AspectRatio -> Automatic,
        PlotRange -> -3, 3, -2, 2, Joined -> True]


        enter image description here



        Or use PolarPlot



        PolarPlot[r[#, θ], θ, 0.01, 2 π, 
        AspectRatio -> Automatic, PlotRange -> -3, 3, -2, 2,
        PlotPoints -> 1000] & /@ cValues // Show


        enter image description here






        share|improve this answer











        $endgroup$

















          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "387"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f203867%2fpolar-contour-plot-in-mathematica%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          11












          $begingroup$

          You can use TransformedField to get a function that can be used as the first argument of ContourPlot:



           f = (r^2 - a^3/r) Sin[t]^2;
          tf = TransformedField[ "Polar" -> "Cartesian", f, r, t -> x, y]

          TeXForm @ tf



          $fracy^2 left(x^2 sqrtx^2+y^2+y^2 sqrtx^2+y^2-1right)left(x^2+y^2right)^3/2$




          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
          a = 1;

          ContourPlot[tf, x, -3, 3, y, -3, 3,
          Contours -> cValues,
          PlotPoints-> 200,
          Axes -> True,
          Frame -> False,
          PlotRange -> All,
          ContourShading -> None,
          AspectRatio -> Automatic,
          RegionFunction -> (Norm[#, #2] <= 3&)]


          enter image description here



          An alternative approach is to use f with ContourPlot and post-process the output to transform the lines:



          cp1 = ContourPlot[f, r, 0, 3, t, -Pi, Pi, 
          Contours -> cValues, PlotRange -> All,
          ContourShading -> None, Axes -> True,
          Frame -> False, ImageSize -> 300];

          cp2 = Show[cp1 /. GraphicsComplex[c_, rest___] :>
          GraphicsComplex[c /. a_, b_ :> (a Cos[b], Sin[b]), rest],
          AspectRatio -> Automatic, ImageSize -> 300];

          Row[cp, cp2, Spacer[15]]


          enter image description here






          share|improve this answer











          $endgroup$














          • $begingroup$
            See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
            $endgroup$
            – Michael E2
            46 mins ago















          11












          $begingroup$

          You can use TransformedField to get a function that can be used as the first argument of ContourPlot:



           f = (r^2 - a^3/r) Sin[t]^2;
          tf = TransformedField[ "Polar" -> "Cartesian", f, r, t -> x, y]

          TeXForm @ tf



          $fracy^2 left(x^2 sqrtx^2+y^2+y^2 sqrtx^2+y^2-1right)left(x^2+y^2right)^3/2$




          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
          a = 1;

          ContourPlot[tf, x, -3, 3, y, -3, 3,
          Contours -> cValues,
          PlotPoints-> 200,
          Axes -> True,
          Frame -> False,
          PlotRange -> All,
          ContourShading -> None,
          AspectRatio -> Automatic,
          RegionFunction -> (Norm[#, #2] <= 3&)]


          enter image description here



          An alternative approach is to use f with ContourPlot and post-process the output to transform the lines:



          cp1 = ContourPlot[f, r, 0, 3, t, -Pi, Pi, 
          Contours -> cValues, PlotRange -> All,
          ContourShading -> None, Axes -> True,
          Frame -> False, ImageSize -> 300];

          cp2 = Show[cp1 /. GraphicsComplex[c_, rest___] :>
          GraphicsComplex[c /. a_, b_ :> (a Cos[b], Sin[b]), rest],
          AspectRatio -> Automatic, ImageSize -> 300];

          Row[cp, cp2, Spacer[15]]


          enter image description here






          share|improve this answer











          $endgroup$














          • $begingroup$
            See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
            $endgroup$
            – Michael E2
            46 mins ago













          11












          11








          11





          $begingroup$

          You can use TransformedField to get a function that can be used as the first argument of ContourPlot:



           f = (r^2 - a^3/r) Sin[t]^2;
          tf = TransformedField[ "Polar" -> "Cartesian", f, r, t -> x, y]

          TeXForm @ tf



          $fracy^2 left(x^2 sqrtx^2+y^2+y^2 sqrtx^2+y^2-1right)left(x^2+y^2right)^3/2$




          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
          a = 1;

          ContourPlot[tf, x, -3, 3, y, -3, 3,
          Contours -> cValues,
          PlotPoints-> 200,
          Axes -> True,
          Frame -> False,
          PlotRange -> All,
          ContourShading -> None,
          AspectRatio -> Automatic,
          RegionFunction -> (Norm[#, #2] <= 3&)]


          enter image description here



          An alternative approach is to use f with ContourPlot and post-process the output to transform the lines:



          cp1 = ContourPlot[f, r, 0, 3, t, -Pi, Pi, 
          Contours -> cValues, PlotRange -> All,
          ContourShading -> None, Axes -> True,
          Frame -> False, ImageSize -> 300];

          cp2 = Show[cp1 /. GraphicsComplex[c_, rest___] :>
          GraphicsComplex[c /. a_, b_ :> (a Cos[b], Sin[b]), rest],
          AspectRatio -> Automatic, ImageSize -> 300];

          Row[cp, cp2, Spacer[15]]


          enter image description here






          share|improve this answer











          $endgroup$



          You can use TransformedField to get a function that can be used as the first argument of ContourPlot:



           f = (r^2 - a^3/r) Sin[t]^2;
          tf = TransformedField[ "Polar" -> "Cartesian", f, r, t -> x, y]

          TeXForm @ tf



          $fracy^2 left(x^2 sqrtx^2+y^2+y^2 sqrtx^2+y^2-1right)left(x^2+y^2right)^3/2$




          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
          a = 1;

          ContourPlot[tf, x, -3, 3, y, -3, 3,
          Contours -> cValues,
          PlotPoints-> 200,
          Axes -> True,
          Frame -> False,
          PlotRange -> All,
          ContourShading -> None,
          AspectRatio -> Automatic,
          RegionFunction -> (Norm[#, #2] <= 3&)]


          enter image description here



          An alternative approach is to use f with ContourPlot and post-process the output to transform the lines:



          cp1 = ContourPlot[f, r, 0, 3, t, -Pi, Pi, 
          Contours -> cValues, PlotRange -> All,
          ContourShading -> None, Axes -> True,
          Frame -> False, ImageSize -> 300];

          cp2 = Show[cp1 /. GraphicsComplex[c_, rest___] :>
          GraphicsComplex[c /. a_, b_ :> (a Cos[b], Sin[b]), rest],
          AspectRatio -> Automatic, ImageSize -> 300];

          Row[cp, cp2, Spacer[15]]


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago

























          answered 6 hours ago









          kglrkglr

          211k10 gold badges242 silver badges485 bronze badges




          211k10 gold badges242 silver badges485 bronze badges














          • $begingroup$
            See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
            $endgroup$
            – Michael E2
            46 mins ago
















          • $begingroup$
            See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
            $endgroup$
            – Michael E2
            46 mins ago















          $begingroup$
          See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
          $endgroup$
          – Michael E2
          46 mins ago




          $begingroup$
          See also mathematica.stackexchange.com/a/67275/4999 for @Kuba's use of TransformedField in this way.
          $endgroup$
          – Michael E2
          46 mins ago













          7












          $begingroup$

          Using MeshFunctions and Mesh in a ParametricPlot of polar coordinates to define the contours:



          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
          Block[a = 1,
          ParametricPlot[r Cos[[Theta]], Sin[[Theta]],
          r, 0, 3 a, [Theta], 0, 2 Pi,
          PlotStyle -> None, BoundaryStyle -> None, PlotPoints -> 60, 120,
          MeshFunctions ->
          Function[x, y, r, [Theta], (r^2 - a^3/r) Sin[[Theta]]^2],
          Mesh -> cValues,
          MeshStyle -> Directive[ColorData[97][1], AbsoluteThickness[1.6]],
          PlotRange -> All, -2, 2, Method -> "BoundaryOffset" -> True]
          ]


          enter image description here






          share|improve this answer









          $endgroup$



















            7












            $begingroup$

            Using MeshFunctions and Mesh in a ParametricPlot of polar coordinates to define the contours:



            cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
            Block[a = 1,
            ParametricPlot[r Cos[[Theta]], Sin[[Theta]],
            r, 0, 3 a, [Theta], 0, 2 Pi,
            PlotStyle -> None, BoundaryStyle -> None, PlotPoints -> 60, 120,
            MeshFunctions ->
            Function[x, y, r, [Theta], (r^2 - a^3/r) Sin[[Theta]]^2],
            Mesh -> cValues,
            MeshStyle -> Directive[ColorData[97][1], AbsoluteThickness[1.6]],
            PlotRange -> All, -2, 2, Method -> "BoundaryOffset" -> True]
            ]


            enter image description here






            share|improve this answer









            $endgroup$

















              7












              7








              7





              $begingroup$

              Using MeshFunctions and Mesh in a ParametricPlot of polar coordinates to define the contours:



              cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
              Block[a = 1,
              ParametricPlot[r Cos[[Theta]], Sin[[Theta]],
              r, 0, 3 a, [Theta], 0, 2 Pi,
              PlotStyle -> None, BoundaryStyle -> None, PlotPoints -> 60, 120,
              MeshFunctions ->
              Function[x, y, r, [Theta], (r^2 - a^3/r) Sin[[Theta]]^2],
              Mesh -> cValues,
              MeshStyle -> Directive[ColorData[97][1], AbsoluteThickness[1.6]],
              PlotRange -> All, -2, 2, Method -> "BoundaryOffset" -> True]
              ]


              enter image description here






              share|improve this answer









              $endgroup$



              Using MeshFunctions and Mesh in a ParametricPlot of polar coordinates to define the contours:



              cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;
              Block[a = 1,
              ParametricPlot[r Cos[[Theta]], Sin[[Theta]],
              r, 0, 3 a, [Theta], 0, 2 Pi,
              PlotStyle -> None, BoundaryStyle -> None, PlotPoints -> 60, 120,
              MeshFunctions ->
              Function[x, y, r, [Theta], (r^2 - a^3/r) Sin[[Theta]]^2],
              Mesh -> cValues,
              MeshStyle -> Directive[ColorData[97][1], AbsoluteThickness[1.6]],
              PlotRange -> All, -2, 2, Method -> "BoundaryOffset" -> True]
              ]


              enter image description here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 6 hours ago









              Michael E2Michael E2

              158k13 gold badges216 silver badges514 bronze badges




              158k13 gold badges216 silver badges514 bronze badges
























                  6












                  $begingroup$

                  Here is how to do the coordinate system conversion by hand:



                  cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 
                  3.2;

                  ContourPlot[
                  (Norm[x, y]^2 - 3/Norm[x, y]) Sin[ArcTan[x, y]]^2,
                  x, -3, 3,
                  y, -3, 3,
                  Contours -> cValues
                  ]


                  Mathematica graphics






                  share|improve this answer









                  $endgroup$



















                    6












                    $begingroup$

                    Here is how to do the coordinate system conversion by hand:



                    cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 
                    3.2;

                    ContourPlot[
                    (Norm[x, y]^2 - 3/Norm[x, y]) Sin[ArcTan[x, y]]^2,
                    x, -3, 3,
                    y, -3, 3,
                    Contours -> cValues
                    ]


                    Mathematica graphics






                    share|improve this answer









                    $endgroup$

















                      6












                      6








                      6





                      $begingroup$

                      Here is how to do the coordinate system conversion by hand:



                      cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 
                      3.2;

                      ContourPlot[
                      (Norm[x, y]^2 - 3/Norm[x, y]) Sin[ArcTan[x, y]]^2,
                      x, -3, 3,
                      y, -3, 3,
                      Contours -> cValues
                      ]


                      Mathematica graphics






                      share|improve this answer









                      $endgroup$



                      Here is how to do the coordinate system conversion by hand:



                      cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 
                      3.2;

                      ContourPlot[
                      (Norm[x, y]^2 - 3/Norm[x, y]) Sin[ArcTan[x, y]]^2,
                      x, -3, 3,
                      y, -3, 3,
                      Contours -> cValues
                      ]


                      Mathematica graphics







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered 7 hours ago









                      C. E.C. E.

                      54.1k3 gold badges104 silver badges212 bronze badges




                      54.1k3 gold badges104 silver badges212 bronze badges
























                          5












                          $begingroup$

                          As mentioned above, I think this problem may be considered as a duplicate, but let me show the usage of my implicitPlot anyway:



                          cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;

                          With[a = 1,
                          implicitPlot[(r^2 - a^3/r) Sin[theta]^2, r, 0, 3, theta, 0, 2 Pi, "Polar",
                          PlotPoints -> 25, Contours -> cValues]]


                          enter image description here



                          You can of course create the graphic in a way more similar to Maple:



                          With[a = 1, 
                          implicitPlot[(r^2 - a^3/r) Sin[theta]^2 == #1, r, 0, 3, theta, 0, 2 π, "Polar",
                          PlotPoints -> 51, AspectRatio -> Automatic] & /@ cValues // Show]


                          enter image description here






                          share|improve this answer









                          $endgroup$



















                            5












                            $begingroup$

                            As mentioned above, I think this problem may be considered as a duplicate, but let me show the usage of my implicitPlot anyway:



                            cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;

                            With[a = 1,
                            implicitPlot[(r^2 - a^3/r) Sin[theta]^2, r, 0, 3, theta, 0, 2 Pi, "Polar",
                            PlotPoints -> 25, Contours -> cValues]]


                            enter image description here



                            You can of course create the graphic in a way more similar to Maple:



                            With[a = 1, 
                            implicitPlot[(r^2 - a^3/r) Sin[theta]^2 == #1, r, 0, 3, theta, 0, 2 π, "Polar",
                            PlotPoints -> 51, AspectRatio -> Automatic] & /@ cValues // Show]


                            enter image description here






                            share|improve this answer









                            $endgroup$

















                              5












                              5








                              5





                              $begingroup$

                              As mentioned above, I think this problem may be considered as a duplicate, but let me show the usage of my implicitPlot anyway:



                              cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;

                              With[a = 1,
                              implicitPlot[(r^2 - a^3/r) Sin[theta]^2, r, 0, 3, theta, 0, 2 Pi, "Polar",
                              PlotPoints -> 25, Contours -> cValues]]


                              enter image description here



                              You can of course create the graphic in a way more similar to Maple:



                              With[a = 1, 
                              implicitPlot[(r^2 - a^3/r) Sin[theta]^2 == #1, r, 0, 3, theta, 0, 2 π, "Polar",
                              PlotPoints -> 51, AspectRatio -> Automatic] & /@ cValues // Show]


                              enter image description here






                              share|improve this answer









                              $endgroup$



                              As mentioned above, I think this problem may be considered as a duplicate, but let me show the usage of my implicitPlot anyway:



                              cValues = 0.00001, 0.01, 0.05, 0.1, 0.3, 0.6, 1.0, 1.5, 2.0, 2.5, 3.2;

                              With[a = 1,
                              implicitPlot[(r^2 - a^3/r) Sin[theta]^2, r, 0, 3, theta, 0, 2 Pi, "Polar",
                              PlotPoints -> 25, Contours -> cValues]]


                              enter image description here



                              You can of course create the graphic in a way more similar to Maple:



                              With[a = 1, 
                              implicitPlot[(r^2 - a^3/r) Sin[theta]^2 == #1, r, 0, 3, theta, 0, 2 π, "Polar",
                              PlotPoints -> 51, AspectRatio -> Automatic] & /@ cValues // Show]


                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered 7 hours ago









                              xzczdxzczd

                              29.1k6 gold badges82 silver badges273 bronze badges




                              29.1k6 gold badges82 silver badges273 bronze badges
























                                  4












                                  $begingroup$

                                  Here is an alternative way. We can solve for r and plot $[theta,r]$.



                                  Solve[(r^2 - a^3/r) Sin[θ]^2 == g, r]



                                  $leftleftrto fracsqrt[3]2 gsqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )+fraccsc ^2(theta )
                                  sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )3 sqrt[3]2right,\
                                  leftrto -fracleft(1+i
                                  sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1-i sqrt3right)
                                  csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6 sqrt[3]2right,\
                                  leftrto
                                  -fracleft(1-i sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1+i
                                  sqrt3right) csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6
                                  sqrt[3]2rightright$




                                  Let's take real solution.



                                  r[g_, θ_] := (
                                  2^(1/3) g)/(27 Sin[θ]^6 +
                                  Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3) + (
                                  Csc[θ]^2 (27 Sin[θ]^6 +
                                  Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3))/(
                                  3 2^(1/3))

                                  ListPolarPlot[
                                  Table[θ, r[#, θ], θ, 0.01, 2 π, 0.05] & /@
                                  cValues // Chop, AspectRatio -> Automatic,
                                  PlotRange -> -3, 3, -2, 2, Joined -> True]


                                  enter image description here



                                  Or use PolarPlot



                                  PolarPlot[r[#, θ], θ, 0.01, 2 π, 
                                  AspectRatio -> Automatic, PlotRange -> -3, 3, -2, 2,
                                  PlotPoints -> 1000] & /@ cValues // Show


                                  enter image description here






                                  share|improve this answer











                                  $endgroup$



















                                    4












                                    $begingroup$

                                    Here is an alternative way. We can solve for r and plot $[theta,r]$.



                                    Solve[(r^2 - a^3/r) Sin[θ]^2 == g, r]



                                    $leftleftrto fracsqrt[3]2 gsqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )+fraccsc ^2(theta )
                                    sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )3 sqrt[3]2right,\
                                    leftrto -fracleft(1+i
                                    sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1-i sqrt3right)
                                    csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6 sqrt[3]2right,\
                                    leftrto
                                    -fracleft(1-i sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1+i
                                    sqrt3right) csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6
                                    sqrt[3]2rightright$




                                    Let's take real solution.



                                    r[g_, θ_] := (
                                    2^(1/3) g)/(27 Sin[θ]^6 +
                                    Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3) + (
                                    Csc[θ]^2 (27 Sin[θ]^6 +
                                    Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3))/(
                                    3 2^(1/3))

                                    ListPolarPlot[
                                    Table[θ, r[#, θ], θ, 0.01, 2 π, 0.05] & /@
                                    cValues // Chop, AspectRatio -> Automatic,
                                    PlotRange -> -3, 3, -2, 2, Joined -> True]


                                    enter image description here



                                    Or use PolarPlot



                                    PolarPlot[r[#, θ], θ, 0.01, 2 π, 
                                    AspectRatio -> Automatic, PlotRange -> -3, 3, -2, 2,
                                    PlotPoints -> 1000] & /@ cValues // Show


                                    enter image description here






                                    share|improve this answer











                                    $endgroup$

















                                      4












                                      4








                                      4





                                      $begingroup$

                                      Here is an alternative way. We can solve for r and plot $[theta,r]$.



                                      Solve[(r^2 - a^3/r) Sin[θ]^2 == g, r]



                                      $leftleftrto fracsqrt[3]2 gsqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )+fraccsc ^2(theta )
                                      sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )3 sqrt[3]2right,\
                                      leftrto -fracleft(1+i
                                      sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1-i sqrt3right)
                                      csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6 sqrt[3]2right,\
                                      leftrto
                                      -fracleft(1-i sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1+i
                                      sqrt3right) csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6
                                      sqrt[3]2rightright$




                                      Let's take real solution.



                                      r[g_, θ_] := (
                                      2^(1/3) g)/(27 Sin[θ]^6 +
                                      Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3) + (
                                      Csc[θ]^2 (27 Sin[θ]^6 +
                                      Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3))/(
                                      3 2^(1/3))

                                      ListPolarPlot[
                                      Table[θ, r[#, θ], θ, 0.01, 2 π, 0.05] & /@
                                      cValues // Chop, AspectRatio -> Automatic,
                                      PlotRange -> -3, 3, -2, 2, Joined -> True]


                                      enter image description here



                                      Or use PolarPlot



                                      PolarPlot[r[#, θ], θ, 0.01, 2 π, 
                                      AspectRatio -> Automatic, PlotRange -> -3, 3, -2, 2,
                                      PlotPoints -> 1000] & /@ cValues // Show


                                      enter image description here






                                      share|improve this answer











                                      $endgroup$



                                      Here is an alternative way. We can solve for r and plot $[theta,r]$.



                                      Solve[(r^2 - a^3/r) Sin[θ]^2 == g, r]



                                      $leftleftrto fracsqrt[3]2 gsqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )+fraccsc ^2(theta )
                                      sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )3 sqrt[3]2right,\
                                      leftrto -fracleft(1+i
                                      sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1-i sqrt3right)
                                      csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6 sqrt[3]2right,\
                                      leftrto
                                      -fracleft(1-i sqrt3right) g2^2/3 sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )-fracleft(1+i
                                      sqrt3right) csc ^2(theta ) sqrt[3]sqrt729 sin ^12(theta )-108 g^3 sin ^6(theta )+27 sin ^6(theta )6
                                      sqrt[3]2rightright$




                                      Let's take real solution.



                                      r[g_, θ_] := (
                                      2^(1/3) g)/(27 Sin[θ]^6 +
                                      Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3) + (
                                      Csc[θ]^2 (27 Sin[θ]^6 +
                                      Sqrt[-108 g^3 Sin[θ]^6 + 729 Sin[θ]^12])^(1/3))/(
                                      3 2^(1/3))

                                      ListPolarPlot[
                                      Table[θ, r[#, θ], θ, 0.01, 2 π, 0.05] & /@
                                      cValues // Chop, AspectRatio -> Automatic,
                                      PlotRange -> -3, 3, -2, 2, Joined -> True]


                                      enter image description here



                                      Or use PolarPlot



                                      PolarPlot[r[#, θ], θ, 0.01, 2 π, 
                                      AspectRatio -> Automatic, PlotRange -> -3, 3, -2, 2,
                                      PlotPoints -> 1000] & /@ cValues // Show


                                      enter image description here







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited 3 hours ago

























                                      answered 5 hours ago









                                      OkkesDulgerciOkkesDulgerci

                                      6,0571 gold badge11 silver badges21 bronze badges




                                      6,0571 gold badge11 silver badges21 bronze badges






























                                          draft saved

                                          draft discarded
















































                                          Thanks for contributing an answer to Mathematica Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid


                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.

                                          Use MathJax to format equations. MathJax reference.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function ()
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f203867%2fpolar-contour-plot-in-mathematica%23new-answer', 'question_page');

                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                                          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                                          François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480