How to Create Art With Mathematics

Can you generate aesthetically pleasing, symmetrical curves with two numbers and a simple mathematical function?

[No Caption]

Courtesy of Frank A. Farris

The beautiful color illustration of frieze patterns above is taken from Frank A. Farris’ Creating Symmetry: The Artful Mathematics of Wallpaper Patterns (Princeton University Press, 2015), a math book that, unusually, makes an outstanding coffee-table book in addition to having deep mathematical content.

A monthly puzzle celebrating the sudden insights and unexpected twists of scientific problem solving. Your guide is Pradeep Mutalik, a medical research scientist at the Yale Center for Medical Informatics and a lifelong puzzle enthusiast.

Lavished with many beautiful illustrations of this kind, Farris’ book is a joyful yet serious exploration of how mathematics can create beautiful patterns and provide us with a deep understanding of symmetry, one of the underlying principles of great art. “Euclid alone has looked on Beauty bare,” wrote the poet Edna St. Vincent Millay, and Frank Farris shows us what that means. His book uses the abstract, esoteric beauty of mathematical equations to create the universally appealing beauty of visual art. I believe our ability to find beauty in both mathematics and art reveals something deep about the human mind, a topic we may explore in the solution column. For now, let’s tackle today’s puzzles. They are inspired by the more elementary parts of Farris’ book, which discusses different types of symmetries in wallpaper, friezes and Escher-esque morphing patterns using a host of mathematical techniques involving groups, vector spaces, Fourier series, rosette functions, wave functions and several others. The puzzles below merely skim the surface of the connection between math and art that the book explores in depth, but they are designed to encourage all of our readers to create stunning visual patterns using mathematics. (Update: The solution is now available here.)

Question 1:

Look at the family of symmetrical curves below, one of which is featured in Farris’ book as a “mystery curve”:

Each of these curves has an ordered pair of numbers associated with it, shown at the lower left of the curve. These two numbers determine the type of symmetry and complexity exhibited by the curve, and a simple mathematical relationship between the two numbers is required to generate the curve’s pleasant symmetry. In the second question below, we’ll give you the precise way these numbers are used to generate their curve. Without looking ahead, ponder these numbers and try to get an intuitive sense of how the curves change as the numbers do. Then look at curves A and B below and see if you can match them to the correct pairs of numbers, from the 10 choices given. Give your reasons for choosing your particular pairs and describe what you think the relationship is between the two numbers.


1. (5, –19)   2. (6, –19)   3. (7, –17)   4. (7, –12)   5. (7, –19)
6. (8, –20)   7. (8, –12)   8. (8, –13)   9. (8, –19)   10. (6, –24)

How are the numbers related to the curves, and how can we generate other similarly graceful curves? Our next two challenges arise from these questions. Question 2 requires some mathematical sophistication, but you can skip it if you wish and go straight to question 3, which only requires a willingness to explore and play, and create beauty.

Question 2:

The “mystery curve” from Farris’ book is the second one (6, –14) from question 1. The curve has a fivefold symmetry, which you can clearly make out in the image at right. Here’s the expression that generated this curve: (cos(t) + cos(6t)/2 + sin(14t)/3, sin(t) + sin(6t)/2 + cos(14t)/3).

Courtesy of Frank A. Farris

Note that this is a parametric equation — the first half gives the x-coordinate and the second part the y-coordinate as the parameter t goes from 0 to 2π. The mystery is this: What do the coefficients 6 and 14 have to do with generating fivefold symmetry? Why did we use –14 instead of 14 in question 1? Can you explain how this formula works to a general audience?

Question 3:

Anyone can generate the above curve — use your favorite graphing app, or enter the above expression into Wolfram Alpha or the excellent graphic calculator Desmos. Now start playing with the parameters — change the coefficients, fiddle with the signs, do anything you want using sine and cosine terms. You can use the insights you gained from considering question 1 above — or not. Go wild! It’s like having a magic Spirograph whose pen never slips. Try to come up with the most pleasing curves you can. Submit the equations for your two or three most beautiful curves as comments to this column. We will publish a gallery of the curves our panel considers the most beautiful.

Happy puzzling. And may insight and creativity be with you!

Editor’s notes: The reader who submits the most interesting, creative or insightful solution (as judged by the columnist) in the comments section will receive a Quanta Magazine T-shirt. 

If you’d like to suggest a favorite puzzle for a future Insights column, submit it as a comment below, clearly marked “NEW PUZZLE SUGGESTION” (it will not appear online, so solutions to the puzzle questions above should be submitted separately).

Note that we will hold comments for the first day to allow for independent contributions. (Update: The solution is now available here.)

View Reader Comments (22)

Leave a Comment

Reader CommentsLeave a Comment

  • Some designs using only prime numbers as parameters:

    (cos (t)+ cos (29t)/2+ sin (59t)/3, sin (t)+ sin (29t)/2+ cos (59t)/3)

    (cos (t)+ cos (29t)/2+ sin (61t)/3, sin (t)+ sin (29t)/2+ cos (61t)/3)

    Perhaps the most functional, but not necessarily as visually pleasing: 🙂
    (cos (t)+ cos (619t)/2+ sin (1319t)/3, sin (t)+ sin (619t)/2+ cos (1319t)/3)

  • Q1: A = (7,-17), B = (8,-13)

    The first element of the pair is the degree of symmetry plus one (so a seven represents six-way symmetry). The second element is something akin to a winding number. If you imagine an arrow pointing along the direction of the curve, then the number of times that arrow rotates through 360 degree as you traverse the curve is the winding number; the second element of the pair is the winding number if you imagine that the arrow can only rotate in one direction.

    Q2: To answer this, let's consider the individual (pairs) of terms in the equation.

    We'll start with the first pair. If we just let f(t) = (cos(t),sin(t)), then this equation describes a unit circle (unit, because the coefficient in front of the cos and sin pieces is one). This is the "slow" component of the equation – if completes only a single period as t passes through the range 0-2pi. The way to think of it is as the big hand on a clock, stately moving around the fast in slow, constant fashion.

    Now, let's look at the second pair: (cos(6t)/2,sin(6t)/2). This is the term that gives us the five-fold symmetry. Because the coefficient in front of the t is 6, that means that this term will oscillate 6 times as t passes through the range 0-2pi. The way to think of this piece is as a little car affixed to the clock hand, moving back and forth along the hand six times every time the clock hand rotates. So, why does this produce a five-fold symmetry if this term is oscillating six times? One of those oscillations is eaten up by the fact that the hand itself oscillates once; the little car oscillates six times total, but only five times more than the big hand oscillates.

    Now for the final term: (sin(14t)/3,cos(14t)/3). What's the first thing we notice about this piece? The sines and cosines have been swapped. What this means is that this term imposes an oscillation that is perpendicular to the oscillation imposed by the second term. So, while the car is moving back and forth along the clock hand, this term is like a pole which car be extended out from the car perpendicularly to the clock hand, and then retracted back. The coefficient of 14 means that this term will oscillate 14 times as t passes through the range of 0-2pi.

    So, what is the effect of the negative sign? This can be seen if you trace out the curve with your hand. Pick any spot on the curve, and point your finger in the direction of the curve. Now start traversing the curve in the direction of you finger – keeping your finger pointed along the curve as you do so. Notice how, as you move around the curve, your finger is rotating opposite to the direction you are traversing the curve? This is the effect of the negative sign; if the sign were positive, your finger would be rotating in the same direction that the curve is being traversed.

  • Question 1: A goes with 3. (7,-17). B goes with 8. (8,-13).

    Question 2: Let cos(t) + cos(at)/2 + sin(bt)/3, sin(t) + sin(at)/2 + cos(bt)/3 be the general form of the parametric relation we are looking at, with a and b positive integers. The shapes generated can be seen to have some combination of inner and outer cusps/loops. When a < b, the pattern seems to be that there will be a-1 inner loops and b-a+2 outer loops. We see this working in the (6,-14) example which has 6-1=5 inter loops and 14-6+2=10 outer loops. One particularly nice version of this is when a=k+1 and b=2k-1 for some positive integer k. This will produce a shape with k inner loops and k outer loops. Shape B from Question 1 is an example of this type, with k=7.

    Question 3: Here are some other observations. The shape will have vertical symmetry when a is odd and b is even. When a=b+1, a sort of seashell shape emerges, with a hole under the origin. When a=b+2, a spiral with a+1 arms appears. When a=b+3, a seashell shape similar to the last appears, only with its hole above the origin. When a=2b+3, a dense set of spirals appear, almost taking the form of a circle. The last few patterns become more apparent when b is large.

    In general all of these patterns seem like a combination of Lissajous curves ( and rose curves (

    As to my favorite shapes produced so far, here are a few:

    cos(t) + cos(21t)/2 + sin(34t)/3, sin(t) + sin(21t)/2 + cos(34t)/3 [Successive Fibonacci numbers yield interesting results]

    cos(t) + cos(105t)/2 + sin(100t)/3, sin(t) + sin(105t)/2 + cos(100t)/3 [Larger numbers yield denser patterns]

    cos(t) + cos(103t)/2 + sin(50t)/3, sin(t) + sin(103t)/2 + cos(50t)/3 [Nice concentric circles]

    sin(t) + sin(6t)/2 + sin(14t)/3, cos(t) + cos(6t)/2 + cos(14t)/3 [Not exactly the same expression format, but in the same spirit. To me it looks like a face: wide eyes, large nose, chubby cheeks, and a big tuft of hair on top].

    Thanks for the fun puzzle!

  • Pradeep, thank you for this nice puzzle that shows the concrete beauty of mathematics!

    Question 1
    A: Choice 3 (7, -17)
    B: Choice 8 (8,-13)

    Qualitatively, the shape corresponding to the pair (m,n) has m-1 "inner loops" and 1-n "outer edges."

    Question 2
    Sometimes a problem becomes easier once it is made more complicated. Our computations are much easier if we consider the curve as the image of a parameterized function in the complex plane. (For details, please see this screenshot: We will also generalize the problem a bit using integers m and n instead of 6 and -14. Our generalized function is:

    f(t) = e^(it) + (1/2)e^(mit) + (i/3)e^(-nit).

    For an object to have k-fold symmetry, it must be invariant under rotations of 2pi/k radians. In other words, we want the following to be satisfied:

    f(t + 2pi/k) = e^(2pi*i/k)*f(t).

    Computing the left-hand side and using some facts about complex numbers, we see that our requirement is satisfied if and only if k divides both m-1 and 1-n. This end result would be easy to explain to a general audience — it only requires a knowledge of subtraction, division, and remainders! [Also note that these correspond to the "inner loops" and "outer edges" mentioned in Q1. Intuitively, it makes sense that k should divide these.]

    In the (6,-14) case, our requirement is satisfied since 5 divides 5 (=6-1) and 15 (=1-(-14)). However, (6,14) fails since 5 does not divide -13 (=1-14).

    Our generalized fact also makes it easy to generate new symmetric objects. For example:
    6-fold (7, -11): (cos(t) + cos(7t)/2 + sin(11t)/3, sin(t) + sin(7t)/2 + cos(11t)/3)
    7-fold (-6, -6): (cos(t) + cos(-6t)/2 + sin(6t)/3, sin(t) + sin(-6t)/2 + cos(6t)/3)
    10-fold (21, -9): (cos(t) + cos(21t)/2 + sin(9t)/3, sin(t) + sin(21t)/2 + cos(9t)/3)

    Question 3
    Engagement Ring: (cos(t) + cos(91t)/2 + sin(93t)/3, sin(t) + sin(91t)/2 + cos(93t)/3)

    Fly Eyes: (cos(t) + cos(107t)/2 + sin(-109t)/3, sin(t) + sin(107t)/2 + cos(-109t)/3)

    Loofah: (cos(t) + cos(5*pi*t)/2 + sin(7*sqrt(2)*t)/3, sin(t) + sin(5*pi*t)/2 + cos(7*sqrt(2)*t)/3)

  • If you consider the mystery curve to be in the complex plane with the first coordinate representing a real number and the second coordinate an imaginary number (a multiple of i = sqrt[-1]), then you can write its equation as f(t) = exp(i t) + exp(6 i t)/2 + i exp(-14 i t)/3. This is a specific case of the function f(t,m,n) = exp(i t) + exp(m i t)/2 + i exp(n i t)/3 with m set to 6 and n set to -14. I suppose that Pradeep Mutalik gave the second parameter as -14 instead of 14 because Farris wrote the equation similarly in his book (without a minus sign in the third term).
    You can think of each of the three terms as a vector that rotates around the the complex plane like a hand on the clock. Like the hour hand, the first term rotates the slowest, making one completion as t goes from 0 to 2pi. Like the minute hand, the second term rotates faster, making 6 rotations as t goes from 0 to 2pi (in the case of the mystery curve). The third term goes the fastest and rotates 14 times around the complex plane in the same amount of time, but it rotates backwards.
    To see why this results in 5-fold symmetry, think about the hands on a real clock. While the hour hand goes around once (in 12 hours), the minute hand goes around twelve times, but it only catches up with the hour hand 11 times in that 12-hour stretch, once at 1:05:27, again at 2:10:55 and so on up to 10:54:33 and finally 12 o'clock. That is, once in each hour except the first (from 12 to 1). So the hour and the minute hand line up 12 – 1 = 11 times over one full rotation of the hour hand resulting in an 11-fold symmetry of the positions of the hands on the clock. Actually, the symmetry goes deeper than that – the hour and minute hand are the same distance apart every 1 hour, 5 minutes and 27. 4545… seconds.
    Similarly, the first term in the mystery curve equation rotates once in the period from t = 0 to 2pi, while the second term rotates 6 times. They line up m – 1 = 6 – 1 = 5 times over that period, when t = 2pi/5, 4pi/5, 6pi/5, 8pi/5 and 2pi, resulting in a 5-fold symmetry. But for the symmetry to hold, it has to work for the third term, too. This is difficult to picture with the third term is rotating backwards (because of the minus sign on -14), but the math works the same way. The third term is in the same relative position to the first term n – 1 = -14 – 1 = -15 times as t goes from 0 to 2pi. As long as 5 of those times are the same as when the first two terms line up, then they are all in the same relative positions 5 times, resulting in 5-fold symmetry. For that to occur, (n-1)/(m-1) must be an integer. In the case of the mystery curve, (n-1)/(m-1) = (-14 – 1)/(6 – 1) = -3, so every third time of the third term, it is in the same relative position to the other two. It is not true for all values of m and n, however. For example, if m were 6 and n were -15, then (n-1)/(m-1) would be -16/5 and relative positions of the three terms would not repeat. It is also possible for symmetries to appear with other values of m and n, even if m does not divide evenly. In general you can expect k-fold symmetry, where k = gcd(m-1, n-1). (gcd is the greatest common divisor, the largest integer that divides both values evenly.)

  • Title: Dolphins

    The set of line segments whose endpoints are
    P1(cos(t) + cos(6t)/2 + sin(14t)/3, sin(t) + sin(6t)/2 + cos(14t)/3)
    P2(cos(t) + cos(6t)/2, sin(t) + sin(6t)/2)

  • Desmos is a truly great graphing site that I hadn't used before. Here's a collection of some of my favorite curves discovered when playing around with the parameters. Toggle the different curves by clicking the circles under the numbers on the left side of the screen.

  • If anyone is curious – this is how to plot it in Wolfram|Alpha:

    We also have many such free symmetry apps that anyone can play with:

  • Question 1
    A: Choice 3 (7, -17)
    B: Choice 8 (8,-13)

    Question 2
    Consider x = cos(t) + cos (At)/2 + sin(-Bt)/3 and y = sin(t) + sin(At)/2 + cos (-Bt)/3, where x varies between 0 and 2*pi. The distance of points on the curve should be invariant from the origin, when the points are related by rotation by an angle Theta=2*pi/N, when the curve has a N-fold symmetry . Specifically x^2 + y^2 = x'^2 + y'^2, where x' = cos(t') + cos (At')/2 + sin(-Bt')/3 and y' = sin(t') + sin(At')/2 + cos (-Bt')/3.
    This gives us the condition:
    cos((A-1)t) + 2/3 sin ((1-b)t) + 1/3 sin ((A-B)t) = cos((A-1)t') + 2/3 sin ((1-b)t') + 1/3 sin ((A-B)t')
    Since sines and cosines form a Fourier basis i.e. integral (sin nx cos mx) = 0 when 'n' is not equal to 'm', the above condition works in general when the pairs (A-1)t, (A-1)t' ; (1-B)t, (1-B)t' ; (A-B)t, (A-B)t' differ by 2*pi/N. This means that N-fold symmetry implies N=gcd(A-1,1-B,A-B). For example 5=gcd(6-1,1+14,6+14).

    Question 3:
    (x=cos (29t)/3+sin(57t)/5, y=sin(29t)/3 +cos(57t)/5)


  • I used primes and their cubes and I found these to be very pleasing:

    cos (t)+cos (5t)/2+sin (125t)/3,sin (t)+sin (5t)/2+cos (125t)/3)

    cos (t)+cos (7t)/2+sin (343t)/3,sin (t)+sin (7t)/2+cos (343t)/3)

  • See this Python file with my solution attempt for some nice visualizations:

    The short explanation that I would give for this phenomenon is this:

    Trigonometric functions are periodic. Since the curve "looks the same" when it is rotated, there must be some relation of that angle which we have to rotate and the periodicity of the trigonometric functions. Since trigonometric functions are very simple, this will just be a relation between integers. It all comes down to the equation:

    n = 2(1-a)/k = 2(1-b)/l

    where k, l are integers, (a, b) are the two parameters to the "mystery curve" and n is the n-fold rotation symmetry. If we can find k, l, n to satisfy this relation, there will be a n-fold rotation symmetry. The fact that (6, -14) has a 5-fold symmetry is easy to see in this case since (1-6) = -5 and (1+14) = 15 => k = -2, l = 6.

    /Axel, PhD Student in theoretical physics, Stockholm University

  • Here's an interactive solution built withWeb Sketchpad that allows you to vary the coefficients of t:

  • It seems like my link was broken: here is my solution attempt:

    Although the solution algorithm for the periodicity is sketchy, it gives some hint to what solutions are interesting. As I said, the problem is formulated in the most compact, and to me at least understandable way by the equation

    z(2*pi/n) = R(2*pi/n)z(0)

    where z(t) = [x(t),y(t)] is the vector containing the x,y components of the mystery curve and R(theta) is the rotation matrix [[cos(theta), -sin(theta)], [sin(theta), cos(theta]]. This has a nice geometric interpretation: if we rotate the figure by 1/n of a full 360 degrees, it will look the same. We can either rotate the figure by 2*pi/n or shift t by 2*pi/n.

    The simple properties of mystery curves comes from that they are built from trigonometric functions. If a curve built from trig functions is to be closed, it can only have periods which are fractions of a full circle (in other words, it can loop however it wants, but the loops must fit into a full circle). As soon as we are dealing with such simple fractions and their relation through the above equation, we know that mystery curves are related to diophantine equations (equations for integers). Such equations need not have solutions and indeed (a, b) in general does not lead to any rotation symmetry of the mystery curve figure.

  • Nice puzzle; I am sure the readers would enjoy
    Which give a brief description of how Lissajous created and used this type of display to visualize a mechanical system around 1850. Personally I relate these to "phase-plane" diagrams in control systems. On could also visualize three dimensional forms and imagine high dimensional figures; and then picture slices or projections to a 2d surface. Synchronization is a form of symetry.

  • I changed the second number to be 2 less than the first, 9 -7 I get a flower.

    (cos (t)+ cos (9t)/2+ sin (7t)/3, sin (t)+ sin (9t)/2+ cos (7t)/3)
    As number of petals can be increased as long as second number is 2 less than the first.

  • Just curious…
    These are cartesian coordinates?
    What happens if they are translated to polar coordinates?

  • Keeping it simple… (and stupid… I'm not certain how to paste the actual result here, so I'm just copying the formula from Desmos).
    (\cos (t)-\cos (t)-\sin (5t),\sin (7t)-\sin (3t)-\cos (5t))

    (\cos (13t)-\cos (7t)-\sin (5t),\sin (13t)-\sin (13t)-\cos (5t))
    Note the intersections on the x-axis.

    (\cos (1t)+\cos (7t)-\sin (7t),\sin (7t)+\sin (t)+\cos (7t))
    Changing the multiplier creates one less repetition, until a circle is achieved.

    If everything is multiplied, then we get more interesting shapes…
    (\cos (t)\cos (3t)\cos (t),\sin (t)\sin (3t)\sin (t))
    Basically, a variable exponential
    Or change one function to the opposite…
    (\cos (11t)\cos (11t)\sin (t),\sin (t)\sin (t)\cos (11t))
    and as you increase to the nth multiple, limits appear.

    Or maybe…
    (\cos (5t)\cos (3t)\sin (9t),\sin (9t)\sin (5t)\cos (3t))

    How to draw a triangle with trigonometry?
    (\cos (t)\sin (t)\sin (t),\cos (t)\cos (t)\cos (t)\cos (t)\cos (t)\cos (t))

    (\cos (t)\sin (t)\sin (t),\sin (t)\sin (t)\sin (t)\sin (t)\cos (t)\cos (t))

    An egg…
    (\cos (t)\sin (t)\sin (t),\sin (t)\sin (t)\sin (t)\sin (t)\sec (t)\cos (t))

    You are here…
    (\cos (t)\sin (t)\sin (t),\sin \ (t)\cos (t)\sin (t)\sec (t))
    (change the nth t values for interesting variations.)

    (\cos (36t)\sin (3t)\sin (3t),\sin \ (9t)\cos (9t)\sin (6t)\sec (3t))
    (\cos (33t)\sin (3t)\sin (3t),\sin \ (9t)\cos (9t)\sin (6t)\sec (3t))
    (\cos (15t)\sin (3t)\sin (3t),\sin \ (9t)\cos (9t)\sin (6t)\sec (3t))
    (\cos (15t)\sin (3t)\sin (3t),\sin \ (9t)\cos (9t)\sin (6t)\sec (9t))

    Infinite possibilities…
    (\sin (t)\sin (t)\sin (t),\sin (t)\cos (t)\sin (t)\sin (t))

  • (\cos (11t),\sin (11t)+\sin (2t))

    (\cos (11t),\sin (13t)+\sin (2t))

    (\cos (11t),\sin (31t)+\sin (2t))

    (\cos (11t),\sin (20t)+\sin (2t))

    (\cos (t)\cos (3t),\sin (2t)\sin (1.5t))

    (\tan (5t)\cos (5t),\left(\sin (5t)+\sin (8t)\right))

    (\tan (7t)\cos (7t),\left(\sin (8t)+\sin (5t)\right))

    (\tan (5t)\cos (5t),\left(\sin (6t)+\sin (5t)\right))

  • I recently made a painting based upon the mystery function ideas from Farris' book. This piece is called "Strange Loops #8" (acrylic on panel, 12×12 inches); I unfortunately didn't write down the coefficients to the equation.

    <img src="">

Comments are closed.