Context Free Art – Tutorial 4

The following examples illustrate the use of repetition in Context Free Art.

startshape MyShape

path Line1 {
	MOVETO {x 0 y 0}
	LINETO {x 1 y 0}
	STROKE {width .01}
}

rule MyShape {
	36 * {r 10} Line1 {}
}
Repetition with rotation
startshape MyShape

path Line1 {
	MOVETO {x 0 y 0}
	LINETO {x 1 y 0}
	STROKE {width .01}
}

rule MyShape {
	36 * {r 10 x 0.03} Line1 {}
}
Repetition with rotation and displacement