Message Boards Message Boards

[GIF] Interchange (approximate Fourier polynomials)

Approximate Fourier polynomials

Interchange

Random points following around Fourier curves.

Here's the code for producing your own GIF (the Manipulate is not very responsive):

fourier7 = Module[{n = 1000, points, size, g},
   points = 
    RandomVariate[
     TransformedDistribution[{r, \[Theta]}, {r \[Distributed] 
        WignerSemicircleDistribution[.002], \[Theta] \[Distributed] 
        UniformDistribution[{0, 2 \[Pi]}]}], n];
   size = RandomReal[{.002, .008}, n];
   ParallelTable[
      g[s_] = 
       FourierSeries[{Cos[(4 - Cos[t]) s], Sin[(5 + Sin[t]) s]}, s, 
        6]; Graphics[{GrayLevel[.2], 
        Table[{PointSize[size[[i]]], 
          Point[ points[[i, 1]] g''[ points[[i, 2]]] + 
            g[ points[[i, 2]]]]}, {i, 1, n}]}, 
       Background -> GrayLevel[.95], PlotRange -> 1.9, 
       ImageSize -> 540], {t, 0., 2 \[Pi] - #, #}] &[2 \[Pi]/300]
   ];

Export[NotebookDirectory[] <> "fourier7.gif", fourier7, 
 "DisplayDurations" -> {1/24}]

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 tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: Moderation Team
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