Context Free Art

CFDG HOWTO

From Context Free Art

Jump to: navigation, search

A CFDG file is mostly a bunch of rules for drawing shapes using other shapes. There are a few other optional components and one mandatory component:

Here is an example of all these CFDG file parts:

/* Example CFDG File
   This is a block comment. */
 
startshape Foo       // This is one type of line comment
 
include stuff.cfdg   # This is the other type of line comment
 
background { b -1 }  // This changes the background to black
 
tile { s 3 4 }       // tile the design on a grid with spacing 3 units wide and 4 units high
 
// Let us define a rule for shape Foo that is a white square
// containing a black circle. This will be on a black background.
rule Foo {
    SQUARE { b 1 }
    CIRCLE {}
}

After getting familiar with the basics, you might want to proceed to design ideas. If you have trouble remembering all of the details in the cfdg syntax then check out the reference card.

See also Context Free cans and cannots.

Views
Personal tools
Navigation
Toolbox
MediaWiki
Attribution-Share Alike 2.5
book coverSee our new book:
Community of Variation