You are on page 1of 26

algorithm, program & process 

vicky isley & paul smith 
www.boredomresearch.net 
aoc@boredomresearch.net
introduction 

This session will cover the following: 

­ Students present their findings from week one assignment. 

­ Present an illustration of an algorithm. 

­ Presentation of an illustration of computational algorithm. 

­ Illustration of the simple creation of a computational algorithm. 

­ Example of a computational algorithm simple enough to be executed by a 3yr old but capable of 
outputting complex musical patterns. 

­ Exercise exploring the process of algorithm adaptation and creation 

­ Presentation 'Notation, Artist, Code and Creation' (artist writing code without a computer) 

­Exercise Programming by issuing instructions 

­ Evaluations and summary of the days outcomes 

­ Present your assignment to be completed by the end of the week.
Present findings from week one assignment 

Each student will have 2 minutes to present their findings, including a visual representation and a 
200 word synopsis.
Present an illustration of an algorithm 

An algorithm is a set of steps that allow us to reach a goal. If our goal is to create an image then 
the algorithm is all the things we will need to do to create this image. Once we know what we 
need to do to achieve our task we can then write these steps down as instructions. 

An algorithm can be written in different forms for example as instructions in English or Japanese, 
as diagrams, as coded information or as a computer program. Seen in this way an algorithm is a 
bit like a story as it can be told in a number of languages as a book a play a film etc. As it is true 
to say that to write a book we first need to have a story it is also true to say that to write a 
program we first need to have an algorithm.
If our aim was to create a box from a sheet 
of paper first we may find a way to fold the 
paper into a box then we could write this 
procedure down as a set of instructions. 
These could either take the form of pictures 
or text instructions or a combination of the 
two. 

These instructions (program) enable 
another or several others to make the same 
artefact over and over again. The act of 
making the object is the process. 

So here we have the sequence Algorithm ­ 
Program ­  Process. 

Following from this to make a computational 
artwork we first set our goal. Develop a set 
of steps to achieve this end. Write a 
program to instruct a machine i.e. computer 
to perform these steps. Run the program on 
a computer and experience the result of the 
algorithm.
Present an illustration of a computational algorithm

A computational algorithm is the same as an 
algorithm but with the inclusion of computation. 
This can be as simple as +1.  For example if our 
aim was to get to the top of the stairs then we 
take one step forward and up until we get to the 
top effectively adding 1 to the number of steps 
taken. 

This is a program written in a programming 
language called processing. We can see that a 
number of squares are being drawn on the 
screen in a particular way. The way that the 
squares are being drawn is a consequence of 
the program and we know that the program 
represents an algorithm. To what extent can we 
reverse engineer the algorithm from the 
process. Some things that we can see from 
observation is that the colour that is being used 
to draw the squares changes periodically. We 
can also see that there appears to be a degree 
of randomness to where the squares are drawn 
but they always conform to a grid. There are 
locations where squares are not drawn and 
predominantly the location of the next square is 
to the right or below the previous square. 
We will now look at some of the underlying  However there is another way that we 
rules that cause this behaviour to occur.  can describe this algorithm. One that 
can be understood by anyone above 
int v=0;  the age of three. Once we understand 
while (v<100){  this in a simpler form we can then 
v =+ int(random(6));  immediately see how we could adapt it 
if (v=10){  to change the result. 
v=60; 
}  The first thing we will do is represent 
if (v=80){  the number­space in a visual way, 
v=30;  after­all we are visual people. Here we 
}  are dealing with numbers ranging 
}  between 1 and a 100, so we could do 
this with a grid of squares 10 by 10. 
The above algorithm written in the  Once we have numbered the squares 
processing programming language  from 1 to 100 we could then place a 
manipulate the value of V it keeps  marker on square 0 to represent the 
manipulating the value of V until it is more  value of V. We could then use a dice to 
than 100. The above represents the  generate random numbers between 1 
fundamentals causes behind the visual  and 6. before adding this to the value of 
phenomena we witnessed before. If we  V. We add this to the value of V by 
were to ask you to write a variation of this  moving our marker around the number­ 
algorithm you might struggle without first  space.
learning the necessary components of the 
processing programming language. 
We then need a way to define key values  We can see clearly how we could change 
that will be substituted for example if at any  the arrangement of the snakes and ladders 
point V is the same as 10 then V is changed  to effect game­play. If we increase the 
to 60. We could write these as a list of  proportion of ladders to snakes we end up 
number pairs (10,60),(80,30) or we could  with a game that will end quickly. if we do 
draw lines that join the values on the  the opposite then a game could take years 
number space. For example we could draw  to end. If we have a snake and a ladder 
a line from square 10 to square 60. To avoid  start and end on the same square then our 
confusion or ambiguity we might like to draw  marker will become trapped in a recursive 
an arrow on these lines so that we know  loop that never ends and this is exactly 
that a line drawn from square 10 to square  what happens when a computer crashes.
60 changes the value of 10 to 60 and not 
the value of 60 to 10. Another way we could 
represent the directional quality of the lines 
is by using a graphic metaphor. For 
example we could show that the value of V 
is ascending by illustrating this line as a 
ladder. or we could show that it is 
descending by illustrating it a something 
slippery like a slide or a snake. 

By now what we can clearly see that our 
once complex computational algorithm has 
turned into a game of snakes and ladders. 
We now have a simple model that can be 
understood by preschoolers and can easily 
be changed and explored. 
Midi Snakes and Ladders is a piece of software written in macromedia director that enables 
users to draw their own snakes and ladders board effectively writing an algorithm. The algorithm 
is then interpreted as Midi output enabling the creation of complex musical compositions. 

Exercise: Create a new algorithm by creating a variation of a snakes and ladders 
board. 

Think how the arraignment of snakes and ladders will effect the manipulation of the value V. 
Consider what other possible variations could be included and what the potential output could be.
notations, artists, code & creation
what is notation?........ 

Notation is a system used to represent something else i.e. mathematics, sound, visual form. 

All computers use a form of notation by representing information as a bit pattern i.e. code – we 
can call this binary notation. Computers use a protocol where every letter of the alphabet or 
symbol is assigned a 7 digit binary number (a pattern of 0’s & 1’s). To describe our actions and 
emotions we all use a forms of notation through language and visually. 

A notational system that many artists have used within their work is pseudo code. Also, 
programmers and computer scientists have used pseudo code to describe their work to others 
without any programming experience. 
artists use notation.. 

Using a notational system is a good method to plan ideas without the constraints of a 
programming language. Through writing a notation you can commence the process of planning 
your program procedurally step­by­step. 

If an artist wants another individual to execute their work, often they will write a notation. Usually, 
this notation has a framework and a setup which the interpreter understands.
Notation to execute some pillow lace 

the algorithm can be defined by a pattern template & a set of instructions  the process is the piece of lace
Notation to execute an image: Simon Faithful’s Palm Pilot Drawings 

the process is a simple drawing which could be 
the algorithm is represented as a set of instructions 
represented onscreen or on graph paper
Notation to execute an object: Martin Creed’s Work #79 Blu­Tack 

some Blu­Tack kneaded,rolled into 
a ball, and depressed against a 
wall

the algorithm is represented as a set of instructions  the process is the execution of the instructions as 
an object 
In this presentation we have used three examples of notations written by craftspeople/artists. For all of 
these notations to be executed accurately it is vital that: 

1.) the interpreter has a clear understanding of the code 

­ The lace maker needs to be able to follow a lace pattern template & code 
­ The interpreter following the drawing instructions needs to understand the principles of a grid co­ordinate 
system 
­ The interpreter following the object notation needs to be able to understand English written instructions. 

2.) that the program is not too ambiguous 

All these notations leave some ambiguity but if the interpreter has an in­depth knowledge of the aesthetics 
that the creator requires. Through practise and a clear understanding of the creator’s requirements the 
outcome can be fairly true to the artist’s intentions. 

3.) the artist decides upon the limitations of the program 

Although these written notations still have a level of flexibility – for example the individual maybe able to 
alter the size of the final piece dependant on what thickness thread, pencil or piece of Blu­Tack they 
started with. Whereas a computer program is very rigid in its construction, working in a Boolean fashion 
things are either ON or OFF there are no in betweens. Like the traditional art forms the programmer will 
choose their programming language, their medium conscientiously which is often dependant on the 
chosen outcome.
“Many pieces of software may have their origins in a quick 
impulsive decision, but as soon as they are made manifest in 
code they become rigid and fixed as dictated by the constraints of 
the technology. If the final program was specified through a 
combination of diagrams and text descriptions, it would be 
possible for the artist to work a longer time and more often in 
an undefined mental space.” 

Software Structures, Casey Reas
Sol LeWitt, Walldrawing #358 

A 12" (30 cm) grid covering the wall. 
Within each 12" (30 cm) square, 
one arc from the corner. 

(The direction of the arcs and their 
placement are determined by the 
draftsman.)

the process is the execution of the instructions as 
the algorithm is represented as a set of instructions 
a walldrawing 
Casey Rea’s software version of Sol LeWitt’s, Walldrawing #358 

void setup()  void arc_0(int xC, int yC, int r)  void arc_2(int xC, int yC, int r) 


{  {  { 
size(800, 600);  int x = 0, y = r, u = 1, v = 2 * r ­ 1, E = 0;  int x = 0, y = r, u = 1, v = 2 * r ­ 1, E = 0; 
noFill();  while (x < y) {  while (x < y) { 
stroke(255);  thin_point(xC + y, yC ­ x + res); // ESE  thin_point(xC ­ y + res, yC + x); // WNW 
background(0);  x++; E += u; u += 2;  x++; E += u; u += 2; 
framerate(12);  if (v < 2 * E){  if (v < 2 * E){ 
}  y­­; E ­= v; v ­= 2;  y­­; E ­= v; v ­= 2; 
}  } 
int res = 50;   // Resolution of grid  if (x > y) break;  if (x > y) break; 
int arcres = 48; // Resolution of the arc  thin_point(xC + x, yC ­ y + res); // SSE  thin_point(xC ­ x + res, yC + y); // NNW 
}  } 
void draw()  }  } 

for(int i=0; i<height; i+=res) {  void arc_1(int xC, int yC, int r)  void arc_3(int xC, int yC, int r) 
for(int j=0; j<width; j+=res) {  {  { 
int r = int(random(4));  int x = 0, y = r, u = 1, v = 2 * r ­ 1, E = 0;  int x = 0, y = r, u = 1, v = 2 * r ­ 1, E = 0; 
if(r == 0) {  while (x < y) {  while (x < y) { 
arc_0(j, i, res);  thin_point(xC + x, yC + y); // NNE  thin_point(xC ­ x + res, yC ­ y + res); // SSW 
} else if (r == 1) {  x++; E += u; u += 2;  x++; E += u; u += 2; 
arc_1(j, i, res);  if (v < 2 * E){  if (v < 2 * E){ 
} else if (r == 2) {  y­­; E ­= v; v ­= 2;  y­­; E ­= v; v ­= 2; 
arc_2(j, i, res);  }  } 
} else if (r == 3) {  if (x > y) break;  if (x > y) break; 
arc_3(j, i, res);  thin_point(xC + y, yC + x); // ENE  thin_point(xC ­ y + res, yC ­ x + res); // WSW 
}  }  } 
} } 
}  } 
}  void thin_point(int x, int y) 

point(x, y); 
}
Sol LeWitt, Walldrawing #106 

Arcs from the midpoints of two sides of 
the wall. (Sol LeWitt instructions) 

“Executing Wall Drawing #106 in 
software brings into focus the coarse 
resolution of the screen as it creates 
many unintended artifacts. Another 
noticeable difference is the scale of the 
work. Executing a drawing in software 
means creating it without knowledge of 
the size of the output. A person could 
view this work on a small screen, an 
enormous display in an urban center, or 
could project it at the same scale as the 
original drawing on a wall. Flexibility in 
size is a part of the LeWitt's original wall 
drawings, but the potential difference is 
less.” Casey Reas

The walldrawing executed in code by Casey Reas 
Within this unit we are keen for you to follow a method of production where you are not 
constrained by a programming language but you gain an appreciation of the ‘art of code’ through 
understanding the processes and procedures of writing a program. 

Many of the exercises you will start by executing on paper this is to enable you the freedom to 
express your ideas informally. 

As we can see with Sol LeWitt’s wall drawing instructions, when these are transferred into code 
they soon become constrained by the structure & functions of the programming language.
The same structures in different programs 
A surface filled with one  // Code in the first frame of the  #include <GL/glut.h> 
hundred medium to small  Timeline  #include <stdlib.h> 
sized circles.  #include <math.h> 
Object.env = this;  #include "Circle.h" 
Each circle has a different  numCircle = 100; 
size and direction, but  circles = new Array();  static GLfloat spin = 0.0; 
moves at the same slow  static GLint once = 1; 
rate.  for(var i=0; i<numCircle; i++) { 
var nombre = "circle"+String(i);  static int width; 
var init =  static int height; 
{_x:Math.random()*Stage.width,_y:Sta 
ge.height*i/numCircle,r:10+Math.rando  Circle *circles[numCircle]; 
m()*50,sp:Math.random()­ 
Math.random(),ysp:Math.random()­  void display(void) 
Math.random(),id:i};  { 
var neo =  if(once == 1) { 
this.attachMovie("circle",nombre,i,init);  glClear(GL_COLOR_BUFFER_BIT); 
this.circles.push(neo);  once = 0; 
}  } 

this.onEnterFrame = function() {  for(int i=0; i<numCircle; i++) { 


this.clear();  circles[i]­>update(); 
for(var i=0; i<numCircle; i++) {  circles[i]­>move(); 
circles[i].update();  } 

for(var i=0; i<numCircle; i++) {  glutSwapBuffers(); 
circles[i].move();  glutPostRedisplay(); 
} } 

stop(); 

Sol LeWitt walldrawing instructions  Part of the program written in Flash MX  Part of the program written in C++ 


Implemented by J. Tarbell  Implemented by Casey Reas 
http://levitated.net  http://groupc.net
you can create your own notational system by following these steps: 

­ Create your own simple algorithm 

­ Problem solve how you are going to represent your algorithm as a program 

­ Implement your algorithm on paper following your program 

­Test the effectiveness of your program by passing it to an individual to execute 

Remember individuals have different ways of interpreting instructions. The art of being a 
successful programmer is to track down those potential flaws and retain it as a crash free 
program.
Create a notation to draw a geometric shape 

Draw a 200 x 200 mm square on a piece of paper. 

In the square draw a simple geometric shape in pencil. (Make sure no­one sees your drawing). 

Instruct someone else to draw your shape in a 200 x 200mm square by providing one instruction 
at a time. 

You can use any words to describe the process of drawing your shape but the aim is for the 
execution of your instructions to be as accurate as possible. If the person executing your program 
makes an error they cannot undo they must carry on with the next instruction. If you do give an 
instruction which you can foresee not working then you can correct the instruction if it hasn’t 
already been executed. 

After you have run your programs we will discuss the outcomes with the rest of the class.
Create a protocol to execute a drawing 

Working in pairs we will now repeat the above exercise however this time we will agree on a 
limited instruction language of no more than 20 words. 

Each instruction to draw a line can be a combination of these words. The idea is that we can use 
less to communicate more. For example rather than saying "colour the whole of the paper black" 
we could say "colour paper black" or even "paper black" or even "black" or even "0". Providing the 
person issuing the instructions has agreed with the person following them exactly what a 
particular instruction means we should be able to do more with less. Think how words can be 
combined i.e. "line east 3 0 black". 

Repeating the same instructions with another person who is not aware of the protocol, should 
result in a reduced level of accuracy. This is where the notion of code enters the act of 
programming. With a code used for cryptography both the sender and receiver have to have a 
key, a means of making sense of the symbols so they can interpret the intended message. With 
programming we have to learn the protocols of any particular language in order to be able to give 
accurate reliable instructions so that we can express our intended outcome.
Create your own program to execute a composition 

Draw a 200 x 200mm square on a piece of paper. 

In pencil, draw a composition within your square. The composition can only be made from straight 
lines. 

Utilising what you learnt in the last exercise, write instructions in English that will enable a person 
who has never seen the composition to draw it accurately. 

Please type your instructions and do not exceed 50 lines. 

All typed instructions must be emailed to: 
vicky + paul (aoc@boredomresearch.net) 
by midnight on Friday 17 th  February 2006
By the end of this session each student will: 

[1] understand and describe the distinction between and meaning of each of the three steps 
(algorithm, program and process) 

[2] be able to confidently give an example of an algorithm as well as appreciate how algorithms 
can be created abstractly before being described precisely in a particular form as in a computer 
program. 

[3] have a clear understanding of the term program as well as an appreciation of the importance 
of avoiding ambiguity. 

[4] have an understanding of the term process in terms of the culmination of the act of creation 
and can clearly visualize a path through the steps 'algorithm, program and process' to arrive at a 
complete artefact. 

[5]have started to explore how they can create meaningful content and express ideas through a 
process of instruction. 

[6]have experience a elucidating example of how computation can be used algorithmically to 
create a temporal experience. 

[7] have created a visual artefact through a process of instruction. 

[8]have seen a range of examples of algorithmic artefacts works that have been executed with 
and without a computer 

[9]have experienced a simple computational algorithm and have a clear understanding of how it 
can be used to create complex visual output. 

[10] have been imparted with a curiosity and a desire to explore the possibilities of this type of 
creative production.

You might also like