Wolfram Computation Meets Knowledge

Exploring Logo Designs with Mathematica

On my way to becoming a graphics developer at Wolfram Research, I took detours through degrees in design and architecture. One of my enduring passions is exploring graphic design with programmatic and generative systems. While some aspects of design require the skilled hand of the designer, others can be formalized and explored by computer. For those tasks, Mathematica is an exceptional tool.

Corporate logos and advertising images

As starting points for design explorations, corporate logos are ideal. They often distill a single idea into simplified geometric form that is straightforward to parameterize in Mathematica. Once a logo is in Mathematica, exploring its parameter space quickly leads to the discovery of new graphic phenomena, emergent forms, unexpected relationships, and burgeoning lines of inquiry. Mathematica‘s very high-level programming and interface constructs help your explorations keep pace with your brain as it flings out new ideas left and right.

Take a logo as simple as the Mercedes-Benz star. Just three points framed by a circle, its geometry is easily described in a few lines of Mathematica code, with some obvious parameters controlling the number of points on the star, the sharpness of the star’s points, the thickness of the outer circle, and the orientation of the star.

In[1]:= Manipulate[Graphics[{{Disk[],White,Disk[{0,0},ir]},Polygon[Table[With[{a=(or+90+i 180/n)\[Degree]},If[EvenQ[i],1,sh]ir{Cos[a],Sin[a]}],{i,0,2n-1}]]}],{{n,3,"points"},3,24,1},{{sh,.14,"sharpness"},0,1},{{ir,.94,"thickness"},0,1},{{or,0,"orientation"},0,360/n}]

With this Manipulate, you can explore the relative graphic weights of the star and circle, and the semantic import of the number of points on the star and its orientation. (The early Daimler-Motoren-Gesellschaft in fact registered, but never used, a four-pointed version of the logo.)

Star and circle relative graphic weights

But the real fun starts when you begin to explore the edges of the parameter space. That’s where you discover the unexpected. Along the way I wondered what would happen if I added some twist to the star. It took only seconds after the idea occurred to me for me to modify my Manipulate to accommodate it (the modifications are shown in red below). Mathematica‘s code is extremely malleable, which is important if you don’t want technical programming details slowing down your explorations.

In[2]:= Manipulate[Graphics[{{Disk[],White,Disk[{0,0},ir]},Polygon[Table[With[{a=(or+90+i 180/n+If[OddQ[i],tw,0])\[Degree]},If[EvenQ[i],1,sh]ir{Cos[a],Sin[a]}],{i,0,2n-1}]]}],{{n,3,"points"},3,24,1},{{sh,.14,"sharpness"},0,1},{{tw,0,"twist"},0,360},{{ir,.94,"thickness"},0,1},{{or,0,"orientation"},0,360/n}]

With the modified Manipulate, encapsulated as the Demonstration “Exploring the Mercedes-Benz Logo,” I took off exploring the breadth of designs that its parameterization encompasses. The diversity is astounding, including designs that suggest cinematography, folk art, heavy equipment, compass points, occult, and pharmacology. Here is a series of snapshots from along the path of my exploration.

Parameterized Mercedes-Benz logo

I was surprised that such a variety of designs would arise from a straightforward parameterization of this simple logo. But that’s often the case. This tiny corner of the design universe contains an infinity within itself. It’s like exploring a drop of pond water with a microscope. The universe within is dazzling.

Almost any graphic phenomenon of interest to designers can be explored with Mathematica. Here’s a logo by Franco Grignani for a special edition of a magazine. Slight offsetting of the centers of a stack of black and white disks gives rise to an elegant 3D effect. I parameterized the amount of offset as well as the number of rings and the inner disk radius, and added some twist and a control for dragging the point to which the disks converge. You can see the result in the Demonstration “Exploring a Logo by Grignani.”

In[3]:= Manipulate[Graphics[With[{th=(1-rMin)/(2n-1)},Table[Rotate[{{Black,Disk[c(i/(2n-1)),Abs[1-(1-rMin)(i/(2n-1))]]},{White,Disk[c(i/(2n-1))+{0,d(-th+2 th((i+1)/(2n-1)))},Abs[1-(1-rMin)((i+1)/(2n-1))]]}},360\[Degree] tw(i/(2n-1)),{0,0}],{i,0,2n-1,2}]],PlotRange->1],{{n,16,"rings"},1,50,1},{{rMin,.02,"inner radius"},0,1},{{d,-1.07,"displacement"},-10,10},{{tw,0,"twist"},0,10},{{c,{0,0}},-{1,1},{1,1},ControlType->Locator,Appearance->None}]

Once again, parameterizing this simple idea leads to a wealth of interesting phenomena. The resulting designs range in character from bold woodcut to fine engraving to half-toned artwork.

Parameterized logo by Franco Grignani

Some logos are not so crisply geometric as the ones above, and graphics primitives alone don’t suffice to realize them. An example is the blurry Tate Gallery logo, which comes in many formal and color variations, one of which is approximated by the starting point of the Demonstration “Exploring the Tate Logo” shown below. Here Mathematica‘s image processing tools provide the functionality needed for exploring color relationships and edge hardness.

Exploring the Tate Logo

Mathematica‘s image processing functions are sufficiently fast that the logo’s blur can be explored interactively. Color setters let you explore color relationships, while convenience controls for swapping and inverting colors make it easy to check the effectiveness of, say, a black-on-white design when it is used white-on-black.

Logo explored interactively

I took advantage of Mathematica‘s splines to explore variations of a design by the Norman Gorbaty and Ken Kirkwood Agency for Reyflex Textilien (see the Demonstration “Exploring the Reyflex Textilien Logo“). A bump in a series of vertical lines becomes progressively more pronounced, alluding to the process of weaving with flexible fibers.

Exploring the Reyflex Textilien Logo

My explorations with this Demonstration quickly departed from the bold graphic nature of the original logo. I was fascinated by the shadings and three-dimensionality implied by variations in the spacings of fine lines, as well as by the shapes of the figure envelopes. There’s no reason to let yourself be constrained by the character of the starting point.

Reyflex Textilien design explored interactively

My final exploration has to do with fonts. Graphic designers love fonts, and they love playing foreground/background games. These ideas are combined in the Demonstration “Reversed-Out Letterforms.” This is more than a one-off quickie demo, although it started out that way. It ended up as a polished interface for designing letterform sequences, some of whose members are reversed out of the others.

Here is a snapshot of the Demonstration. Sliders select characters and adjust inter-character spacings. (It would be more natural to type the string into an InputField, but InputFields are not allowed in Demonstrations.) The type of character overlap is controlled by a row of buttons: white on top, left to right, or right to left. At the bottom of the controls are checkboxes for choosing display variants that help with precise character alignment and visualization of the white characters.

Snapshot of "Reversed-Out Letterforms" Demonstration

With fonts, design opportunities depend greatly on the geometries of the letterforms and the particular sequences of characters. The regular geometry of the Braggadocio font works well in this “acm” logo. The “a”‘s disk nicely complements the reversed-out disk of the “c,” and the reversed-out bottom of the “c” echoes the curved negative spaces in the “a” and the “m,” unifying the design and giving it a pleasing rhythm.

acm logo

For this “ccc” logo, I needed functionality that my Demonstration didn’t provide: I wanted to fill the counter—the interior space—of the middle “c” because the black of the final “c” alone was not sufficient to reveal its form.

ccc logo

With some systems this might have been a dead end, but Mathematica‘s drawing tools work inside Manipulate as well as outside. After I had adjusted the positions of the letterforms, I intervened by hand to draw an oval directly in the Demonstration graphic and move it behind the “c” to fill its counter.

ccc logo adjusted in Mathematica

This brings up a point worth emphasizing. A parametric or generative design widget does not need to be a self-contained, complete design tool, any more than a camera needs to produce finished magazine covers. It’s part of a mix, and moving between programmatic generation and Illustrator or photocopier or scissors and glue enriches the design process. Mathematica provides the import and export functionality to get material in and out conveniently.

In this Demonstration, Mathematica‘s image processing functions came in handy in an unexpected way. For effective reversed-out letters, you need bold, beefy, black fonts. Lacy script-like letterforms don’t provide enough black area to make a superimposed white letterform visible. So for this Demonstration I wanted to weed out fonts from the font menu that were not likely to be effective.

Now think about how you would do that in Illustrator or your other favorite graphic design program. There’s really no alternative to scanning the fonts visually to pick out the black ones. On my laptop, that would be 264 fonts to scan, and I have only the standard ones installed.

In Mathematica, of course, you can do it programmatically. I wrote a short function that rasterizes a representative 48-point character in a font; turns the result into an image via Rasterize; applies image processing functions to turn the image into just black and white pixels (Binarize), eliminate white space around the letterform (ImageCrop), and count the resulting numbers of black and white pixels (ImageLevels); and then returns the fraction of black pixels. Here is that function.

In[4]:= FontBlackness[font_]:=Module[{char,image,levels},char=Style["a",FontFamily->font,FontSize->48];image=Rasterize[char,"Image"];levels=image//Binarize//ImageCrop//ImageLevels;levels[[1,2]]/(levels[[1,2]]+levels[[-1,2]])//N]

Using that FontBlackness function, I sorted the fonts on my system from light to dark, as shown below. In the Demonstration’s font menu, I list only the fonts whose blackness is greater than .65, and thus winnow down 264 potential fonts to a useful 32.

Fonts sorted from light to dark in Mathematica

With all of these Demonstrations, half the fun is seeing the designs in motion as they change, so visit the Wolfram Demonstrations Project and give them a whirl yourself. Mathematica can be a surprisingly useful design partner, whether you’re creating logos, doing design studies, or generating material to elaborate elsewhere. Or, as I often am, just having fun.

Download the Computable Document Format (CDF) file

Note: Some of the material referenced herein is subject to copyright law, and trademarks/logos appearing in this Blog and the associated Demonstrations are the sole property of the registered owners. While no endorsement by trademark owners should be construed, reasonable efforts have been made whenever possible to credit the sources and owners. The limited, attributed, non-competitive and non-commercial use of such material falls under the Fair Use provisions of intellectual property laws.