5 minute read

ART AND ALGORITHMS

Katharine Childs takes inspiration from the artist Sol LeWitt to create algorithmic art in primary computing lessons

Wikimedia Commons Credit:

Advertisement

At first sight, computing and art are an unlikely combination: computing seems precise, prepared, and predictable; art seems creative, expressive, and ambiguous. Sol LeWitt (1928–2007) was an American artist who conceptualised that the instructions for creating art were as important as the finished piece. He gave his instructions and diagrams to other people so that they could follow them and create wall paintings.

I have developed primary computing activities based on a particular type of LeWitt’s art. These comprise coloured stripes, and involve children writing their own algorithm to draw a stripy picture. An algorithm is a sequence of instructions or a set of rules to achieve something — in this case, some artwork. Once the algorithms have been written, children will work in pairs. One child can take the role of the artist who reads out their instructions, and the other will be the creator who carries out the directions exactly as they are instructed. It’s worth noting that LeWitt made some of his instructions deliberately ambiguous, whereas in the classroom, children will need to be precise with their algorithms so that they can be interpreted by a computer, or by a human artist working in a robotlike way.

Adapting across learning stages

This idea works well as an unplugged activity; choose art materials that can quickly create blocks of colour, for example painting on large sheets of paper taped to the floor, or using chalks on the playground tarmac. Just like LeWitt’s art, the creative space needs to have some boundaries marked, so that children can use positional language to describe where to add the stripes. Horizontal or

vertical stripes are the easiest to work with, and the activity can be made simpler by using only two colours, or made more complex by using stripes in a repeating pattern. Children will need to think carefully about when to put the pen (or paint or chalk) down onto the paper, and when to pick it up again.

At upper primary, the activity could also be used to write an algorithm to create art in Scratch, a free online programming environment (scratch.mit.edu). It is useful for children to do a small-scale, unplugged version of their design to help them plan their work and give them the structure of their algorithm. Although Scratch contains a paint editor for freehand drawing, the activity works best by programming a sprite to draw the stripes one by one on the stage. This will involve some careful calculations to determine the starting and finishing position of the sprite on each line, and pupils could use variables to store and update the values of these positions. As the sequence of instructions grows, children may notice that they repeatedly go to the starting position,

put the pen down, draw the stripe, pick the pen up, then change the coordinates and the pen colour ready for the next line. Spotting this pattern helps to determine where to use a repeat loop in the algorithm.

Effective scaffolding

You can support pupils to write precise algorithms by scaffolding this activity with examples. A useful technique is to model how to decompose a task into small steps, including deciding what to do first. Pupils can write the first part of the algorithm, test it on a small-scale, check it for errors, amend what

MODELLING HOW TO LEARN FROM FAILURE CREATES A CLASSROOM CULTURE IN WHICH MISTAKES AREN’T A PROBLEM

Common misconceptions

When writing algorithms, pupils often underestimate how precise the instructions need to be so that a computer can understand them. This precision can be misunderstood in two ways:

1 Missing out steps: It’s easy to make assumptions about what needs to happen to create a piece of art. In these activities, a common misconception is that children forget to explicitly say when to put the pen down on the paper and when to pick it up. Having someone else carry out their instructions is a good way of spotting

these omissions, and can help children to debug their algorithm by finding and fixing errors in it. 2 Missing out detail: Children often make the steps in their algorithms too ambiguous.

Adding in detail such as positional language can help to make algorithms more precise. This might include using vocabulary such as ‘left’, ‘right’, ‘under’, or ‘touching’ at lower-primary level, while upper-primary pupils may be able to incorporate precise measurements.

Watching someone else carry out their instructions is a useful way to get children to think about how to improve their algorithm by adding precision.

they have done so far, and then write some more. This run–test–fix–add cycle is a good habit to develop, and can be used as part of a toolbox of techniques to be displayed on tables or on the whiteboard.

There are many opportunities for gotcha moments when writing an algorithm for someone else, so expect to hear comments such as, “I didn’t mean that!” Modelling how to learn from failure at the start of the activity creates a classroom culture in which mistakes aren’t a problem in themselves, as long as you persevere and put them right. Classroom displays often include the final version of a piece of work, but displaying an algorithm including errors side by side with the debugged version sends a powerful message that it’s OK to fail and learn.

Learning from failure is also important when pupils take the role of the creator and follow the algorithm. Some children may need support to understand that their role is to help the artist by working in a robotlike way, rather than adding in steps or detail.

At the end of this activity, the artwork and their algorithms make a great display. Match algorithm and art together, or jumble them up and see if others can do the matching!

For further ideas for algorithmic art, check out Hello World issue 9, focused on computing and the arts, particularly pages 74–75 and 87–89.

KATHARINE CHILDS

Katharine is a programme coordinator at the Raspberry Pi Foundation and a former primary school teacher (@IAmKatharineC).

FIND OUT MORE

More information about Sol LeWitt:

helloworld.cc/Tate_LeWitt

An unfinished basic version of a Scratch project referencing LeWitt’s work:

helloworld.cc/LeWitt1

A completed Scratch project referencing LeWitt’s work:

helloworld.cc/LeWitt2

This article is from: