# Pentagonal spiral in Mathematica

I would like to plot an image of what I call a pentagonal spiral with Mathematica. A sample image of what I'd like to obtain is this (sorry for low-quality):

My initial idea was to get some kind of spiral and reduce the number of PlotPoints, but I just can't seem to get a decent accuracy using either an Archimedes sor a log spiral. The actual attempts are quite dissatisfying, as I am probably taking a wrong approach. I do not have any other ideas: even a reference to mathematical constructs that yield a similar spiral would be more than welcome. I do not know if this construction has a name, hence finding references has proven to be difficult.

What method cold I use to obtain a Plot similar to the one in the picture?

Late to the party~ A slight modification to make them more similar:

steps = AnglePath@Table[{r-0.015 r^2, 1.002*(2 Pi/5)}, {r, .1, 25, 0.1}];
Graphics[{Red, ls}, Background -> Black]


Effect:

This solution focused on the perodic color variation and the decrease in the gaps while extruding.

• Very nice replication. +1 (Although I suppose it should be flipped upside-down to be even closer.) – Mr.Wizard Aug 29 '16 at 3:35
• @Mr.Wizard there should be an @ there...... sorry~ – Wjx Aug 29 '16 at 3:42
• I decided to choose this as the correct answer because the graphical result is the most similar to the given image. All the answers were great indeed, and every single one gives something to the whole picture. C.E.'s answer is quick and slick, Mr.Wizard's one lets us manipulate the graphics to obtain a beautiful animation (you can see a sample of it here: (giphy.com/gifs/3o6Zt1PrY1ivErjzUc). Wjx instead worked the details about the colors out: I just wanted to recognize everybody's effort and thank the community. – Lonidard Aug 29 '16 at 10:25
• @bharb thanks for your appreciation! :) – Wjx Aug 29 '16 at 10:27

It's something like this:

steps = Table[{r, 1.001 (2 Pi/5)}, {r, 1, 25, 0.1}];
Graphics[{Red, Line@AnglePath[steps]}, Background -> Black]


This might do the trick:

Manipulate[
ParametricPlot[
#1 {Cos[#2], Sin[#2]} & @@ {t, Log[i] Floor[t]},
{t, 0, 200}
, Background -> Black
, PlotStyle -> Purple
, Axes -> False
, PerformanceGoal -> "Quality"
, PlotRange -> {{-201, 201}, {-201, 201}}
],
{{i, 3.525}, 3.43, 3.6}
]


Since you enjoyed the animation aspect here is nearly verbatim code I wrote 15 years ago:

Animate[ParametricPlot[#1 {Cos[#2], Sin[#2]} & @@ {t, Log[i] Floor[t]}, {t, 0, 200},
Background -> Black, ImageSize -> 400, PlotPoints -> 150, Axes -> False,
PlotRange -> {{-201, 201}, {-201, 201}}], {i, 1, 12.365}, DefaultDuration -> 200,
AnimationRepetitions -> 1]


The animation is much too long to practically include as a .GIF here, but I hope you enjoy the patterns that emerge from this simple function.

• Great answer, indeed.This construct makes it easy to build a cool animation too, although the central pentagon kind of moves around. Is there any way of solving the issue, fixing the center of the spiral? – Lonidard Aug 28 '16 at 19:56
• @bharb Yes, a fixed PlotRange. I should have included that. Fix on the way. – Mr.Wizard Aug 28 '16 at 20:00
• @bharb Please take a look at the addendum. :-) – Mr.Wizard Aug 29 '16 at 13:28
• I think I'm in love. This is just beautiful! – Lonidard Aug 29 '16 at 13:36
• I felt bold and tried to export the .gif in decent quality. Result: two damn GIGABYTES of gorgeousness. – Lonidard Aug 29 '16 at 14:41