More gap checking, and culling

Now in this version the gap checking has been refined to only test against neighbouring cells that share edges - ie left, right and if pointing up then down or if pointing down then up.

This first set begins with 1/4 randomly on and an off count less than 2 - ie a gap is filled if at least 2/3 of it's neighbours with shared edges are on.






Here are some pairs showing starting configurations and once gaps have been filled. I have now switched to checking and counting if on, rather than off, as this seems slightly simpler and more natural to describe. If a neighbouring cell is out of frame it is still off. Also to speed things up, I am now running gap check only for cells that are off.







In the next set of pairs I have added culling - after each gap checking loop, every cell that is on is checked for isolation and removed. Isolation is determined here by having no neighbour cells that share edges on.







Getting on the grid and making shapes with cells

Getting on the grid with cells

A strategy for control. An arraylist of an arraylist of cells. A way to organise and record geometry.

The cells are created in a loop with each alternate cell designated as pointing up or down and with 3 pts each with according x and y positions. My first attempt had a few gaps! The second is a grid of 18 cols x 11 rows, with cells positioned correctly.


The cells are also given a bolean switch 'on'. Here is a set with all the the cells pointing up 'on' with fill and the cells pointing down, 'off' with no fill, and a set with a wall thickness.


Finally, here is a set rendered with a likeness to Madigan's architectural presentation drawings. There is a sense of depth with the tetrahedron's (cells pointing up) reading as coming to a central recessed point, the octahedron's (cell's pointing down) being open and the slanted beams that are formed legible running between cells.

 

I have also been using a small random variance in the fill to further carry the eye through and reinforce the depth with a shimmering effect.

Making shapes with cells

Drawing shapes with cells is as simple as turning cells on and off. To begin with I have played with a random on/off configuration of cells and then 'gap checking' to consolidate some contiguous shapes.

I set up a basic 'gap check' by for each cell counting how many of the 8 neighbouring cells - left, right, up, down and on corners - are also off.  If any neighbour cells are out of frame they are counted as off. If the off count is less than x then the cell is turned on eliminating the gap. Gap check iteratively loops through cells (every 500ms live) but depending on x is usually completed after the first, second or third pass.

In this case the starting configuration was one third randomly off, and an off count less than 1 - ie all neighbouring cells had to be on for gaps to be filled.



The following are sets starting with a 50% randomly off configuration.

Set with no gap check


Set with gap check off count less than 2.



Set with off count less then 3


And set with off count less than 4.



While the processes could be refined to eliminate isolated cells, eg near frames neighbour counts could be more effective, or pruning could be considered, in general the outcomes of this strategy are indeed tending toward contiguous shapes.

More shapes drawn with lines

Here is an expanded set of shapes from the 9 growth segment series. This system with lack of control is also non-deterministic and has mapped out a significant formal possibility space of the tri-hex grid. Like any good generative system it has created solutions that I would not have arrived at myself otherwise - and many of the shapes and compositions of multiple adjacent shapes and lines are dynamic and exciting.