Examples

Complete programs that demonstrate different features of the language.

Heart

Two circles and a triangle combine to form a heart shape.

grid 17 by 17

color {
    warm: #e84a00
}

circle (5, 5) radius 4 with color warm
circle (11, 5) radius 4 with color warm
triangle (1, 7) to (15, 7) to (8, 15) with color warm

export "heart" in png scale 8
Heart
Two overlapping circles form the top, a triangle fills the bottom

Smiley face

A circle for the head, pixels for the eyes, and a line for the mouth.

grid 17 by 17

color {
    face: #e84a00
    feature: #2a1208
}

circle (8, 8) radius 7 with color face
pixel (5, 6) with color feature
pixel (11, 6) with color feature
line (5, 11) to (11, 11) with color feature

export "smiley" in png scale 8
Smiley face
Pixel, line, and circle shapes combined into a face

Checkerboard

Uses integer division to test whether x + y is even or odd, creating an alternating pattern.

grid 9 by 9

draw (x + y) / 2 * 2 = x + y with #2a2a2a
draw not ((x + y) / 2 * 2 = x + y) with #e8ddd0

export "checkerboard" in png scale 16
Checkerboard
Alternating pattern using arithmetic expressions

Target

Concentric circles with alternating colors, drawn from largest to smallest.

grid 33 by 33

circle (16, 16) radius 15 with #e84a00
circle (16, 16) radius 12 with #e8ddd0
circle (16, 16) radius 9 with #e84a00
circle (16, 16) radius 6 with #e8ddd0
circle (16, 16) radius 3 with #e84a00

export "target" in png scale 4
Target
Five concentric circles — later shapes overwrite earlier ones