Color I: Opacity and Josef Albers

What do you see?AlbersSquares1

Looks like a pink square on top of a purple square.  But after hearing a talk about Josef Albers’ work at Bridges 2016 a few weeks ago, I realized there is more than one way to look at this image.

Maybe the square is actually more red, but transparent — so that the purple showing through makes it pink.  Or maybe the pink square is behind the purple square, and it’s the purple square which is transparent.  Or maybe the purple square isn’t a square at all, but a frame — that is, a square with a hole in it!

This first post in a series on color will explore this apparently simple figure.  The ultimately goal will be to analyze images in Josef Albers’ series Homage to the Square. But as mentioned last week, James Mai found that there are 171 possible combinations of opaqueness, transparency, frames, and squares in this series!  So we’ll start with a basic example.

But first, we have to understand how opacity works in computer graphics.  We’ve used RGB colors in several posts so far, but rarely mentioned opacity.  When this is included, the color system is referred to as RGBA, where the “A” represents the opacity (or alternatively, the transparency), which is also sometimes called the alpha.  A value of a=0 means that the color is completely transparent, so it doesn’t affect the image at all, while a value of a=1 means the color is completely opaque, meaning you can’t see through it at all.

As an example, in the series below, the squares have RGB values of (0.2, 0, 1.0), and A values of 0.25, 0.5, 0.75, and 1.0 (going from left to right).

OpacityExample

But these squares could also have been created without any transparency at all!  What this means is that if you include transparency/opacity, there are many different ways to specify a color that appears on your screen, not just one.  So in an Albers’ piece with four squares, where all of them may have some degree of transparency, the analysis can be quite difficult.

Josef_Albers's_painting_'Homage_to_the_Square',_1965

Next, we have to understand how the opacity is used to create the colors you see.  If color C_1 has opacity a and is on top of a color C_2, the apparent or observed color is then

a\,C_1+(1-a)\,C_2.

If you thought to yourself, “Oh, it’s linear interpolation again!”, you’d be right!  In other words, the observed color is a linear combination of the transparent color and the background color.

Keep in mind that is an idealized situation.  It is very difficult to make a correspondence with how we “actually” see.  If you were looking at an object throught a square of colored glass — maybe sunglasses — there would be concerns about the distance between the glass and the object, multiple lighting sources, etc.  For now, we just want to understand the mathematics of using opacity in computer graphics.

Another complication arises in considering the following two squares — a pure red square on top of a pure blue square.

AlbersSquares2

In this case, it is impossible that the red square has any degree of transparency.  If it did, some of the blue would show through.  If the red square had a transparency of a, our linear interpolation formula would give an apparent color of

a,(1,0,0)+(1-a)\,(0,0,1)=(a,0,1-a).

This means if there were any transparency at all, there would be a Blue component of the observed color, which is not possible since Red has RGB values of (1,0,0).  So before you go about calculating opacity, you’ve got to decide if it’s even possible!

Let’s start with the purple square.

PurpleSquare

What color could this square be, with what transparency?  Let’s call the color C_1 and the opacity a.  Since the background (screen color) is white, we use C_2=(1,1,1).

To assess what the color “looks like,” you’d go to PhotoShop and use the eyedropper tool, for example — or another other application which allows you to point to a color and get the RGB values.  In this case, you’d get (0.6, 0.5, 1.0).  Basically, what you get with such tools are RGB values, assuming an opacity of a=1.

But of course we’re wondering what is possible if the opacity is not 1.  If we denote C_1 by (R,G,B),, we get

(0.6, 0.5, 1.0) = a\,(R,G,B)+(1-a)\,(1,1,1),

which simplifes to

(0.6, 0.5, 1.0)=(a\,R+1-a, a\,G+1-a, a\,B+1-a).

This gives us three equations in four unknowns, which makes sense — we know the answer is likely not unique since it may be possible to create the square using different opacities.

Note that the third equation is

1.0 = a\,B+1-a,

which when rearranged gives us

a\,(B-1)=0.

Of course a cannot be 0, or we wouldn’t see anything!  This means B=1, which makes sense since if we’re interpolating between B and 1, the only way to get a result of 1.0 would be if B=1.

What about the other equations,

0.6=a\,R+1-a,\qquad 0.5=a\,G+1-a?

Solving them, we get

R=\dfrac{a-0.4}a,\qquad G=\dfrac{a-0.5}a.

Keep in mind that the R, G, and a values must all be between 0 and 1.  So we must at least have

a\ge0.5

to guarantee that all values are positive.  Further, observe that for any a value between 0.5 and 1 (inclusive), we have that the numerators of both color values are less than the demoninators, and are therefore less that 1.

So this means that the purple square may be created using the color values

R=\dfrac{a-0.4}a,\quad G=\dfrac{a-0.5}a,\quad B=1,

as long as the opacity satisfies 0.5\le a\le1.  This is illustrated graphically below, where the solid line segment represents all possible colors for the square.RGSpace

Here, the horizontal axis is the Red component and the vertical axis is the Green component.  Since we observed earlier that the Blue component must alwas be 1, the lower-left corner would be (0,0) in RG space (Blue), and the upper-right corner would be (1,1) (White).  When a=1, we obtain the point X with RGB values (0.6, 0.5).  This makes sense, since we observed the color to have RGB values (0.6, 0.5, 1.0).

When a=2/3\approx0.67, we obtain the point Y with coordinates (0.4, 0.25) in RG space.  This means the purple square could be obtained using RGB values of (0.4, 0.25, 1.0) and opacity 2/3.

And when a=0.5, we obtain the point Z with coordinates (0.2, 0) in RG space.  This means the purple square could be obtained using RGB values of (0.2, 0, 1.0) and opacity 0.5.

Note that even though Y is  halfway between X and Z in RG space, the a value is not halfway between 0.5 and 1.0.  This is because of the a in the denominators in the fractions above giving solutions for R and G.

There’s a nice geometrical interpretation of this picture, too.  If one color is an interpolation of two others, it must lie on the segment joining those two others.  So we need all colors C such that X is on the segment between C and (1,1).  This is just that part of RG space which is a continuation of the line starting at (1,1) and going past X.

Now we could have just used this geometrical idea from the beginning — but I wanted to work out the mathematics so you could see how to use the definition of opacity to solve color problems.  And of course sometimes the geometry is not so obvious, so you need to start with the algebraic definition.

So working with opacity isn’t too difficult as long as you understand what your computer is doing.  In the next post on Color, we’ll tackle the issue of the pink square….

Bridges: Mathematics and Art III. Jyvaskyla, Finland!

After a 24-hour journey yesterday, I finally returned home from my month-long trip to Europe.  Not that Vienna and Florence weren’t fantastic, but I must admit that Bridges 2016 was the highlight of my trip!  I’d like to share some especially memorable moments of the conference this week.

Of course the most memorable is the annual Art Exhibition.

IMAG3283

I’ll discuss some of the pieces in this post, but there is no way to include them all!  Luckily, there are online galleries for all the Bridges conferences.  You can access them at the  Bridges online art galleries, although the gallery for Bridges 2016 is not up yet (but will be soon).

Two of the most memorable displays in the exhibit (no bias here, of course!) are my two pieces,

IMAG3259

and my student Nick Mendler’s two pieces (the second piece is shown later).

IMAG3236

It’s a real pleasure just to walk among the artwork and admire the intricacy of the pieces close-up.  Pictures absolutely do not do justice to the experience….  Some pieces which particularly stood out for me were these spheres created by Kiyoko Urata.

IMAG3438

Look closely at how they are made.  The medium is silk thread.  Yes, these are knitted!  These models won the award for Best Craftmanship, and they definitely deserved it.

Many of the talks in the Bridges conferences were about works in the exhibition, but not all.  I was particularly fascinated by a talk given by James Mai of Illinois State University (click here to read the full paper).  He discussed Josef Albers’ series Homage to the Square; one piece in the series is shown below (image courtesy of Wikipedia).  I have written about Josef Albers before (see Day002), so you might imagine I was rather interested in seeing this talk.

Josef_Albers's_painting_'Homage_to_the_Square',_1965

I’d seen these images before, but I just thought they were color studies.  The point of the talk was to suggest that there are many possible ways to interpret these figures.  For example, a naive interpretation is just to look at this image as four squares, one on top of each other.  What fascinated me was how many other ways there are to look at this series by Albers.

For example, what if some of the square are transparent?  Then some of the colors you see are the result of other colors showing through some of the squares.  But which ones?  What combinations of transparency are possible?  If we take it a step further, we might imagine that there aren’t four squares, but perhaps some frames — that is, squares with smaller squares cut out.  Further still, one or more of these frames might also be transparent.

In total, Albers produced over 1000 images of four different configurations of squares in this series (see the paper for details).  In the talk, James Mai found that there are in fact 171 different combinations of frames/transparency that are possible!  This is an entirely different level of complexity that I never imagined possible in this Albers series.  I intend to discuss this phenomenon in my Mathematics and Digital Art course this fall, so be sure to follow along if you’re interested to see more.

Nick and I did talk about our own work.  I was happy with my talk, which prompted a lot of questions from the audience — always a good sign!  Nick really did well for a first time at a conference like this.  He had 15 minutes allotted for his talk, and if you’ve never given a short talk, you may not realize how difficult it is.  As Nick and I sat through sessions, I kept noting to him how rushed many of the presenters were at the end because they spent too long at the beginning getting into their talk.

IMAG3240

But Nick had no time issues at all.  We worked at getting rid of a few slides which took too much time to explain — Nick talked through the remaining slides at a leisurely pace, and even had a few minutes for questions at the end.  Really well done.

One special treat was a talk on spherical mirrors given by Henry Segerman.  It really can’t be described in words, but if you look at his YouTube channel, you’ll find some truly amazing videos.  I highly recommend it!

There were also many scheduled events outside the university.  Again, there is no way to describe them all, but my favorite was the exhibition by Rinus Roelefs (who was attending the conference) at the Art Gallery of Central Finland’s Natural History Museum.  This was a spectacular display of polyhedra with a special opening night during the conference.

IMAG3320

There must have been at least 200 models exhibited, all very intricate and exquisitely assembled.  See my Twitter @cre8math for more pictures of this one-of-a-kind display.

Expect the unexpected — if you’ve been following me on Twitter, you’ll recall I posted about “found art” just walking around the streets of Florence.  There was a really wonderful surprise along the pedestrian walkway through central Jyvaskyla.

IMAG3286

Not much explanation is needed here — but it was just so neat to find this piece in the middle of the street!

Hopefully this gives you a sense of the atmosphere of the conference.  Truly magical!  If you are really interested, Bridges 2017 is in Waterloo, Canada, so it’s a lot easier to get to than Jyvaskyla, Finland.  Nick and I are already determined to attend, and will be starting our planning later this Fall.  I’m planning to give a report on my Mathematics and Digital Art course I’m teaching this semester, and Nick is hoping to take his investigations into the third dimension and make some awesome movies.  You’re welcome to join us in Waterloo for Bridges 2017!

 

 

 

 

Guest Blogger: Geoffrey Owen Miller, II

Let’s hear more from Geoffrey about his use of color!  Without further ado….

Last week, I mentioned a way to combine the RGB and CMYK color wheels.

color wheels-02This lovely wheel is often called the Yurmby wheel because it’s somewhat more pronounceable then YRMBCG(Y). The benefit of the Yurmby is that the primary of one system is the secondary of the other. With the RGB system,

Red light + Blue light = Magenta light.

Red and Blue are the “primaries,” meaning they are used to mix all other colors, like Magenta, and they can’t be mixed by other colors within that system. The CMYK system is different because pigments absorb light and so it is the reverse of the RGB system:

Cyan pigment + Yellow pigment = Green pigment.

This spatial relationship on the wheel is important as it is an oversimplified representation of an important aspect of our vision. Our eyes only have three types of color sensitive cells—typically called Red, Blue, and Green cone cells. Each cell is sensitive to a different size of wavelength of light:  Long, Medium, and Short. When all three frequencies of light are seen together, we see white light. But more significantly, when we see a combination of Medium (green) and Long (red) wavelengths, our brain gets the same signal as if we saw yellow light, which has a medium longish wavelength!

color wheels-03

Going back to the Color Relationships, the first, and easiest to see is a Triadic relationship. Here three colors are chosen at similar distances from each other on the color circle. If we choose Red, Green and Blue, then you should feel a sense of familiarity. When light of all three colors is brought together we have white. But what if we move the triangle, you may ask? Well, let’s try Magenta, Yellow, and Cyan. To shorten the number of words written, I am going to increasingly use more abbreviations. C + Y + M = Black, right? Well yes, if mixed as pigment on paper it becomes a dark gray, as Cyan absorbs Red, Yellow absorbs Blue, and Magenta absorbs Green. But as light, they mix to White.

Cyan light is made up of both Green light and Blue light as that is how you make Cyan light: C = G + B. If we go back to our original equation

C + Y + M

and simplify further, we get

(G + B) + (G + R) + (R + B), or 2R + 2G + 2B.

color wheels-04

We can remove the 2’s as they are not important (think stoichometry in chemistry!) and we are left with RGB, or white. Now let’s try moving half a step clockwise:

 Magenta-Blue + Cyan-Green + Yellow-Red,

or

M + B + C + G + Y + R,

which simplifies to

(R + B) + B + (B + G) + G + (G + R) + R, or 3R + 3G + 3B,

which once again is RGB!

color wheels-05

The point of these “color relations” is to simplify the number of colors in use. Any three equally spaced colors would mix to white. A complementary color pair is the fewest number of colors necessary to engage all three cone cells in the eye; for example,

R + C = R + (G + B)= White.

A split complement is in between a complement-pair and a triad, as shown in the second figure below.

color wheels-06

So for the watercolors I started this discussion about, I had found an old tube of flesh color that I had bought while in Taiwan. I was oddly attracted to this totally artificial-looking hue as a representative for human skin, and it also seemed like a good challenge to get it to work harmoniously in a painting. To understand it better, I first went about trying to remix that flesh color with my other single pigment paints. It turned out to be a mixture of red, yellow, and lots of white — basically a pastel orange. The complementary color of this is a Cyan-Blue color, which I chose to be the pigment Indigo. I added to this pallet Yellow Ochre, which is a reddish-yellow, and Venetian Red which is a yellowish-red, which when mixed make an orange, though much earthier than the orange in that tube of Barbie-like flesh tone.

color wheels-07

Once I had the four colors I felt best about (which also took into consideration other characteristics of a pigment, such as how grainy they are), the painting became a process where intuition, chance, luck, skill, and the weather all played equal parts in creating a work of historical record — never to be repeated equally again.

Disciplines of Geography 10.28.11
Disciplines of Geography 10.28.11

–Geoffrey Owen Miller

Thanks, Geoffrey!  I’d like to remark that I asked Geoffrey to elaborate on the statement “Once I had the four colors I felt best about….”  How did he know what colors were “best”?  Geoffrey commented that it was “like Tiger Woods describing what goes through his mind when he swings a golf club.”

As I thought about his comment, I appreciated it more and more.  A color wheel is a tool to help you organize thoughts about colors — but a color wheel cannot choose the colors for you.  This is where artistry comes in.  Using your tools as a guide, you navigate your way through the color spectrum until — based on years of practice and experience — you’ve “found it.”

But this is exactly what happens when creating digital art!  It is easy to find the complement of a color from the RGB values — just subtract each RGB value from 1.  Sometimes it’s just what you want, but sometimes you need to tweak it a little.  While there are simple arithmetic rules relating colors, they are not “absolute.”

So it all comes back to the question, “What is art?”  I won’t attempt to answer this question here, but only say that having tools and techniques (and code!) at your disposal will allow you to create images, but that doesn’t necessarily mean that these images will have artistic value.

I hope you’ve enjoyed my first guest blogger — I’ll occasionally invite other bloggers as well in the future.  I’m off to Finland for the Bridges 2016 conference tomorrow, so next week I’ll be talking about all the wonderful art I encounter there!

 

Guest Blogger: Geoffrey Owen Miller, I

Disciplines of Geography 11.5.11.jpg
Disciplines of Geography 11.5.11

Geoffrey was one of the two most influential artists who guided me along the path of creating digital art.  We worked at the same school a few years ago, and I sat in on many of his art classes.  Since the faculty often ate lunch together, we’d sit and have many casual chats about art and color.

What I always appreciate about Geoffery is that even though he’s not a mathematician, he is still able to understand and appreciate the mathematical aspects of what I create.  He isn’t intimidated by the mathematics, and I’m not intimidiated by his artisitic expertise.  He really helps me develop as an artist.

Geoffrey is passionate about the use of color, and thinks and writes extensively about the subject.  I’m also fascinated by color, so I thought I’d invite him to be a guest on my blog.  He had so many great things to say, though, that is soon became too much to say in one post.

So enjoy these few weeks, and learn something more about color!  If you like what you see and read, visit Geoffrey’s website at www.geoffreyowenmiller.com.  Enough from me — we’ll let Geoffrey speak for himself….

Back in 2011, I started a series of watercolors that came to be called the Disciplines of Geography. I had just been in Europe and had spent a lot of time visiting the museums and thinking about history while walking amongst all those giant oil paintings. On my return, I was asked by a friend and talented poet to help create a cover for a book of her poems. I had been using the medium of watercolor to sketch during my travels and I decided to use it to make something more substantial and sustained. I found watercolor quite difficult compared to oil paint as every mark you make on the paper remains at some level visible. It forces you to accept mistakes while you do all you can to try and minimize them. But mostly I loved the color the transparent washes of color could create despite my perpetual uncertainty and constant mistakes.

Discipline of Geography  1.6.11
Disciplines of Geography 1.6.11

I determined to make my own version of a history painting with watercolor by focusing on the process of painting. I started thinking about how time and space were linked with the history of the European borders. To watch the ebb and flow of the borders of different countries and governments overlapping and being overlapped was similar to the way watercolor extends out from a pour of paint on wet paper. Each layer of color is effectively redrawing the boundaries, while simultaneously building a history where every subsequent state is influenced by the previous colors, values, and borders of those before them.

As these paintings are nonobjective abstractions, meaning I was not looking at anything specific to inform my color choices, I needed something to inform my decision making. Often abstractions come from found or referenced materials, like photos, or found objects, which can often help direct the choices of value, color, line, etc., that one is making. Why choose one blue instead of another? At some level we choose colors we like or look better to us, but I like working in or creating systems that push me outside of what I normally feel comfortable with. As these paintings existed in the realm of ideas and needed a similar structure to build upon, I really started looking into the color wheel as a tool to think about the relationships of the different colors. (This itself became a multi-year ongoing project.) Without going down that path too far, I wanted to share something I found interesting and helpful in the context of making these watercolors as well providing a greater understanding to how color relates in other contexts.

As a student I was shown, in conjunction with the color wheel, certain color relationships that were supposed to help us make harmonious color choices in our images. We were supposed to make color choices based off of the relationships of the colors’ locations on the color circle. Complementary colors were any two colors on opposite sides of the circle, split complements exchanged one of those two colors for the two colors on either side of it, triadic colors were three colors equally distanced from each other, and so on. But was yellow the complement of purple?  Or of blue?  Because artists use more than one color wheel, it depended on which color circle you decided to go with.

The Red Yellow Blue (RYB) primary color circle was most often used during my schooling. This was because those were the pigments we most often used, and in this case yellow did complement the mixture of red and blue, which was called purple. If you mixed all three you tended to get a dark color that, depending on your ratios, was a pretty decent neutral, which is really important in color mixing. Hardly anything in the world around us is a fully saturated color.

color wheels-01

However, with light it is very clear, and also demonstrable in your own home with flashlights and colored films, that blue is the complement of yellow. And when they mix they create a fairly neutral white. As color is essentially about light (and pigments are a complicated world in themselves) I decided to go with the Red Green Blue (RGB) color circle. As an added bonus, those clever artists and color scientists figured out that certain other pigments can work quite nicely in this structure. Cyan, Yellow, and Magenta are the colors that Red, Green, and Blue light make when mixed, while Red, Green, and Blue are made with Cyan, Yellow, and Magenta pigments. Learning that was incredibly satisfying.

color wheels-02

But since Cyan, Magenta, and Yellow pigments don’t actually create Black, Black is needed for the very darkest colors.  So this system is called the “CMYK” system, where “K” is used for Black so it’s not confused with Blue.

There’s a neat way these two systems can be combined, called the “Yurmby” wheel, which I used to create Disciplines of Geography.  That’s where we’ll start next week!

 

Vienna!

Last week, I attended the Symmetry Festival 2016  in Vienna!  I’d like to share some highlights of the week.

The first was a sculpture based on a hypercube net.  One of the most famous illustrations of this geometrical object is Dali’s Crucifixion.

300px-Dali_Crucifixion_hypercube

Without going into too many details, eight cubes may be folded into a four-dimensional cube — called a hypercube or tesseract — just as a net of six squares may be folded into a cube.  Because folding a flat net of six squares requires folding into the third dimension, folding a hypercube net requires a fourth spatial dimension.

Analogously, just as the squares are not distorted as they are folded into the third dimension, the cubes are not distorted when folded into the fourth dimension.  A little mind-blowing, but true.

Silas Drewchin created the following sculpture based on the hypercube net.

IMAG2373.jpg

You’ll notice a few differences:  there is an extra cube added, for a total of nine cubes.  And there are three additional struts added to support the net being tilted at an angle.  Here is what he says about those design elements:

The Hypercross is a metaphor of acceptance….By giving the Hypercross an extra base cube, the mathematical purity of the net tesseract is shattered because a true tesseract only has two base cubes. To disfigure the purity of Christian symbolism embedded in the tesseract, it is tilted to an acute angle as if it is tumbling to the ground. Without this tilted adaptation the sculpture would look dogmatic. The hybrid distortions of the mathematical form and religious form actually add to the message of acceptance.

An additional feature of this work relates to the shadows it casts.  The photo speaks for itself.

Screenshot 2016-07-24 03.33.42

A fascinating piece!  I’m a big fan of the fourth dimension, and always appreciate when it arises in mathematical and artistic contexts.

The second highlight for me was meeting someone who is interested in creating the same type of digital images I do.  I had met Paul Gailiunas before at previous conferences, but never knew of his interest.  Here is an adaptation of one of his images — you’ll notice a similarity to those I recently posted on Twitter (@cre8math, 2016 July).

ThreeAngles20Jul16

What was facscinating to me was how he created images like these.  I first discussed these images on Day007, where I used the same recursive algorithm typically used to create a Koch snowflake:

F  +60  F  +240  F  +60  F.

But Paul used a different recursive algorithm, which I’ll briefly describe — it definitely has a similar flavor, but there are important differences.  Define a function R so that R(1) means move forward and make a turn of some specified angle a, and R(2) means move forward and make a turn of some angle b.  Then recursively define

R(n) = R(n – 1) R(n – 2).

For example, choosing n = 3 gives the two segments produced by

R(3) = R(2) R(1).

But to obtain R(4), we need to use recursion:

R(4) = R(3) R(2) = R(2) R(1) R(2).

This recursive process may be repeated indefinitely.

This algorithm, like the one used to generate the Koch curve, sometimes closes up and exhibits rotational symmetry.  One challenge in this case is that the center of symmetry is not the origin of the coordinate system!  A rigorous mathematical proof of which choices of angles a and b generate a closed, symmetric curve is still forthcoming….

A third highlight was the Family Day activities in front of the Karlskirche in the Karlsplatz.  At conferences like these (such as the upcoming Bridges conference in Finland), there is a day where mathematics and art activities take place in a public venue, and anyone walking by can sit down and participate.

I sat down at the table demonstrating the Poly-Universe, a system of geometrical forms created by Janos Saxon-Szasz.  They were fun to play with, and rather challenging as well!

IMAG2430

I was happy to have solved the puzzle illustrated here — put together all 24 tiles to make a system of hexagons so that the colors and shapes all match.  There are many solutions, but none are easy to find.

What makes these forms interesting is that each tile includes four colors and parts of four differently sized circles.  Moreover, they occur in all possible combinations — and since there are 4 sizes of circles, there are 4! = 24 possible configurations.

There are also forms made from triangles and squares, which pose a different challenge.  I moved to help a young girl and her mother try to put together a 6 x 4 rectangle from the 24 square pieces, but was not so successful there.  At some point you have to move on to see the other exhibits….

A final highlight was the Natural History museum in central Vienna.  They had an extensive array of minerals and gems — the largest collection I’ve ever seen.  The colors and textures were diverse and beautiful, and of course when looking at crystal structures, there’s a lot of geometry.

Because the rhombic dodecahedron is space-filling, it tends to occur as the basis for crystal structures, as shown here.

IMAG2436

It is always remarkable to me how nature is constrained by geometry — or maybe geometry is derived from nature?  Regardless of how you look at it, the interaction of geometry and nature is fascinating.

The week went by pretty quickly, as they usually do when attending conferences like these. Stay tuned for further updates on my European adventure!  (I’m also tweeting daily at @cre8math.)

Bridges: Mathematics and Art II

As I mentioned in my first post about Bridges 2016 (see Day038), one of my students, Nick, had artwork and a short paper accepted, and also received a $1000 travel scholarship! This week, I’d like to share his work with you. His paper is called Polygon Spirals. Here is the abstract (all quotes are taken directly from Nick’s paper):

Logarithmic spirals may be classically constructed with a chain of similar triangles that share the same center of similitude. We extend this construction to chains of n-gons with centers on a logarithmic spiral with turning angle \pi/n, and scale factors with interesting properties. Finally, polygon spirals of this kind are used to produce a variety of artistic images.

I first learned of Nick’s interest in this type of spiral when he was in my Calculus II class, where he introduced a similar idea for his Original Problem assignment (see Day013). I encouraged him to continue with this project and submit his work to Bridges 2016. Here is Nick’s motivation in his own words:

The investigation of polygon spirals began by studying curves that arise when regular polygons with an odd number of sides are strung together. When polygons are strung together into a band by gluing them together along their sides, then the choice of what subsequent edge pairs are being used will define a turning angle introduced at each joint. In this paper we focus on bands made with minimal turning angles and with a consistent turning direction. Each odd n-gon defines its own turning angle, \pi / n. Moreover, by introducing a constant scale factor that modifies each subsequent polygon, a large variety of logarithmic spirals can be generated.

logarithmicpentagons
Figure 1: Logarithmic construction on pentagons
nestingarms
Figure 2: Spirals in phase

My original inspiration came from observing spirals of opposite handedness emerging from adjacent faces of the same polygon. The natural question that arose was which ratio to pick so that the two polygon chains would fall in phase, as in Figure 2. In other words, I needed to find the ratio such that every crossing point of the two logarithmic spirals coincided with the center of a polygon along each band. In this case, the two bands would share a polygon every period. I found this to be achieved when the golden ratio was applied to pentagons, which spurred a determination of the analogous ratio for generalized n-gons that corresponds to the sharing of every n^{\rm th} polygon. The construction hinges on similar triangles whose vertices are the center of a polygon, the center of one of that polygon’s children, and the center of similitude.

spiralFigure 3: Logarithmic similar triangles

Referring to Figure3 (illustrated in the case n=5), \alpha=\pi/n and \beta=3\pi/n, so that \gamma=\pi/n. Now the triangle with angles labelled \alpha, \beta, and \gamma is isosceles because \alpha = \gamma. Moreover, the ratio between the longer and shorter sides is the same for all triangles since the spiral is logarithmic. If the shorter sides are of unit length, half of the base is \cos (\pi/n), making the base, and thus the ratio, equal to 2\cos (\pi/n).

Once the ratio has been found, spirals can be nested by applying a rotation of \pi/n. Completing this process yields n nested n-gon spirals.

With the ratio found above, it is not hard to show that the equation for one of the logarithmic spirals with this ratio, passing through the centers of the n-gons, has the equation:

r = (2\cos (\pi/n)) ^{n \theta/{\pi}}.

heptagons
Figure 4: Heptagon spiral

With most Bridges papers, there is a mix of mathematics and art. In fact, the first criterion listed on the Bridges website for art submissions is “Math content (this is a mathematically sophisticated audience.)” The second is “Esthetic appeal,” so artistry is important, too. What follows is Nick’s discussion of how he used the mathematical ideas discussed above to create digital art.

art3
Figure 5: Pentagon arms

Begin with a base polygon, and consider producing spirals from every face at every iteration. Although this would create too dense a pattern, it is possible to produce an interesting subset of this set of polygons using a random algorithm. This algorithm assigns a probability that a spiral is generated from each face of the n-gon, and this probability is randomly altered and then inherited by each child. The colors are also inherited and altered every generation. In Figure 5, the detailed texture is actually built of many small pentagons at a deep iteration. Off to the right can be seen a randomly generated pair of pentagonal arms falling into phase.

art1
Figure 6: Nested pentagon tiling

Figure 6 is a tiling of pentagons that features nested rings of pentagons with the property that any two adjacent pentagons differ in size by a ratio of the golden ratio. Figure 7 is an overlay of nonagon spirals with ratios between 0 and 1. This image captures the vast breadth of possible spirals based on a given n-gon, and the fascinating way that they interact.

art2
Figure 7: Nonagon spiral overlay

Figure 8 was randomly generated by the same algorithm which produced Figure 5, however with nonagons rather than pentagons. This picture illustrates the infinite detail of a fractal set based on interacting nonagon spirals.

art4
Figure 8: Nonagon bush

Quite an amazing sequence of images! Nick took a Python programming class his first semester, and so was well-versed in basic coding. As a mathematics major, he had the necessary technical background, and being a double major in art as well helped him with the esthetics.

So yes, it took a lot of work! But the results are well worth it. Nick’s success illustrates what motivated undergraduates can accomplish given the appropriate encouragement and support. Let’s see more undergraduates participate in Bridges 2017!

 

Mathematics and Digital Art IV

This week will complete the series devoted to a new Mathematics and Digital Art (MDA) course I’ll be teaching for the first time this Fall.  During the semester, I’ll be posting regularly about the course progression for those interested in following along.

Continuing from the previous post, Weeks 7 and 8 will be devoted to polyhedra.  While not really a topic under “digital art,” so much of the art at Bridges and similar conferences is three-dimensional that I think it’s important that students are familiar with a basic three-dimensional geometric vocabulary.

Moreover, I’ve taught laboratory-based courses on polyhedra since the mid 1990’s, and I’ve also written a textbook for such a course.  So there will be no problem coming up with ideas.  Basic topics to cover are the Platonic solids (and proofs that there are only five), Euler’s formula, and building models with paper (including unit origami) and Zometools.

There are also over 50 papers in the Bridges archive on polyhedra.  One particularly interesting one is by Reza Sarhangi about putting patterns on polyhedra (link here).  Looking at this paper will allow an interested student to combine the creation of digital art and the construction of polyhedra.

At the end of Week 7, the proposal for the Final Project will be due.  During Week 8, I’ll have one of the days be devoted to a construction project, which will give me time to go around to students individually and comment on their proposals.

This paves the way for the second half of the semester, which is largely focused on Processing and work on Final Projects.

In Weeks 9 and 10, the first two class periods will be devoted to work on Processing.  I recently completed a six-part series on making movies with Processing (see Day039–Day044), beginning with a very simple example of morphing a dot from one color to another.

These blog posts were written especially for MDA, so we’ll begin our discussion of Processing by working through those posts.  You’ll notice the significant use of IFS, which is why there were such an important emphasis during the first half of the course.  But as mentioned in the post on Day044, the students in my linear algebra course got so excited about the IFS movie project, I’m confident we’ll have a similar experience in MDA.

The third class in Weeks 9 and 10 will be devoted to work on the Final Project.  Not only does taking the class time to work on these projects emphasize their importance, but I get to monitor students’ progress.  Their proposals will include a very rough week-by-week outline of what they want to accomplish, so I’ll use that to help me gauge their progress.

What these work days also allow for is troubleshooting and possibly revising the proposals along the way.  This is an important aspect of any project, as it is not always possible to predict one’s progress — especially when writing code is involved!  But struggling with writing and debugging code is part of the learning process, so students should learn to be comfortable with the occasional bug or syntax error.  And recall that I’ll have my student Nick as an assistant in the classroom, so there will be two of us to help students on these work days.

Week 11 will be another Presentation Week, again largely based on the Bridges archives.  However, I’ll give students more latitude to look at other sources of interest if they want.  Again, we’re looking for breadth here, so students will present papers on topics not covered in class or the first round of presentations.

I wanted to have a week here to break up the second half of the semester a bit.  Students will still include this week in their outline — they will be expected to continue working on their project as well.  But I am hoping that they find these Presentation Weeks interesting and informative.  Rather like a mini-conference in the context of the usual course.

Weeks 12 and 13 will essentially be like Weeks 9 and 10.  Again, given that most students will not have written any code before this course, getting them to make their own movies in Processing will take time.  There is always the potential that we’ll get done with the basics early — but there is no shortage of topics to go into if needed.  But I do want to make sure all students experience some measure of success with making movies in Processing.

Week 14 will be the Final Project Presentation Week.  This is the culminating week of the entire semester, where students showcase what they’ve created during the previous five weeks.  Faculty from mathematics, computer science, art, and design will be invited to these presentations as well.  I plan to have videos made of the presentations so that I can show some highlights on my blog.

Week 15 is reserved for Special Topics.  There are just two days in this last week, which is right before Final Exams.  I want to have a low-key, fun week where we still learn some new ideas about mathematics and art after the hard work is already done.

So that’s Mathematics and Digital Art!  The planning process has been very exciting, and I’m really looking forward to teaching the course this fall.

Just keep the two “big picture” ideas in mind.  First, that students see a real application of mathematics and programming.  Second, students have a positive experience of mathematics — in other words, they have fun doing projects involving mathematics and programming.

I can only hope that the course I’ve designed really does give students such a positive experience.  It really is necessary to bolster the perception of mathematics and computer science in society, and ideally Mathematics and Digital Art will do just that!