[GIF] Recapitulation (Fourier series with fivefold symmetry)

Posted 4 years ago
4608 Views
|
3 Replies
|
3 Total Likes
|
 RecapitulationInspired 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}] ] 
Answer
3 Replies
Sort By:
Posted 4 years ago
 Neat as always.ToReal is not defined but I suppose it can be replaced with ReIm.
Answer
Posted 4 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!
Answer
Posted 4 years ago
 - 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!
Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments