1
$\begingroup$

I recently downloaded Mathematica and am extremely new to the software. To start off, I wanted to work with Polar Coordinates and Archimedean Spirals. I want to be able to graph a continuous spiral with the coordinates (r, theta)=(n, n) where n is a positive integer. Essentially I would be creating a spiral between the points (0,0) (1,1) (2,2) (3,3) and it continues on. I would like to have a graph with just the points as well as one with a line connecting the points.

Also, is there a way to specify different ranges?

Similar to the question posed on this Math Stack Exchange.

$\endgroup$
1
  • 1
    $\begingroup$ F1 takes you to the docs. Search 'Polar'. $\endgroup$
    – Syed
    Aug 20, 2021 at 6:01

4 Answers 4

1
$\begingroup$

Another approach is as follows.

a = ListPolarPlot[{{0, 0}, {1, 1}, {2, 2}, {3, 3}},PlotStyle -> {Red, Thick}];
f = Interpolation[{{0, 0}, {1, 1}, {2, 2}, {3, 3}}];
b = PolarPlot[f[x], {x, 0, 3}];
Show[{a, b}]

enter image description here

$\endgroup$
3
  • $\begingroup$ I'd like to add that PolarPlot[f[x], {x, 0, 10}] works too. $\endgroup$
    – user64494
    Aug 20, 2021 at 7:56
  • $\begingroup$ a = ListPolarPlot[{{0, 0}, {1, 1.1}, {2.1, 2}, {3.3, 3}, {5, 5}, {8, 8.1}}, PlotStyle -> {Red, Thick}]; f = Interpolation[{{0, 0}, {1, 1.1}, {2.1, 2}, {3.3, 3}, {5, 5}, {8, 8.1}}]; b = PolarPlot[f[x], {x, 0, 13.5}]; Show[a, b, PlotRange -> All] $\endgroup$
    – cvgmt
    Aug 20, 2021 at 11:51
  • $\begingroup$ a = ListPolarPlot[{{0, 0}, {1, 1.1}, {2.1, 2}, {3.3, 3}, {5, 5}, {8, 8.1}}, PlotStyle -> {Red, Thick}]; f = = Interpolation[{{0, 0}, {1, 1.1}, {2.1, 2}, {3.3, 3}, {5, 5}, {8, 8.1}}]; b = PolarPlot[f[x], {x, 0, 10}]; Show[a, b, PlotRange -> All] works well. Everything has its limitations. $\endgroup$
    – user64494
    Aug 20, 2021 at 11:55
1
$\begingroup$

As i understand , you want this and this or this

ListPolarPlot[Table[{j, j}, {j, 0, 10}], 
   PlotStyle -> {Red, PointSize[.03]}]

ListPolarPlot[Table[{j, j}, {j, 0, 10}], Mesh -> {Range[0, 10]}, 
    MeshStyle -> {Red, PointSize[.03]}, Joined -> True]

PolarPlot[th, {th, 0, 10}, Mesh -> {Range[0, 10]}, 
   MeshStyle -> {Red, PointSize[.03]}]
$\endgroup$
1
$\begingroup$

Since you want to Archimedean Spirals,so we can set the form r == a*θ^(1/n) and then solve the equations.

polarpts = {{0, 0}, {1, 1}, {2, 2}, {3, 3}};
sol = Solve[
   r == a*θ^(1/n) /. Thread[{r, θ} -> #] & /@ polarpts, 
   Reals];
ArchimedeanSpirals = 
  PolarPlot[a*θ^(1/n) /. sol[[1]], {θ, 0, 20}, 
   MeshStyle -> Red];
Show[ArchimedeanSpirals, ListPolarPlot[polarpts, PlotStyle -> Red]]

enter image description here

Reply to comment

Here we insist on using Archimedean Spirals.

polarpts = {{1, 1.1}, {2.1, 2}, {3.3, 3}, {5, 5}, {8, 8.1}};
f = NonlinearModelFit[Reverse /@ polarpts, 
   a*θ^(1/n), {a, n}, θ];
Show[PolarPlot[f[θ], {θ, 0, 20}], 
 ListPolarPlot[polarpts, PlotStyle -> Red]]

enter image description here

$\endgroup$
2
  • $\begingroup$ The above does not work for polarpts = {{0, 0}, {1, 1.1}, {2, 2}, {3, 3}};, whereas Interpolation still does. $\endgroup$
    – user64494
    Aug 20, 2021 at 9:03
  • $\begingroup$ @user64494 But Interpolation not always be Archimedean Spirals. The question is ambiguous. $\endgroup$
    – cvgmt
    Aug 20, 2021 at 9:11
0
$\begingroup$

Look for the function FromPolarCoordinates.

Unfortunately this function doesn't transform the Point {0,0}, That's why I used my own transformation:

r\[Theta] = Table[{i, i}, {i, 0, 10}]
xy = Map[#[[1]] {Cos[#[[2]]], Sin[#[[2]]]} &, r\[Theta]];
ListPlot[{xy, xy}, Joined -> {False, True}] 

enter image description here

Hope it helps!

$\endgroup$
1
  • $\begingroup$ f = Interpolation[{{0, 0}, {1, 1}, {2, 2}, {3, 3}}];PolarPlot[f[x], {x, 0, 3}] draws a spiral along these points. $\endgroup$
    – user64494
    Aug 20, 2021 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.