Algorithmic Doodle Art

Follow simple algorithms involving fractions to draw pictures reminiscent of nature. 

snowflakegrass

Scenery in films is often computer generated. Ever wondered how they do it? Next time you find yourself drawing doodles, draw an algorithmic doodle and explore algorithms for drawing nature. The algorithms are recursive: that is they describe one step and then tell you just to draw the next step in the same way, following the algorithm from the start.

Learn about:

redberrybushsolutionRAW
  • algorithmic thinking
  • computational modelling
  • algorithms in nature
  • computer generated images
  • recursion
  • computational thinking

Also for younger children practice and explore:

  • maths: fractions

Example

Here is an example Doodle Algorithm. What does it look like?

  1. Start by drawing a single straight vertical line
  2. DoodleDraw from that line as follows.

To DoodleDraw from a given line:

1. Draw 3 shorter lines at an angle in the top two-thirds of the line on its left side.

2. Draw 3 shorter lines at an angle in the top two-thirds of the line on its right side.

3. Choose a new existing line and DoodleDraw from that line

By following the algorithm you should get a picture something like this one: though as you choose  the exact positions and lengths of lines randomly yours won’t be exactly the same just as no two plants are identical.

Different algorithms give different looking trees, grasses, ferns, snow flakes, crystals, …

… so now try the Doodle Algorithm on one of our sheets. Then start inventing your own doodle art algorithms and see how realistic the drawings you end up with are.

If you happen to have a computer handy you can then write programs to draw them too.

Doodle art algorithm sheets

Here are Algorithmic Doodle Art sheets and solutions that you can download.

Grass, Trees, Bushes, …


William Morris


Christmassy  Algorithmic Doodle Art


Animals

Puzzle 10: Fabulous Beasts: Recursive Centaur

centaur.jpg

Invent your own doodle art

recursivewrappingsolution

Now start doodling and invent your own algorithmic doodle art. Perhaps it is a kind of grass, or a bush or tree. Perhaps it is a fabulous beast. Once you have doodled something you like, write the “recursive” rules that generate different variations of it.

Write Doodle art programs

Now try and code the rules up as a program in your favourite programming language using recursion (write a DoodleDraw function  that calls itself). Your program should use randomness to draw a different version of the doodle each time it is run. You will also find you need to include a rule saying exactly when to stop. This is called the base case of the recursion. When drawing the pictures you probably just stopped when the picture looked detailed enough.

Write a program that creates a field of grass or sky full of snowflakes using the code.

Invent your own doodle art rules and write programs to draw using them.