Friday, January 30, 2009

SquaresNCircles

Here is yet another simple creation that randomly places squares and circles on the canvas. The interesting aspect of the language is that different pictures get created without a change in code! Thus, a slight variation of the image is shown below.

Thursday, January 29, 2009

Spiral

This is a simple spiral. All that has been done is rotate a shape - square in this case - by 1 degree while continually reducing its size.

startshape FIGURE
background{b -1}
rule FIGURE {
SHAPES{}
}

rule SHAPES {
SHAPE{}
SHAPES{s -0.99 r 1}
}

rule SHAPE {
SQUARE{}
SQUARE{s 0.99 hue 30 sat 1 b 1}
}

Triangle Set



A simple set of Triangles juxtapositioned next to one another with a reduction in size. The code that generates this figure is shown below:

startshape B

rule A{
TRIANGLE{b 0.2}
TRIANGLE{s 0.95 b 1}
A{s 0.9}
}

rule B{
A{}
A{x 0.5 y 0.3 flip 180}
A{x 1}
A{x 0.5 y 0.88}
}

Now adding a few color elements to the code gets us this.