Session 3 Direct link to this section

Before the course Direct link to this section

Please bring:

  • your laptop
  • your poster from Session 2, printed on A3 paper
  • an installation of Python
  • an installation of a code editor
  • optional: an installation of the AxiDraw utilities

Tasks in class Direct link to this section

Poster Talk Direct link to this section

Quickly present your poster:

  • what collections did you make?
  • what did you talk about with your partners?
  • how was working with another’s code?
  • what worked well?
  • what were the challenges?

Reading files Direct link to this section

It can sometimes be a good idea to split up our workflow into multiple different smaller files: pulling content from one file, doing the layout in another. Like this you can keep modifying your files and plug everything together at the last moment.

In class, we will only take a look at .csv and .txt files. We will make use of iteration to to iterate over the texts to use them as our typesetting material.

Samples

Modify your typesetting engine from earlier so that it can handle input from a file. You could modify the variable for the text input, so that it takes a .csv-file as input.

Getting to know the command line Direct link to this section

The command line is an interface to interact with your computer using textual input. Terminal is the pre-installed software that allows you to do so. Open it. You can navigate your file system either using the cd directory command (change directory, where directory is the file path you want to navigate to). Alternatively you can CMD + drag a folder from your Finder onto the terminal icon. This opens a new terminal window at that directory aka folder.

If you do not know where you currently are, you can run pwd which is short for print working directory. This will tell you in which directory you currently are in with the active terminal window.

Next you could type which python. This will tell you the path to the python version you are currently using. Ideally this is the version you installed at home. which followed by a name or command will tell you which version of a software/command you are using. This is handy when you have multiple versions of one software installed.

Python without Drawbot Direct link to this section

In this step we will need a code editor. You already have one (although it is probably not an ideal one) called Drawbot. Otherwise you can get another one such as Visual Studio, Brackets or even use TextEdit (although this is not ideal either). We will start to write standalone Python files that will have much in common with those that we wrote in Drawbot.

Python code can not only be run in Drawbot, but also from the command line. This is done by running python path/to/your/code.py from your command line. This will run the python file using the python version installed in your system. Please note: this will most likely throw an error if you try running Drawbot code.

We can start to write a very simple script that will do nothing but print some text to the terminal window. For this we use the print() command that we already know from Drawbot. A sample can be found here. You can run it by navigating to the folder that the file is in using your command line and then type python helloworld.py. This will run the code and print hello world to your command line.

We can also combine the previously learned and read an write to files. This can be handy, when you want to sort data. Making use of the above example, we could write the output of the csv sample script to a .txt file like so.

Animation Direct link to this section

We will take a brief look into animation with DrawBot. If you have a multi-page DrawBot document and save it as .mp4 or .gif, DrawBot will take every page as frame of your animation. Here is a sample script.

Plotter introduction Direct link to this section

We will have a quick introduction to the pen plotter in the CoLAB. A short documentation on its use can also be found here.

Exhibition 2 Direct link to this section

Our second exhibition will take place on 6th February at 18:30h, when all the posters are plotted.

»Schein« Direct link to this section

Your »Schein« or course certificate will be issued not only as PDF, but also as a plottable file. I would like to invite you to plot it on a t-shirt in the second production session. The Scheine will be signed on the T-Shirt.

An image of the setup to print on cloth: a white t-shirt clamped to an underlying frame.

Scheduling one-on-ones Direct link to this section

To facilitate your further work, we will have feedback sessions as one-on-ones. I would like to ask you to send me e-mails including the following:

  • a date and time proposition (mondays or wednesdays)
  • your code that you would like to talk about one week prior to the meeting
  • feedback about the course. You can also leave it anonymously on this pad.

In these one-on-ones we will talk about the posters that you will produce using your typesetting engines and the csv-files that you created. I will give you feedback both on the design and the code.

Production sessions Direct link to this section

We have two prodcution sessions scheduled: 6th and 13th February, 10h – 13:30h. Please have your files ready!

The first production session will be dedicated to plotting your posters.

The second production session will be dedicated to printing your t-shirts.

To load-balance the process of plotting, please choose a slot here.

Homework Direct link to this section

Poster Direct link to this section

Produce a poster in A1 format using your typesetting engine and the csv-files that you created.

Swap the csv-file with at least one other person from the course and use it as input for your poster. This way we create variations of one and the same poster using altered input.

Plot it for the exhibition after having had your feedback session.