Princeton Press just sent me a review copy of a new book by Frank Farris called Creating Symmetry: The Artful Mathematics of Wallpaper Patterns. It looks amazing and I’m super excited to read it. Apparently John Cook has been reading it as well, and posted some Python code for generating this curve, which shows up towards the beginning of the book:
Mike Croucher also posted an interactive version using Jupyter notebook, where you can play with sliders to control the parameters of the curve and watch it evolve.
This is a plot of the parametric equation
in the complex plane. In general, Farris considers parametric equations of the form
where are complex numbers, are integers, and as usual . All such equations correspond to cyclic plots in the complex plane; he analyzes what sorts of symmetry they will have based on the parameters .
He also spends some time talking about the aesthetics of picking values for and that result in beautiful curves. Instead of making carefully considered choices in this kind of situations, I often like to employ randomness to just generate a bunch of different instantiations and see what comes up (although there is still a certain amount of art in choosing the distributions for the random parameters). So, here are 50 random curves. Each one has
- Either 2, 3, or 4 terms
- Exponents chosen uniformly at random from
- Coefficients chosen uniformly at random from the square in the complex plane from to .
I really like seeing these all together. They are not all great individually, but as a group, it’s fun seeing their differences, similarities, and idiosyncracies.
Don’t ask me what the parameters are for an individual curve because the program I used to generate them does not save the parameters anywhere! The code is here if you want to see it; of course it is written in Haskell and uses the diagrams framework.