# Picasso, by way of Fourier¶

### Using Fourier series to draw, animate, and sonify Picasso's line drawings¶

In [20]:
HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide(); } else {$('div.input').show();
}
code_show = !code_show
}
</script>

Out[20]:

In [2]:
import numpy
import matplotlib.pyplot as plt
from IPython.core.display import HTML
from matplotlib import animation, rc
import matplotlib
from IPython.display import HTML
from IPython.display import Audio
from IPython.display import clear_output
from struct import pack
import wave
from scipy.io import wavfile


## Introduction¶

I really like Picasso's studies of abstraction, in which he reduces a complex subject to its simplest representation which retains recognizability. The Bull is probably the most famous example, but all of his line drawings are interesting studies of abstraction.

This document uses Fourier Series to recreate some of Picasso's line drawings, to morph one drawing into another, and to sonify the drawings (i.e., to create a sound which carries the same information as the line drawing). This sound can be used to generate Picasso's images on an oscilloscope.

The Fourier Series provides a systematic, quantifiable method for studying abstraction, and for finding the level of complexity that is required to make a particular subject recognizable. It's not a perfect tool for doing so. The Fourier Series can only generate closed shapes, and it adds complexity by adding higher-frequency content to that closed shape. So, all forms "simplify" ultimately into circles or ellipses.

Move the slider below. How many Fourier coefficients does it take for the abstraction to become something recognizable?

In [12]:
anim1

Out[12]: