Message Boards Message Boards

[GIF] Recapitulation (Fourier series with fivefold symmetry)


Fourier series with fivefold symmetry


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"};
       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}]
POSTED BY: Clayton Shonkwiler
2 years ago

Neat as always.

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

POSTED BY: Kuba Podkalicki
2 years ago

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!

POSTED BY: Clayton Shonkwiler
2 years ago

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!

POSTED BY: Moderation Team
2 years ago

Group Abstract Group Abstract