# Space Filler 01

The space Filler is an algorithm used to reproduce geometry in a packed rhythm. In other words, it’s when a geometrical representation occupies a space efficiently without wasting spaces between the edges of adjacent geometries. Usually, it is polygon which defines the starting point for repetition, this because of its symmetry and also because of its similarity on segments corners which can help attaching units to each other perfectly. It’s usually triangles, squares or even hexagons, all these shapes are capable of tessellating perfectly on such process. However, multiple shapes can also be combined in a dual-protocol. as long as each unit has the same edges’ characteristics as the other one.

Space Filler from mohdnaim on Vimeo.

The space filling can be widely used in architectural plans generation, facade tesselation or even more advanced processes in urban modelling or space syntax. we can find the Space filling in every aspect of our living algorithms, from the smallest structures of Molecules to the unprecedented size of macro level landscape fields.

When I developed this algorithm, I was aiming to create a system that can sense the environment and the space created. I also wanted to have a self-organizing organism which can intelligently sense its own existence and behaviours as particles and as a group. I wanted the growing algorithm to produce a smart space which not only expands itself recursively But goes beyond that. I wanted the growth to discover itself and its surrounding. I wanted a smart permutation which test and select.

###### Figure 01: Initial Definition

I started the experiment with developing squares growth algorithm. The initial square randomly selects one of its four corners, then it draws a point in space outward referencing the direction of the square centre to the point. The resulted point is located on exactly the mirrored location of its initial square algorithm. By adapting a looping algorithm to the system. the definition started to record the result and reuse it again constantly. I added the movement line as a reference to understand the movement pattern. I was more than happy with the results at hat stage.

###### Figure 02: Naked Edges.

Afterwards, I realised that my definition had a small problem, that most of the iterations run-wasted on the inner wandering within the organism. So I decided to develop a tool to sense the border of the organism, the edges and the units or cells which is literally naked and exposed to the outer space. Only those cells were allowed to be selected as potential growth branches. It works fine at the beginning but stopped after a while because it kept generating cells inward. so I decided to control the direction of growth again by eliminating the opportunity for inward edges of a naked cell to be selected again. and Boom, the Defenition become perfect. that was the optimisation process.

###### Figure 03: Triangles Filling without organism sensing

I wanted To test My 2-Dimension algorithm on different shapes, so I decided to test shapes like triangles, hexagons and other geometries. I applied the Triangle first. only then I realised that corners won’t work anymore. so I decided to use the initial shape edges. The moving operator was invalid as well, so I added the mirroring operator. It was a solid option. Although I suffered a bit with developing the flipping mirroring plane, At the end, the process worked fine.

###### Figure 04: Triangles Filling with organism sensing.

The interesting part, that the algorithm worked fine on higher iterations, although it slowed down a bit but The result was a bit faster than the earlier ones. The growing path was clearly branching from the initial cell, all the way to the edges of the organism. that formed a beautiful and informative data which visually narrating the story of growth by geometries.

###### Figure 05: Squares Filling with Path Branching.

The Algorithm worked fine with hexagonal shapes and That make me think of developing new definition which works in 3-Dimensional space. The Challenge is attractive and the expected results will be immersive.