Context Free Art

To prepare for a new course Evolutionary Graphics in AVA, I am testing the use of various graphical tools. One of them is the Context Free Art. It is a ruled based language to generate complex imagery. It cannot be described as a programming language as it lacks a lot of procedural elements. Its recursive capability makes it a good choice for generative type of graphics.

The Community of Variation book contains the sample of drawings in the gallery.

Community of Variation

The drawing is done by typing a sequence of rules on the left hand panel. Press the ‘Render’ button to generate the graphics.

Main window

Every ‘program’ starts with a startshape keyword. For example, to draw a circle, we can type in the following:

startshape MyShape

rule MyShape {
     CIRCLE {}
}


Circle

To draw a square, type:

startshape MyShape

rule MyShape {
     SQUARE {}
}


Square

To draw a triangle, type:

startshape MyShape

rule MyShape {
     TRIANGLE {}
}


Triangle

One Reply to “Context Free Art”

  1. Thanks for this tutorial series. For someone who wants to get started with Context Free Art, this is the most intuitive and easy-to-follow tutorial I’ve found on the net.

Comments are closed.