OpArt

September 26, 2011 Leave a comment Go to comments

OpArt is, by definition, a style of visual art based upon optical illusions. Let it be a painting, a photograph or any other mean, the objective of this style is to play with the interaction of what you see, and what it really is. A classical OpArt piece involves confusion by giving impression of movement, impossible solids, hidden images, conflicting patterns, warping, etc. And of course, Mathematics is a perfect vehicle to study—and even perform—this form of art.

In this post I would like to show an example of how to use trivial mathematics to implement a well-known example (shown above) in \LaTeX with the tikz package, and leave as homework another more interesting example.

Observe first the image above: the optical effect arises when conflicting concentric squares change the direction of their patterns. You may think that the color is the culprit of this effect but, as you will see below, it is only the relationship between the pure black-and-white patterns what produces the impression of movement.

Let us start by creating squares with both patterns. Notice that there is actually a single pattern, which is rotated 90º:

\def\squareL#1#2#3{
  \pgfmathparse{#1*8}
  \let\steps\pgfmathresult
  \begin{scope}
    \clip(#2,#3) rectangle (#2+#1,#3+#1);
    \filldraw[white] (#2,#3) rectangle (#2+#1,#3+#1);
    \foreach \step in {0,...,\steps}
      \draw[ultra thick] (#2+0.25*\step,#3) -- (#2,#3+0.25*\step);
  \end{scope}
}
\def\squareR#1#2#3{
  \pgfmathparse{#1*8}
  \let\steps\pgfmathresult
  \begin{scope}
    \clip(#2,#3) rectangle (#2+#1,#3+#1);
    \filldraw[white] (#2,#3) rectangle (#2+#1,#3+#1);
    \foreach \step in {0,...,\steps}
      \draw[ultra thick] (#2-#1+0.25*\step, #3) -- (#2+#1,#3+2*#1-2*#1*\step/\steps);
  \end{scope}
}

In both cases, we coded the square as a function of three variables: the size, and the location (as a point (x,y) in the canvas). For example, (inside of a tikzpicture environment) the command \squareL{5}{0}{0} places a square with one of the patterns, and this square will have corners at the origin and the points (0,5), (5,0) and (5,5).

step1

Notice how this pattern alone starts producing that optical effect by itself. Let us change the pattern in consecutive steps, including two more concentric squares inside of this one, like so:

\begin{tikzpicture}
  \squareL{5}{0}{0}
  \squareR{3}{1}{1}
  \squareL{1}{2}{2}
\end{tikzpicture}

step2

For a stronger effect, combine several of these in a bigger image, taking advantage of the \foreach command:

\begin{tikzpicture}
  \squareL{13}{0}{0}
  \foreach \a in {1,5,9}
  {
    \foreach \b in {1,5,9}
    { \squareR{3}{\a}{\b} }}

  \foreach \a in {2,6,10}
  {
    \foreach \b in {2,6,10}
    { \squareL{1}{\a}{\b} }}
\end{tikzpicture}

step3

The second example is a little bit more involved, but I am sure the reader will find the challenge interesting enough to give it a try. How would you code the following piece of OpArt? (in \LaTeX or otherwise)

oparthomework
Movement in Squares, by Bridget Riley (1961)

Further reading and examples

As usual, I would like to close the post including an interesting selection of books (and in this case, some crafts too!) that might interest the reader. Enjoy!

Op Art (See all Pop Arts & Photography Books) Geometrical Designs and Optical Art: 70 Original Drawings (Dover Pictorial Archives) Paintstik Iridescent Primary Op Art Starter Pack By The Each
  1. Eva Czabarka
    September 26, 2011 at 7:05 pm
  2. Melody Taylor
    September 27, 2011 at 12:47 pm

    I certainly don’t understand the mathematics, but the art is most captivating. Thank you for showing me the connection; although much to my dismay, math is everywhere!

  3. Lois
    September 29, 2011 at 7:42 am

    I thought this interesting, it reminded me of an artist who was at the JMM 2010 – his work was more sculpture pieces though. I also thought the post on being an applied mathematician, cool esp the included \TeX portion –

  1. No trackbacks yet.

Leave a reply to Francisco Blanco-Silva Cancel reply