Message Boards Message Boards

GROUPS:

[GIF] Recapitulation (Fourier series with fivefold symmetry)

Posted 2 years ago
2765 Views
|
3 Replies
|
3 Total Likes
|

Fourier series with fivefold symmetry

Recapitulation

Inspired by a talk Frank Farris gave at the ICERM Workshop on Illustrating Mathematics (see also @symmetric_curve); the idea is that a Fourier series whose only non-vanishing coefficients are congruent to 1 mod $n$ will produce a parametrized curve having $n$-fold symmetry.

In this case, $n=5$; here's the code:

ToReal[z_] := {Re[z], Im[z]};   
DynamicModule[{a = -1/4, b = -3/4, c = 1/3, d = 1/3, cols},
     cols = RGBColor /@ {"#8BDEFF", "#A888FF", "#C2FFFF", "#26466F"};
     Manipulate[
      ParametricPlot[
       ToReal[E^(-I π/10)*(a E^(-4 I θ) + b  E^(6 I θ) +
             c Sin[t] E^(-9 I θ)) + 
         d  Cos[t] E^(11 I θ)], {θ, 0, 2 π}, 
       PlotRange -> 2.5, Axes -> None, ImageSize -> 540, 
       PlotStyle -> Thickness[.005], 
       ColorFunction -> 
        Function[{x, y, θ}, 
         Blend[Append[#, First[#]] &[cols[[;; 3]]], 
          Mod[(θ + π/2 + t)/(2 π), 1]]], 
       ColorFunctionScaling -> False, 
       Background -> Last[cols]], {t, -π/2, π/2}]
     ]
3 Replies

Neat as always.

ToReal is not defined but I suppose it can be replaced with ReIm.

Oops, sorry about that. Just added the definition of ToReal to the post.

As you guessed, it's the same function as ReIm, which I didn't even know existed, but am very happy to learn about. Thanks!

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract