sysid blog

BMW I4 and linear dynamic Truchet tilings

March 28, 2020 ☕️ 2 min read
i4

Isn’t this BMW I4 a beauty? The perfect motivation to start a journey into a little optimization problem:

How to manipulate traditional Truchet tiles so that the resulting tiling resembles the Ultimate Driving Machine?

Truchet tiles are a well known niche in math because they form a foundation for a lot of interesting questions. The basic theory: You have four simple tiles:

truchet_tiles

Since every tile is 50% black and 50% white a resulting tiling can only resemble a grey area if viewed from afar. In order to depict images it is necessary to manipulate the proportion of black vs. white.

Just envision one Truchet tile as a dot in a black-and-white rater image:

i4_raster

The trick is now to manipulate the tiles so that they can approximate the grey shade of a raster point.

dynamic_truchet_tiles

Source: Bosch, Robert. Opt Art: From Mathematical Optimization to Visual Design (p. 6). Princeton University Press.

The black half is intersected by a diagonal: (0,1)(0,1). Along this line the threshold for black can be moved up and down.

t=0P(0.25,0.25)t = 0 \Leftrightarrow P(0.25, 0.25): maximal brightness.
t=1P(0.75,0.75)t = 1 \Leftrightarrow P(0.75, 0.75): maximal darkness.

The brightness of a tile is only depending on the parameter t(0,1)t \in (0, 1).

As a result the polygon ABPC encloses an area which is proportional to the darkness of the tile. This is a very simple linear dependency and can be easily modelled.

If a is the length of the tile and t is our ‘black’ parameter, then the math is:

t=2y1=attx+ay2=tatx+atatt' = \sqrt{2} \\ y_1 = - \frac{a-t'}{t'}x + a \\ y_2 = - \frac{t'}{a-t'}x + \frac{at'}{a-t'} \\

Enough theory, let’s see what can be done with this simple model.

Application of model

i4_0
i4_2
i4_5

xxx

Isn’t this a beautiful combination of math, programming and design?

If you are interested in the Python code contact me via mail.


always be building, by sysid.

© 2022