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.
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.
No comments:
Post a Comment