Grid method

During the workshop we will be relying on a technique well know to painters. It is called the grid method.

Let's explain this method with our tRusted logo.

The Rust logo

The first thing we do to our logo is overlay a grid.

A grid over the Rust logo

Next we draw a second grid, similar to the first.

A grid over the Rust logo A single grid

Now we focus on a single cell in the original grid, and accurately copy it in the corresponding grid in the target grid. Going from top to bottom and from left to right, our first cell is empty. The second cell has a single tooth of the gear. Let's copy it over.

A grid over the Rust logo One cell copied of the Rust logo

The following cell has some more teeth.

A grid over the Rust logo Two cells copied of the Rust logo

By copying each cell one by one, the original logo is recreated.

A grid over the Rust logo Three cells copied of the Rust logo

until the original is completely copied.

A grid over the Rust logo The Rust logo copied by the grid method

Variations

Once we understand the basics of the grid method, we can start to look for variations. Nobody is restricting you to draw the target grid differently.

Scale

We could scale the grid.

A grid over the Rust logo The Rust logo scaled by the grid method

Non-uniform scale

We could scale the grid non-uniformly.

A grid over the Rust logo The Rust logo scaled by the grid method

Shearing

We could shear the grid.

A grid over the Rust logo The Rust logo scaled by the grid method

Combination

Or we could combine various transformation and apply that to the grid.

A grid over the Rust logo The Rust logo scaled by the grid method

Because we will make extensive use of the grid method, and want to easily manipulate the grid, we will introduce a box abstraction.