Pulling a Pattern out of a Hat

This exercise moves us away from the screen and the technology and gets us thinking about instructions, (en)coding, abstraction, and creativity.

Sending instructions to a machine is hard work – you have to be pretty clear and you have to use the right language – but if the computer doesn’t understand it tells you nice and clearly that you’ve got something wrong. If you get something wrong computer says ‘NO’!  Most of the time that’s it.

One of the annoying things about this is we lose some of the potential for making creative mistakes. In fact perhaps creativity is actually about making mistakes – or at least  – its about finding something we didn’t know we were looking for.

In the second half of the lesson we will move back to the computer and we will be introduced to a new program and a new way of playing with code creatively.

That program is called ‘Processing’.

You can download Processing for free – its Arduino big brother….and you’ll recognise lots of things that are similar. The good thing about processing is that it is a little more self contained – we don’t need a lot of electronics and a lot of libraries to get started with it.

You can get processing here.

and you can sit through and nice introduction with simple examples that work in the web browser here:

http://hello.processing.org

Processing is used a lot by artists who work with technology and it will give us a good place to test our programming skills and eventually to connect all the electronics we’ve been learning about back to a computer – so you can send sensor data to a computer or to the internet. You might build a controller or interface for an interactive art work or use sensors to trigger events on the computer screen or a projector.

Much of the code we use will be similar to what we used when programming the small screen on the Arduino – but here things are even easier because processing actually does a lot of the hard work for us.

While the languages we will be using are similar we will actually be using Java to program in processing (remember we use C++ when programming the Arduino)

 

For now lets close the computers.

  1. Grab a large sheet of paper or two and find a nice secret spot where no one can look over your shoulder.
  2. When your tutor asks you to take two slips out of the hat without looking. On the slips you’ll find the names of different shapes. If you get two the same take another one until you have two different shapes with which to work.
  3. Next you’ll be given three coloured pencils or texts to work with.
  4. Create a pattern using the two shapes and threes colours you’ve been given. Patterns are created by repeating the same steps or same rules over and over again. Try and work out how few steps and rules you need to create an interesting pattern using 2 shapes and three colours. Be careful – try and be neat – the more care you put in to your picture the more fun this will be.
  5. When you have invented your pattern  find another piece of paper.
  6. Translate you pattern into steps so that someone else in the room can follow them.
  7. read through your own  steps – do they work when you follow them? Are the clearly written? Will someone else be able to follow them? Do you need to change them?
  8. When you have created your steps pass them onto to the person beside you.
  9. Now you will become the computer. Follow the instructions you have been given by some else and recreate their pattern by following the instructions they have provided. Don’t cheat and take care to follow the instructions. Try and do the best pattern you can – take care. Part of the joy of this exercise is watching all the different ways people interpret your instructions.
  10. Repeat step 8 for someone else drawing.
  11. Collect the works that were made by following your instructions. Are they the same or different? What are they different?
  12. How would you change your instructions? Would you try and make them clearer? Are there new things that were discovered by others using your instructions? What were they?
  13. Rewrite your instructions and try again.

    Now onto processing.