Modelita

The tour

the language in fifteen figures

  1. C

    Every word ends in a seed, written as a capital. C is a box; the others are T O I D and the prisms, antiprisms and pyramids P5 A5 Y5.

  2. C(3, 2, 1)

    Numbers in brackets set the size: width, depth and height.

  3. x C

    A step is written to the left of the shape it changes. x extrudes: it pulls each face out into a block, with sides and a top.

  4. x[+z] C

    A selector in square brackets picks the faces a step acts on. +z is every face looking up.

  5. k[top] x[+z] C

    Steps run right to left, each on the shape the one before it left. Faces remember the role they were made in, so top is the lid x just made, and k puts a tent on it.

  6. x[inner](-1.6) i[+z](0.2) C

    Inset the top with i, then extrude its inner face the other way: a cup.

  7. x[roof&inner](0.5) i[roof&top](0.3) x[+z](0.4){roof} C(3, 2, 1)

    A label in braces names what a step makes, and faces built from them keep it. Selectors combine: & is both, | either, ! not.

  8. house = k[top](0.9) x[+z](0.6) C(3, 2, 1)
    x[side](0.3) house

    A name stands for a word, from the next line on.

  9. storey[part](h) = x[new&inner](h) i[part](0.3)
    roof = k[top](0.8)
    roof storey[top](1.2)^3 x[+z]{tower} C

    A word without a seed is a reusable list of steps. It can take numbers in ( ) and a selector in [ ], so it acts on whatever part it is given; new is what the step before made. ^3 repeats a step three times.

  10. h[inner] i[+x|-x](0.3) x[+x](1) x[-x](1) C

    h joins two faces with a tube. It is the only step that makes a hole.

  11. half = x[+x&side](1.5) x[+z](2) C
    mirror[+x&top] half

    Build half an arch, then mirror joins it to its reflection across the faces you pick: here the end of the lintel. The copies keep their roles, so later steps act on both halves.

  12. twist = turn[top](15) x[top](0.5)
    twist^8 x[+z](0.5) C(1.4, 1.4, 0.4)

    move, turn and stretch move the whole shape, or with a selector just part of it. Here each storey's lid is turned a little: a twisted column.

  13. house = k[top](0.4) x[+z](0.4) C(1, 1, 1.2)
    tree = k[top](2) x[inner](0.3) i[+z](-3) P8(0.2, 1.2)
    spin(8) move(3) house + tree

    A shape can be in several pieces, its bodies. + puts shapes side by side, array copies one in a row, and spin copies it around the origin.

  14. t I

    Conway's polyhedron operators are single letters: d a t k g and the ones made from them. Truncate an icosahedron and you have a football.

  15. k[vertex](0.25) t I

    They take selectors like any other step. t made the pentagons as vertex faces, so here only they get tents.

The rest is on the cheatsheet. Try it all in the playground.